:root {
  color-scheme: light;
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --line: #d7dde8;
  --text: #101828;
  --text-soft: #1f2937;
  --muted: #4b5563;
  --brand: #465fff;
  --brand-soft: #eef4ff;
  --success: #039855;
  --success-soft: #ecfdf3;
  --warning: #dc6803;
  --warning-soft: #fffaeb;
  --purple: #7f56d9;
  --purple-soft: #f4f3ff;
  --error: #d92d20;
  --error-soft: #fef3f2;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --sidebar-width: 290px;
  --sidebar-collapsed-width: 90px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --radius: var(--radius-lg);
  --content-wide: 1320px;
  --content-standard: 1180px;
  --content-form: 720px;
  --page-gutter: clamp(16px, 2.5vw, 32px);
  --font-caption: 14px;
  --font-secondary: 15px;
  --font-body: 16px;
  --font-section: 20px;
  --font-heading: 22px;
  --line-body: 1.5;
}

html {
  font-size: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: var(--font-body);
  line-height: var(--line-body);
}

button,
input,
select,
textarea {
  font: inherit;
  font-size: var(--font-body);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #eef2f6;
  padding: 24px;
}

.login-panel {
  display: grid;
  width: min(100%, 430px);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(16, 24, 40, 0.12);
  padding: 28px;
}

.brand-block.login-brand {
  align-items: center;
  display: grid;
  gap: 10px;
  justify-items: center;
  margin-bottom: 8px;
  text-align: center;
}

.login-brand .brand-logo {
  width: min(250px, 100%);
}

.login-brand .brand-text span {
  font-size: 0.86rem;
}

.login-panel h1 {
  margin: 2px 0 0;
  font-size: 1.7rem;
  letter-spacing: 0;
}

.login-panel label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 750;
}

.login-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 0 13px;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--surface-soft);
  color: var(--brand);
  outline: none;
}

.password-toggle span {
  position: relative;
  display: block;
  width: 21px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 999px / 72%;
}

.password-toggle span::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
}

.password-toggle span::after {
  position: absolute;
  top: 50%;
  left: -2px;
  display: block;
  width: 25px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  opacity: 1;
  transform: rotate(-34deg);
}

.password-toggle.is-visible span::after {
  opacity: 0;
}

.login-panel input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
  outline: none;
}

.login-error {
  margin: 0;
  border: 1px solid #fecdca;
  border-radius: 8px;
  background: var(--error-soft);
  color: var(--error);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 12px;
}

.dashboard-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  border-right: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 20px;
  transition: width 180ms ease;
}

.sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 34px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  min-width: 0;
  margin-bottom: 0;
}

.brand-logo {
  display: block;
  width: 138px;
  height: auto;
  flex: 0 0 auto;
}

.brand-mark {
  display: none;
  width: 48px;
  height: auto;
  flex: 0 0 auto;
}

.brand-block strong,
.brand-block span {
  display: block;
}

.brand-text {
  min-width: 0;
}

.brand-block strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.2;
}

.brand-block span {
  color: var(--muted);
  font-size: 0.82rem;
}

.sidebar-toggle {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.sidebar-toggle:hover {
  background: var(--surface-soft);
  color: var(--brand);
}

.sidebar-toggle span {
  display: block;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg);
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 12px;
  color: #667085;
  font-size: 0.92rem;
  font-weight: 650;
  padding: 0 14px;
  text-decoration: none;
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  flex: 0 0 24px;
  border-radius: 8px;
  background: #f2f4f7;
  color: var(--muted);
  font-size: var(--font-caption);
  font-weight: 900;
}

.side-nav a.is-active .nav-icon,
.side-nav a:hover .nav-icon {
  background: #ffffff;
  color: var(--brand);
}

.side-nav a.is-active,
.side-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
}

.sidebar-footer .logout-action {
  width: 100%;
  justify-content: center;
}

.main-panel {
  min-width: 0;
  margin-left: var(--sidebar-width);
  transition: margin-left 180ms ease;
}

.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
  padding-inline: 14px;
}

.sidebar-collapsed .main-panel {
  margin-left: var(--sidebar-collapsed-width);
}

.sidebar-collapsed .sidebar-top {
  justify-content: center;
}

.sidebar-collapsed .brand-text,
.sidebar-collapsed .brand-logo,
.sidebar-collapsed .nav-label {
  display: none;
}

.sidebar-collapsed .brand-mark {
  display: block;
}

.sidebar-collapsed .brand-block {
  justify-content: center;
}

.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: 32px;
  right: -22px;
  box-shadow: var(--shadow-xs);
}

.sidebar-collapsed .sidebar-toggle span {
  transform: rotate(135deg);
}

.sidebar-collapsed .side-nav a {
  justify-content: center;
  padding-inline: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 14px 24px;
}

.page-title {
  min-width: 210px;
}

.logout-action {
  min-height: 44px;
  border-radius: 999px;
  padding: 0 14px;
}

.sidebar-top > .logout-action {
  display: none;
}

.eyebrow {
  color: var(--brand);
  font-size: var(--font-caption);
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 3px;
  text-transform: uppercase;
}

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

h1 {
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 750;
  line-height: 1.2;
  margin-bottom: 0;
}

.topbar-actions {
  display: grid;
  grid-template-columns: minmax(320px, 520px) auto;
  align-items: end;
  gap: 12px;
}

.global-search,
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  padding: 10px 12px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #b9c4ff;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.12);
}

.primary-action {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
  padding: 0 18px;
  box-shadow: var(--shadow-xs);
}

.primary-action:hover {
  background: #3447e6;
}

.primary-action:disabled,
.secondary-action:disabled {
  border-color: var(--line);
  background: #eef1f6;
  color: #98a2b3;
  cursor: not-allowed;
  box-shadow: none;
}

[hidden] {
  display: none !important;
}

.secondary-action {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 800;
  padding: 0 14px;
  box-shadow: var(--shadow-xs);
}

.secondary-action:hover {
  border-color: #b9c4ff;
  background: var(--brand-soft);
  color: var(--brand);
}

.workbench {
  width: min(100%, 1536px);
  margin-inline: auto;
}

.workbench {
  display: grid;
  gap: 16px;
  padding: 24px 24px;
}

.portfolio-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.portfolio-tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  flex: 0 0 auto;
  font-weight: 850;
  padding: 0 18px;
  box-shadow: var(--shadow-xs);
}

.portfolio-tab:hover,
.portfolio-tab.is-active {
  border-color: #b9c4ff;
  background: var(--brand-soft);
  color: var(--brand);
}

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

.quick-filter {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  font: inherit;
  font-size: var(--font-secondary);
  padding: 7px 11px;
}

.quick-filter strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: var(--font-caption);
  padding-inline: 5px;
}

.quick-filter:is(:hover, :focus-visible, .is-active) {
  border-color: var(--brand);
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
}

.quick-filter:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.quick-filter.is-subdued {
  margin-left: auto;
  color: var(--muted);
}

.quick-filter.is-subdued.is-active {
  color: var(--brand);
}

.filter-card,
.listing-card,
.detail-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.filter-card {
  display: grid;
  grid-template-columns: minmax(170px, 0.45fr) minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  padding: 18px;
}

.filter-card h2 {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 4px;
}

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

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(128px, 1fr));
  gap: 12px;
}

.listing-card {
  overflow: hidden;
}

.list-header {
  display: grid;
  grid-template-columns: 86px minmax(220px, 1.45fr) minmax(150px, 0.95fr) 118px 132px 122px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--font-caption);
  font-weight: 700;
  padding: 11px 16px;
  text-transform: uppercase;
}

.property-list {
  display: grid;
}

.property-row {
  display: grid;
  grid-template-columns: 86px minmax(220px, 1.45fr) minmax(150px, 0.95fr) 118px 132px 122px;
  gap: 12px;
  align-items: center;
  min-height: 84px;
  border-bottom: 1px solid #f0f2f5;
  cursor: pointer;
  padding: 14px 16px;
}

.property-row:hover,
.property-row:focus {
  background: #f8fbff;
}

.property-row:focus {
  outline: 2px solid rgba(70, 95, 255, 0.18);
  outline-offset: -2px;
}

.property-title {
  min-width: 0;
}

.property-name {
  min-width: 0;
}

.property-name strong {
  color: var(--text);
  display: block;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.property-name > span {
  color: var(--muted);
  display: block;
  font-size: 0.86rem;
  margin-top: 3px;
}

.property-location {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  min-width: 0;
  overflow-wrap: anywhere;
}

.value-line strong {
  color: var(--text);
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: nowrap;
}

.property-code span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.code-pill,
.soft-badge,
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
  white-space: nowrap;
}

.code-pill,
.soft-badge {
  background: var(--surface-soft);
  color: var(--muted);
}

.badge {
  margin: 2px 4px 2px 0;
}

.badge.sale,
.badge.rent,
.badge.deal {
  background: var(--brand-soft);
  color: var(--brand);
}

.badge.success {
  background: var(--success-soft);
  color: var(--success);
}

.badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.paused {
  background: var(--purple-soft);
  color: var(--purple);
}

.badge.muted {
  background: #f2f4f7;
  color: var(--muted);
}

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

.is-hidden {
  display: none !important;
}


.detail-view {
  width: min(100%, 1536px);
  margin-inline: auto;
  padding: 24px;
}

.detail-page {
  display: grid;
  gap: 16px;
}

.detail-shell {
  padding: 24px;
}

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

.detail-hero h2 {
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 750;
  line-height: 1.25;
  margin: 12px 0 8px;
}

.detail-hero p {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.detail-section {
  padding-top: 22px;
}

.detail-section h3 {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 750;
  letter-spacing: 0;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.detail-grid {
  display: grid;
  gap: 11px;
}

.detail-line {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  font-size: 0.94rem;
  padding: 2px 0;
}

.detail-line span {
  color: var(--muted);
}

.detail-line strong {
  color: var(--text-soft);
  font-weight: 700;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.edit-form {
  display: grid;
  gap: 18px;
}

.edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

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

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

.edit-grid label {
  display: grid;
  gap: 6px;
}

.edit-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.edit-control {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: block;
  border: 1px solid #d6dce8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  line-height: 1.35;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

.edit-control:is(textarea) {
  line-height: 1.45;
  min-height: 112px;
  resize: vertical;
}

.edit-control:focus {
  border-color: #99adff;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.12);
  outline: none;
}

.checkbox-field {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex !important;
  gap: 10px !important;
  min-height: 44px;
  padding: 10px 12px;
}

.checkbox-field input {
  flex: 0 0 auto;
  min-height: 0;
  width: 18px;
}

.checkbox-field span {
  color: var(--text-soft);
  font-size: 0.86rem;
}

.form-error {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: var(--danger);
  font-weight: 750;
  margin: 0;
  padding: 10px 12px;
}

.detail-highlight {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.detail-highlight div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 16px;
}

.detail-highlight span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.detail-highlight strong {
  color: var(--text);
  display: block;
  font-size: 1.08rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.detail-line a {
  color: var(--brand);
  text-decoration: none;
}

.detail-line a:hover {
  text-decoration: underline;
}

.detail-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-top: 24px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.detail-tab {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
  font-weight: 800;
  padding: 0 18px;
}

.detail-tab:hover {
  background: var(--surface-soft);
  color: var(--brand);
}

.detail-tab.is-active {
  border-color: #c7d7fe;
  background: var(--brand-soft);
  color: var(--brand);
}

.detail-tab-panel {
  padding-top: 4px;
}

.tab-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tab-section-header p {
  margin-bottom: 0;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
}

.priority-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  margin-top: 22px;
  padding: 18px;
}

.check-grid,
.check-list {
  display: grid;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #eef1f6;
  padding: 10px 0;
}

.check-item span,
.pending-box span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.check-item span {
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0;
}

.check-item strong,
.pending-box strong {
  color: var(--text-soft);
  display: block;
  font-size: 0.92rem;
}

.check-item.is-done {
  background: transparent;
  border-color: #eef1f6;
}

.check-item.is-pending {
  background: transparent;
  border-color: #eef1f6;
}

.pending-box {
  border: 1px solid #fedf89;
  border-radius: 10px;
  margin-top: 12px;
  padding: 13px 14px;
  background: var(--warning-soft);
}

.pending-box.is-complete {
  background: var(--success-soft);
  border-color: #abefc6;
}

.property-area-switch {
  display: flex;
  gap: 4px;
  width: min(100% - 48px, 1536px);
  margin: 20px auto 0;
  border-bottom: 1px solid var(--line);
}

.area-switch-button {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 0 16px;
}

.area-switch-button:hover,
.area-switch-button:focus-visible,
.area-switch-button.is-active {
  border-bottom-color: var(--brand);
  color: var(--brand);
  outline: none;
}

.pipeline-workbench {
  display: grid;
  gap: 16px;
  width: min(100%, 1536px);
  margin-inline: auto;
  padding: var(--page-gutter);
}

.pipeline-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.pipeline-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
}

.pipeline-layout-switch {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 3px;
}

.pipeline-layout-switch button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 0 14px;
}

.pipeline-layout-switch button:hover,
.pipeline-layout-switch button:focus-visible,
.pipeline-layout-switch button.is-active {
  background: var(--brand-soft);
  color: var(--brand);
  outline: none;
}

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

.workflow-message {
  width: min(calc(100% - 48px), 1488px);
  margin: 12px auto 0;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-weight: 700;
}

.workflow-message.is-success {
  border-color: #a6e3c1;
  background: #effaf3;
  color: #17643a;
}

.workflow-message.is-error {
  border-color: #f4b5ae;
  background: var(--error-soft);
  color: var(--error);
}

.pipeline-count {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  padding: 11px 13px;
  text-align: left;
}

.pipeline-count span {
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.25;
}

.pipeline-count strong {
  color: var(--brand);
  font-size: 1.18rem;
}

.pipeline-count:hover,
.pipeline-count:focus-visible,
.pipeline-count.is-active {
  border-color: #a8b7ff;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.09);
  outline: none;
}

.pipeline-count.is-subdued {
  background: #f5f6f8;
  color: var(--muted);
}

.pipeline-count.is-subdued strong {
  color: var(--muted);
}

.pipeline-count.needs-review {
  background: var(--warning-soft);
}

.pipeline-list-card,
.kanban-column,
.pipeline-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.pipeline-list-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
}

.pipeline-list-summary span {
  color: var(--muted);
  font-size: 0.8rem;
}

.pipeline-list-header,
.pipeline-list-row {
  display: grid;
  grid-template-columns: 76px minmax(180px, 1.1fr) minmax(145px, 0.8fr) minmax(140px, 0.75fr) minmax(180px, 1fr) 78px;
  align-items: center;
  gap: 12px;
}

.pipeline-list-header {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--font-caption);
  font-weight: 750;
  padding: 10px 16px;
  text-transform: uppercase;
}

.pipeline-list-row {
  min-height: 84px;
  border-bottom: 1px solid #eef1f5;
  padding: 13px 16px;
}

.pipeline-list-row:last-child {
  border-bottom: 0;
}

.capture-stage-control {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.capture-stage-control > span:not(.sr-only) {
  color: var(--muted);
  font-size: 0.78rem;
}

.capture-stage-control select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0 28px 0 9px;
}

.capture-stage-control select:focus-visible {
  border-color: #a8b7ff;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.09);
  outline: none;
}

.pipeline-property-code {
  color: var(--muted);
  font-size: 0.82rem;
}

.pipeline-property-name {
  display: grid;
  min-width: 0;
}

.pipeline-property-name strong,
.pipeline-property-name span,
.pipeline-location,
.pipeline-pending {
  overflow-wrap: anywhere;
}

.pipeline-property-name span,
.pipeline-location {
  color: var(--muted);
  font-size: 0.82rem;
}

.pipeline-pending {
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 650;
}

.row-detail-action {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--brand);
  cursor: pointer;
  font-weight: 800;
  padding: 0 10px;
}

.row-detail-action:hover,
.row-detail-action:focus-visible {
  border-color: #a8b7ff;
  background: var(--brand-soft);
  outline: none;
}

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

.kanban-column {
  min-width: 250px;
  background: #f5f7fa;
  overflow: hidden;
}

.kanban-column.needs-review {
  background: var(--warning-soft);
}

.kanban-column.is-drop-target {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px rgba(70, 95, 255, 0.16);
}

.kanban-column-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
}

.kanban-column-heading h3 {
  margin: 0;
  font-size: 0.86rem;
}

.kanban-column-heading span {
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--font-caption);
  font-weight: 800;
}

.kanban-cards {
  display: grid;
  align-content: start;
  gap: 9px;
  max-height: calc(100vh - 335px);
  overflow-y: auto;
  padding: 10px;
}

.kanban-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  padding: 12px;
  cursor: grab;
}

.kanban-card.is-dragging {
  opacity: 0.45;
}

.kanban-card[aria-busy="true"] {
  cursor: wait;
  opacity: 0.65;
}

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

.kanban-card-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pipeline-property-name .badge {
  justify-self: start;
  margin-top: 4px;
}

.kanban-card-top > span:first-child {
  color: var(--muted);
  font-size: var(--font-caption);
  font-weight: 800;
}

.kanban-card h4 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.3;
}

.kanban-card > p,
.kanban-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.kanban-pending {
  display: grid;
  gap: 2px;
  border-top: 1px solid #eef1f5;
  padding-top: 9px;
}

.kanban-pending span {
  color: var(--muted);
  font-size: var(--font-caption);
}

.kanban-pending strong {
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.pipeline-empty {
  display: grid;
  gap: 4px;
  padding: 36px;
  text-align: center;
}

.pipeline-empty span {
  color: var(--muted);
}

.detail-page-actions,
.section-title-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.flow-sections {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.flow-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.flow-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
}

.flow-section > summary::-webkit-details-marker {
  display: none;
}

.flow-section > summary:hover,
.flow-section > summary:focus-visible {
  background: var(--surface-soft);
  outline: none;
}

.flow-section > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.flow-section > summary strong {
  color: var(--text);
  font-size: 0.94rem;
}

.flow-section > summary small {
  color: var(--muted);
  font-size: 0.78rem;
}

.section-chevron {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.flow-section[open] .section-chevron {
  transform: rotate(225deg);
}

.flow-section-content {
  border-top: 1px solid var(--line);
  padding: 16px;
}

.publication-editor {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 1.8fr);
  gap: 16px;
  align-items: start;
}

.publication-editor[aria-busy="true"] {
  opacity: 0.68;
}

.publication-status-control,
.publication-metadata-form,
.publication-metadata-form label {
  display: grid;
  gap: 7px;
}

.publication-status-control > span,
.publication-metadata-form label > span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.publication-status-control select,
.publication-metadata-form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 8px 10px;
}

.publication-metadata-form {
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.3fr);
}

.publication-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.publication-actions a {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
}

.publication-alerts {
  margin-top: 16px;
  border: 1px solid #eed39b;
  border-radius: 8px;
  background: var(--warning-soft);
  padding: 11px 12px;
}

.publication-alerts strong {
  font-size: 0.82rem;
}

.publication-alerts ul {
  margin: 5px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.compact-sections {
  padding-top: 4px;
}

.checklist-progress {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.checklist-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.checklist-progress strong {
  color: var(--text-soft);
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e9edf3;
  overflow: hidden;
}

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

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

.flow-checklist-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  border: 1px solid #e8ebf0;
  border-radius: 8px;
  padding: 10px 11px;
}

.flow-checklist-item > div {
  display: grid;
  gap: 3px;
}

.flow-checklist-item strong {
  font-size: 0.83rem;
  line-height: 1.3;
}

.flow-checklist-item > div > span {
  color: var(--muted);
  font-size: var(--font-caption);
}

.flow-checklist-item.is-pending {
  background: var(--warning-soft);
}

.editable-checklist .flow-checklist-item {
  align-items: stretch;
}

.editable-checklist .flow-checklist-item[aria-busy="true"] {
  opacity: 0.68;
}

.checklist-item-content {
  align-content: start;
  min-width: 0;
}

.checklist-note {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.checklist-note-action {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: var(--font-caption);
  font-weight: 700;
  padding: 3px 0;
  text-align: left;
}

.checklist-note-action:hover,
.checklist-note-action:focus-visible {
  text-decoration: underline;
}

.checklist-note-action:focus-visible,
.checklist-status-control select:focus-visible,
.checklist-note-editor textarea:focus-visible {
  outline: 2px solid #a8b7ff;
  outline-offset: 2px;
}

.checklist-note-editor {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--font-caption);
}

.checklist-note-editor textarea {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  padding: 8px;
}

.checklist-status-control {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 6px;
  min-width: 132px;
}

.checklist-status-control select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 24px 0 8px;
}

.preparation-summary {
  margin-bottom: 18px;
}

.listing-preparation-editor {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.listing-preparation-editor[aria-busy="true"] {
  opacity: 0.7;
}

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

.listing-preparation-form label {
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.listing-preparation-form label > span {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.listing-preparation-form label small {
  font-size: var(--font-caption);
  font-weight: 500;
}

.listing-preparation-form input,
.listing-preparation-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 9px 10px;
}

.listing-preparation-form input {
  min-height: 44px;
}

.listing-preparation-form textarea {
  min-height: 112px;
  resize: vertical;
}

.listing-preparation-form input:focus-visible,
.listing-preparation-form textarea:focus-visible {
  border-color: #a8b7ff;
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.09);
  outline: none;
}

.listing-description-field {
  grid-row: span 2;
}

.listing-preparation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.listing-preparation-actions a {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
}

.listing-preparation-actions a:hover,
.listing-preparation-actions a:focus-visible {
  text-decoration: underline;
}

.photo-readiness-control {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: fit-content;
  cursor: pointer;
}

.photo-readiness-control input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--brand);
}

.photo-readiness-control span {
  display: grid;
  gap: 2px;
}

.photo-readiness-control strong {
  font-size: 0.84rem;
}

.photo-readiness-control small {
  color: var(--muted);
  font-size: var(--font-caption);
}

.pending-callout,
.ready-banner,
.attention-note,
.read-error {
  border-radius: 8px;
  margin: 14px 0 0;
  padding: 11px 12px;
}

.pending-callout {
  display: grid;
  gap: 2px;
  border: 1px solid #fedf89;
  background: var(--warning-soft);
}

.pending-callout span {
  color: var(--warning);
  font-size: var(--font-caption);
  font-weight: 800;
  text-transform: uppercase;
}

.pending-callout strong {
  color: var(--text-soft);
}

.ready-banner {
  border: 1px solid #abefc6;
  background: var(--success-soft);
  color: var(--success);
  font-weight: 850;
}

.attention-note {
  border: 1px solid #fedf89;
  background: var(--warning-soft);
  color: var(--text-soft);
}

.read-error {
  border: 1px solid #fecdca;
  background: var(--error-soft);
  color: var(--error);
}

.detail-loading {
  color: var(--muted);
  margin: 20px 0 0;
}

.history-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 17px;
}

.history-list li:not(:last-child)::before {
  position: absolute;
  top: 12px;
  bottom: 0;
  left: 5px;
  width: 2px;
  background: #e6eaf0;
  content: "";
}

.history-marker {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  margin-top: 4px;
  border: 3px solid #c7d2fe;
  border-radius: 50%;
  background: var(--surface);
}

.history-list li > div {
  display: grid;
  gap: 2px;
}

.history-list strong {
  font-size: 0.86rem;
}

.history-list span,
.history-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 1280px) {
  .pipeline-counts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .list-header,
  .property-row {
    grid-template-columns: 78px minmax(180px, 1fr) minmax(120px, 0.7fr) 96px 116px 104px;
    gap: 10px;
    padding-inline: 14px;
  }

  .badge {
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 1100px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px;
  }

  .main-panel {
    margin-left: 0;
  }

  .sidebar-collapsed .sidebar {
    width: 100%;
    padding: 16px;
  }

  .sidebar-collapsed .main-panel {
    margin-left: 0;
  }

  .sidebar-collapsed .sidebar-top {
    justify-content: space-between;
  }

  .sidebar-collapsed .brand-text,
  .sidebar-collapsed .brand-logo,
  .sidebar-collapsed .nav-label {
    display: block;
  }

  .sidebar-collapsed .brand-mark {
    display: none;
  }

  .sidebar-collapsed .sidebar-toggle {
    position: static;
    box-shadow: none;
  }

  .sidebar-top {
    margin-bottom: 14px;
  }

  .sidebar-footer {
    display: none;
  }

  .side-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .list-header,
  .property-row {
    grid-template-columns: 82px minmax(180px, 1fr) minmax(130px, 0.8fr) 110px 118px 112px;
  }
}

@media (max-width: 820px) {
  body {
    background: #f4f6f9;
    font-size: var(--font-body);
  }

  .quick-filter.is-subdued {
    margin-left: 0;
  }

  .publication-editor,
  .publication-metadata-form {
    grid-template-columns: 1fr;
  }

  .publication-actions {
    grid-column: 1;
  }

  .sidebar {
    padding: 12px 16px;
  }

  .sidebar-top {
    align-items: center;
    margin-bottom: 10px;
  }

  .sidebar-top > .logout-action {
    display: inline-flex;
    min-height: 44px;
    flex: 0 0 auto;
    align-items: center;
    padding: 0 12px;
  }

  .brand-logo {
    width: 124px;
  }

  .sidebar-toggle {
    display: none;
  }

  .side-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .side-nav a {
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    font-size: 0.82rem;
    padding: 0 8px;
  }

  .nav-icon {
    display: none;
  }

  .topbar {
    position: static;
    display: grid;
    gap: 12px;
    min-height: 0;
    padding: 14px 16px;
  }

  .page-title {
    min-width: 0;
  }

  .page-title .eyebrow {
    font-size: var(--font-caption);
    margin-bottom: 2px;
  }

  .page-title h1 {
    font-size: 1.18rem;
  }

  .topbar-actions,
  .filter-card,
  .filters {
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    gap: 8px;
  }

  .global-search {
    gap: 5px;
  }

  .global-search input {
    min-height: 44px;
  }

  .topbar-actions .primary-action {
    display: none;
  }

  .workbench {
    padding-left: 16px;
    padding-right: 16px;
  }

  .property-area-switch {
    width: calc(100% - 32px);
    margin-top: 12px;
  }

  .pipeline-workbench {
    gap: 12px;
    padding: var(--space-4);
  }

  .pipeline-heading {
    align-items: stretch;
    display: grid;
  }

  .pipeline-layout-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pipeline-counts {
    display: flex;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .pipeline-count {
    flex: 0 0 160px;
  }

  .pipeline-list-header {
    display: none;
  }

  .pipeline-list-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .pipeline-list-row > :not(.pipeline-property-name):not(.row-detail-action) {
    grid-column: 1;
  }

  .pipeline-property-name {
    grid-column: 1;
    grid-row: 1;
  }

  .pipeline-property-code {
    grid-row: 2;
  }

  .pipeline-location {
    grid-row: 3;
  }

  .pipeline-list-row > span:nth-child(4) {
    grid-row: 4;
  }

  .pipeline-pending {
    grid-row: 5;
  }

  .pipeline-list-row .row-detail-action {
    grid-column: 2;
    grid-row: 1 / span 5;
    align-self: center;
  }

  .flow-checklist {
    grid-template-columns: 1fr;
  }

  .listing-preparation-form {
    grid-template-columns: 1fr;
  }

  .listing-description-field {
    grid-row: auto;
  }

  .workbench {
    gap: 10px;
    padding-bottom: 16px;
  }

  .portfolio-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding-bottom: 0;
  }

  .portfolio-tab {
    min-height: 44px;
    border-radius: 8px;
    padding: 0 10px;
  }

  .filter-card {
    gap: 12px;
    border-radius: 8px;
    padding: 12px;
  }

  .filter-card h2 {
    font-size: 0.95rem;
    margin-bottom: 1px;
  }

  .filter-card p {
    font-size: 0.84rem;
  }

  .filters {
    gap: 8px;
  }

  .filters label {
    font-size: var(--font-caption);
  }

  .detail-view {
    padding: 16px;
  }

  .detail-hero,
  .detail-content-grid,
  .detail-highlight {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    display: grid;
  }

  .tab-section-header {
    align-items: stretch;
    display: grid;
  }

  .edit-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .compact-edit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .side-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .side-nav a {
    min-height: 44px;
  }

  .filter-card {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }

  .filter-card > div:first-child {
    display: none;
  }

  .list-header {
    display: none;
  }

  .listing-card {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .property-list {
    gap: 8px;
  }

  .property-row {
    grid-template-columns: 1fr;
    gap: 7px;
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    padding: 12px;
  }

  .property-row::after {
    color: var(--muted);
    content: "Toque para opcoes";
    font-size: var(--font-caption);
    font-weight: 700;
    margin-top: 1px;
  }

  .property-code {
    order: -1;
  }

  .property-title {
    order: -2;
  }

  .property-code span {
    font-size: var(--font-caption);
  }

  .property-row > div {
    min-width: 0;
  }

  .mobile-field {
    display: block;
  }

  .mobile-field::before {
    display: none;
  }

  .property-name strong {
    font-size: 1rem;
  }

  .property-location {
    font-size: 0.86rem;
  }

  .value-line strong {
    font-size: 1.02rem;
  }

  .value-line strong {
    white-space: normal;
  }

  .detail-tabs {
    display: grid;
    overflow-x: visible;
  }

  .detail-tab {
    width: 100%;
  }

  .detail-line,
  .check-grid,
  .check-list {
    grid-template-columns: 1fr;
  }

  .check-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-page-actions,
  .section-title-action,
  .pipeline-list-summary {
    align-items: stretch;
    display: grid;
  }

  .pipeline-list-summary span {
    line-height: 1.35;
  }

  .pipeline-list-row {
    grid-template-columns: 1fr;
  }

  .pipeline-list-row > :not(.pipeline-property-name):not(.row-detail-action),
  .pipeline-property-name,
  .pipeline-list-row .row-detail-action {
    grid-column: 1;
    grid-row: auto;
  }

  .flow-section > summary {
    min-height: 58px;
    padding-inline: 12px;
  }

  .flow-section-content {
    padding: 12px;
  }

  .flow-checklist-item {
    align-items: stretch;
    display: grid;
  }

  .flow-checklist-item .badge {
    justify-self: start;
  }

  .checklist-status-control {
    justify-items: start;
    min-width: 0;
  }

  .checklist-status-control select {
    width: min(100%, 220px);
  }
}

/* Area comercial independente da Carteira e da captacao. */
.main-panel.commercial-mode > :not(#commercialView):not(.topbar) { display: none !important; }
#commercialView { max-width: 1100px; width: 100%; }
#commercialView [hidden] { display: none; }
#commercialView h2 { margin-top: 28px; }
.commercial-form { display: grid; gap: 12px; margin: 20px 0; max-width: 720px; }
.commercial-form label { display: grid; gap: 6px; }
.commercial-form input, .commercial-form textarea { width: 100%; padding: 10px; border: 1px solid #cbd5cf; border-radius: 6px; background: white; color: #172c25; }
.commercial-form textarea { min-height: 100px; }
.commercial-list { list-style: none; padding: 0; }
.commercial-list li { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid #dce3df; }
.commercial-list li > div { flex: 1 1 260px; overflow-wrap: anywhere; }
.commercial-list p { margin: 6px 0; }
.commercial-pagination, .commercial-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0; }
.commercial-alert { background: #fff4d7; color: #664c12; padding: 14px; margin: 12px 0; }
.commercial-error { color: #a32121; }
.commercial-text { white-space: pre-wrap; }

.commercial-stage-control { display: grid; gap: 6px; margin: 12px 0; max-width: 240px; }
.commercial-stage-control select { min-height: 44px; width: 100%; }
.commercial-move-reason { display: grid; gap: 6px; max-width: 540px; margin: 14px 0; }
.commercial-move-reason input { padding: 8px; width: 100%; }
@media (max-width: 820px) { .commercial-stage-control { max-width: 100%; } }

.commercial-timeline [data-timeline-kind="activity"] { border-left: 3px solid #417d65; padding-left: 12px; }
.commercial-timeline [data-timeline-kind="note"] { border-left: 3px solid #a5aaa7; padding-left: 12px; }

.main-panel.commercial-mode:not(.shared-module-bar) .topbar .page-title,
.main-panel.commercial-mode:not(.shared-module-bar) .topbar .global-search,
.main-panel.commercial-mode:not(.shared-module-bar) .topbar #newPropertyButton { display: none; }
.main-panel.commercial-mode:not(.shared-module-bar) .topbar { justify-content: flex-end; }
.reminder-panel { position: fixed; inset: 0 0 0 auto; width: min(440px, 100vw); padding: 24px; background: white; border-left: 1px solid #dce3df; overflow-y: auto; z-index: 1000; box-shadow: -8px 0 24px #172c2522; }
.reminder-panel[hidden] { display: none; }
#reminderBell { white-space: nowrap; }
