:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #172033;
  --muted: #667085;
  --line: #e7eaf0;
  --blue: #3370ff;
  --teal: #13c2c2;
  --green: #1f8a5f;
  --amber: #f59e0b;
  --red: #ef4444;
  --nav: #102a43;
  --nav-deep: #113a32;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: var(--blue); }

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(120deg, rgba(18, 60, 53, 0.08), rgba(51, 112, 255, 0.05) 42%, rgba(217, 173, 27, 0.08)),
    #f4f7fb;
}
.login-screen.hidden { display: none; }

.login-shell {
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(380px, 480px);
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 80px rgba(16, 42, 67, 0.16);
  backdrop-filter: blur(18px);
}

.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 44px;
  color: #fff;
  background: linear-gradient(145deg, var(--nav-deep) 0%, var(--nav) 100%);
}

.login-brand-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 46%);
  opacity: 0.72;
}

.login-brand-panel > * {
  position: relative;
  z-index: 1;
}

.login-brand-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.84);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.login-brand-topline::before {
  width: 28px;
  height: 2px;
  content: "";
  border-radius: 999px;
  background: #d9ad1b;
}

.login-brand-visual {
  display: grid;
  flex: 1;
  min-height: 460px;
  place-items: center;
  padding: 34px 0;
}

.login-hero-logo {
  display: block;
  width: min(460px, 80%);
  height: auto;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.18));
}

.login-brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
  color: rgba(255,255,255,0.64);
  font-size: 12px;
}

.login-brand-footer strong {
  color: rgba(255,255,255,0.86);
  font-size: 13px;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
}

.login-card {
  display: grid;
  width: 100%;
  max-width: 390px;
  gap: 14px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.login-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.login-form-head > div:first-child {
  display: grid;
  gap: 4px;
}

.login-form-head strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.login-form-head span {
  color: var(--muted);
  font-size: 12px;
}

.login-language-row {
  min-height: 36px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #fff;
}

.login-title-block {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.login-title-block h1 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.18;
}

.login-title-block p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.login-card label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 650;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-card input:focus {
  border-color: rgba(51,112,255,0.8);
  box-shadow: 0 0 0 4px rgba(51,112,255,0.12);
}

.login-card .primary-action {
  height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), #1f5eff);
  box-shadow: 0 16px 30px rgba(51, 112, 255, 0.24);
  font-size: 15px;
  font-weight: 800;
}

.login-card .login-hint {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width, 286px) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px 18px;
  color: #fff;
  background: linear-gradient(180deg, var(--nav-deep) 0%, var(--nav) 100%);
}

.brand, .topbar-actions, .item-top, .module-toolbar, .language-row, .language-switch, .company-module-switch {
  display: flex;
  align-items: center;
}

.brand { gap: 12px; min-width: 0; }
.logo-brand { align-items: flex-start; }
.brand-copy { min-width: 0; }
.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.brand-logo-login {
  width: min(292px, 82%);
  max-width: 292px;
  margin: 0 auto;
  filter: drop-shadow(0 10px 14px rgba(196, 142, 0, 0.13));
}
.brand-logo-sidebar {
  max-width: 222px;
  max-height: 78px;
  filter: drop-shadow(0 9px 14px rgba(0, 0, 0, 0.2));
}
.login-brand.logo-brand {
  align-items: center;
  flex-direction: column;
  gap: 9px;
  margin: -2px 0 2px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(231, 234, 240, 0.9);
  text-align: center;
}
.sidebar-brand.logo-brand {
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  padding: 0 2px;
}
.sidebar-brand .brand-copy {
  max-width: 230px;
  padding-left: 10px;
  border-left: 2px solid rgba(236, 190, 23, 0.46);
}
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.14);
  font-weight: 800;
}
.login-brand { color: var(--ink); }
.login-brand .brand-copy {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 100%;
}
.login-brand .brand-copy p { margin: 0; color: var(--muted); }
.login-brand .brand-copy h1 { max-width: 320px; font-size: 17px; line-height: 1.25; }
.sidebar-brand h1 { max-width: 220px; font-size: 15px; }
.login-brand .brand-mark { color: #fff; background: var(--green); }
.brand h1 {
  max-width: 198px;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.22;
}
.brand p, .sidebar-card p, .sidebar-card span, .login-hint {
  margin: 4px 0 0;
  color: rgba(255,255,255,0.68);
  font-size: 12px;
}
.login-hint { color: var(--muted); }

.nav { display: grid; align-content: start; gap: 8px; }
.nav-group { display: grid; gap: 4px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 12px;
  color: rgba(255,255,255,0.74);
  background: transparent;
  text-align: left;
}
.nav-item span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.1);
}
.nav-item b { flex: 1; overflow-wrap: anywhere; font-size: 15px; }
.nav-item i { color: rgba(255,255,255,0.62); font-style: normal; font-weight: 800; }
.nav-group.open > .nav-item, .nav-item.active, .nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.14);
}
.subnav { display: none; gap: 4px; padding: 2px 0 6px; }
.nav-group.open .subnav { display: grid; }
.subnav-item {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-left: 2px solid rgba(255,255,255,0.12);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0 12px 0 40px;
  color: rgba(255,255,255,0.68);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}
.subnav-item:hover, .subnav-item.active {
  border-left-color: #fff;
  color: #fff;
  background: rgba(255,255,255,0.1);
}


.sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: -6px;
  z-index: 4;
  width: 12px;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: col-resize;
  background: transparent;
}

.sidebar-resize-handle::after {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 3px;
  height: 64px;
  content: "";
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  opacity: 0.72;
}

.sidebar-resize-handle:hover::after,
body.is-sidebar-resizing .sidebar-resize-handle::after {
  background: rgba(255, 255, 255, 0.72);
  opacity: 1;
}

body.is-sidebar-resizing {
  cursor: col-resize;
  user-select: none;
}

.sidebar-card {
  margin-top: auto;
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255,255,255,0.12);
}
.sidebar-card strong { display: block; margin-top: 8px; }

.main { min-width: 0; padding: 28px; overflow: hidden; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.topbar-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}
.home-shortcut {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  color: var(--nav-deep);
  background: var(--surface);
  box-shadow: 0 7px 18px rgba(16, 42, 67, 0.08);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}
.home-shortcut svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-shortcut:hover {
  border-color: rgba(16, 42, 67, 0.32);
  color: var(--blue);
  box-shadow: 0 9px 22px rgba(16, 42, 67, 0.13);
  transform: translateY(-1px);
}
.home-shortcut:focus-visible {
  outline: 3px solid rgba(51, 112, 255, 0.24);
  outline-offset: 2px;
}
.home-shortcut[hidden] { display: none; }
.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.topbar h2 { margin: 0; font-size: 30px; line-height: 1.2; }
.topbar-actions { flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.account-module {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.language-row, .language-switch, .company-module-switch, .account-module, .user-pill, .search, .primary-action, .secondary-action, .icon-button, .link-button {
  min-height: 42px;
  border-radius: var(--radius);
}
.language-row, .language-switch, .company-module-switch, .user-pill, .search {
  border: 1px solid var(--line);
  background: var(--surface);
}
.language-row, .language-switch, .company-module-switch {
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.language-row select, .language-switch select, .company-module-switch select { width: auto; min-width: 112px; border: 0; padding: 0; outline: 0; }
.company-module-switch select { min-width: 176px; }
.user-pill { display: inline-flex; align-items: center; min-height: 42px; padding: 0 12px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.logout-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  color: #b42318;
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.18);
}
.logout-action:hover {
  background: rgba(239, 68, 68, 0.1);
}
.search { display: flex; align-items: center; gap: 8px; width: min(360px, 34vw); padding: 0 12px; }
.search input { width: 100%; border: 0; outline: 0; }

.primary-action, .secondary-action, .icon-button, .link-button {
  padding: 0 14px;
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}
.primary-action { color: #fff; background: var(--blue); border-color: var(--blue); }
.secondary-action, .icon-button { color: var(--ink); background: var(--surface); border-color: var(--line); }
.icon-button { width: 42px; padding: 0; font-size: 22px; }
.view { display: none; }
.view.active { display: block; }

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: var(--shadow);
}
.soft-label, .work-panel small, .approval-card small, .metric p, .metric-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.hero-panel h3 { max-width: 720px; margin: 10px 0; font-size: 34px; line-height: 1.16; }
.hero-panel p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.6; }
.hero-stack { display: grid; gap: 12px; }
.hero-stack article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255,255,255,0.76);
}
.hero-stack b { display: block; margin-top: 8px; font-size: 28px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric, .panel, .table-card, .contract-preview, .modal-body {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.metric { padding: 18px; }
.metric strong { display: block; margin-top: 10px; font-size: 32px; }
.metric span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.metric.warning { border-color: rgba(245,158,11,0.32); }
.metric.danger { border-color: rgba(239,68,68,0.32); }

.dashboard-layout, .module-grid, .contract-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}
.panel { padding: 18px; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-head h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.panel-head span { color: var(--muted); font-size: 12px; }
.status-bars, .timeline, .ad-list, .approval-list, .repair-list, .record-form { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 42px; align-items: center; gap: 12px; }
.bar-row label, .bar-row b { font-size: 13px; }
.bar { height: 12px; overflow: hidden; border-radius: 999px; background: #e6ebf2; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); }
.timeline-item, .ad-item, .approval-item, .repair-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-soft);
}
.item-top { justify-content: space-between; gap: 12px; }
.item-top strong { font-size: 14px; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #137333;
  background: rgba(39,174,96,0.12);
  font-size: 12px;
  font-weight: 700;
}
.tag.warn { color: #92400e; background: rgba(245,158,11,0.15); }
.tag.danger { color: #b42318; background: rgba(239,68,68,0.12); }
.status-cell {
  display: inline-flex;
  width: max-content;
}

.status-select {
  width: auto;
  min-width: 88px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  padding: 0 28px 0 10px;
  color: #137333;
  background: rgba(39,174,96,0.12);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.status-select.warn {
  color: #92400e;
  background: rgba(245,158,11,0.15);
}

.status-select.danger {
  color: #b42318;
  background: rgba(239,68,68,0.12);
}

.status-select:disabled {
  cursor: wait;
  opacity: 0.72;
}

.staff-row-disabled td {
  background: rgba(245,158,11,0.04);
}

.staff-row-deleted td {
  color: #64748b;
  background: rgba(239,68,68,0.04);
}

.module-toolbar { justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.segmented { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.segmented button { min-height: 40px; border: 0; border-right: 1px solid var(--line); padding: 0 14px; background: transparent; }
.segmented button:last-child { border-right: 0; }
.segmented button.active { color: #fff; background: var(--blue); }

.property-company-bar {
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.property-company-bar[hidden] { display: none; }
.property-company-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.property-company-head strong {
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}
.property-company-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}
.property-company-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.property-company-tab {
  min-height: 31px;
  border: 1px solid #d8dee9;
  border-radius: 999px;
  padding: 0 11px;
  color: #344054;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.property-company-tab:hover {
  color: #172033;
  background: #f3f6fb;
}
.property-company-tab.active {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
  box-shadow: 0 12px 26px rgba(51, 112, 255, 0.14);
}
.property-company-tab small {
  margin-left: 5px;
  opacity: .82;
  font-size: 11px;
  font-weight: 850;
}
.property-hierarchy-bar {
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.property-hierarchy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}
.property-hierarchy-grid label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 850;
}
.property-hierarchy-grid label span {
  color: var(--muted);
  line-height: 1.35;
  text-transform: uppercase;
}
.property-hierarchy-path {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  color: #344054;
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 850;
}

.status-note {
  display: block;
  margin-top: 4px;
  color: #8b95a7;
  font-size: 11px;
  line-height: 1.35;
}
.table-card { overflow: auto; }
table { width: 100%; min-width: 980px; border-collapse: collapse; }
.resizable-table { table-layout: fixed; }
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; }
td { font-size: 14px; }
.property-name-cell { min-width: 360px; max-width: 680px; }
.property-title {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.32;
}
.property-subline,
.property-address-muted {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.property-address-muted {
  max-width: 760px;
  overflow: hidden;
  color: #8b95a7;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resizable-header {
  position: relative;
  overflow-wrap: anywhere;
  user-select: none;
}
.column-resize-handle {
  position: absolute;
  top: 0;
  right: -5px;
  z-index: 5;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}
.column-resize-handle::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 4px;
  width: 2px;
  height: calc(100% - 24px);
  border-radius: 999px;
  background: transparent;
}
.column-resize-handle:hover::after,
.is-column-resizing .column-resize-handle::after {
  background: var(--blue);
}
body.is-resizing-column {
  cursor: col-resize;
  user-select: none;
}
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 150px; }
.link-button { min-height: 30px; padding: 0 9px; border-color: var(--line); color: var(--blue); background: var(--surface); font-size: 12px; }
.role-title-text { display: inline-block; min-width: 90px; color: var(--ink); font-weight: 800; overflow-wrap: anywhere; }
.editable-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 6px 9px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}
.editable-role span { font-weight: 800; overflow-wrap: anywhere; }
.editable-role i { flex: 0 0 auto; color: var(--blue); font-size: 11px; font-style: normal; font-weight: 800; opacity: 0.76; }
.editable-role:hover { border-color: var(--line); background: var(--surface-soft); }
.role-editor { display: grid; gap: 8px; min-width: 170px; max-width: 230px; }
.role-title-input { min-width: 160px; padding: 8px 10px; font-weight: 800; }
.role-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.role-editor-actions .primary-action,
.role-editor-actions .secondary-action { min-height: 32px; padding: 0 10px; font-size: 12px; }
#staff table { min-width: 1320px; }
#staff th:nth-child(5),
#staff td:nth-child(5) { min-width: 360px; }
.responsibility-summary {
  display: grid;
  gap: 10px;
  max-width: 460px;
}
.responsibility-group {
  display: grid;
  gap: 6px;
}
.responsibility-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #14532d;
  background: rgba(39,174,96,0.12);
  font-size: 12px;
  font-weight: 900;
}
.responsibility-group ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: #263449;
  line-height: 1.45;
}
.responsibility-group li { padding-left: 2px; }
.scope-basis {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}
.danger-text { color: var(--red); }


.staff-toolbar > div {
  display: grid;
  gap: 4px;
}

.staff-toolbar h3 {
  margin: 0;
  font-size: 18px;
}

.staff-toolbar span {
  color: var(--muted);
  font-size: 13px;
}

.field-wide {
  grid-column: 1 / -1;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.field-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 11px; color: var(--ink); background: var(--surface); }
textarea { min-height: 110px; resize: vertical; }
.upload-zone { margin-top: 16px; border: 1px dashed #b8c4ba; border-radius: var(--radius); padding: 18px; background: var(--surface-soft); }
.upload-zone p { margin: 8px 0 0; color: var(--muted); }
.contract-workflow-panel { display: grid; gap: 14px; }
.compact-workflow-form { margin-top: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.compact-workflow-form > strong { display: block; margin-bottom: 10px; }
.contract-preview { position: relative; min-height: 420px; padding: 30px; background: #fffdfa; }
.contract-preview h3 { margin: 0 0 28px; text-align: center; font-size: 24px; }
.stamp { position: absolute; right: 26px; bottom: 68px; display: grid; width: 128px; height: 128px; place-items: center; border: 3px solid rgba(239,68,68,0.55); border-radius: 50%; color: rgba(239,68,68,0.76); font-size: 13px; font-weight: 900; text-align: center; }
.signature { position: absolute; left: 30px; bottom: 50px; width: 210px; padding-top: 18px; border-top: 1px solid var(--ink); color: var(--muted); }
.photo-strip { display: grid; grid-template-columns: repeat(3, 62px); gap: 8px; }
.photo-box { display: grid; min-height: 42px; place-items: center; border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, var(--green), var(--blue)); font-size: 11px; text-align: center; }

.modal { width: min(920px, calc(100vw - 28px)); max-height: calc(100vh - 40px); padding: 0; border: 0; background: transparent; }
.modal::backdrop { background: rgba(15,23,42,0.48); }
.modal-body { display: grid; gap: 14px; max-height: calc(100vh - 40px); overflow: auto; padding: 22px; }
.detail-grid p { display: grid; gap: 6px; min-height: 64px; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface-soft); }
.detail-grid b { color: var(--muted); font-size: 12px; }
.detail-grid span { overflow-wrap: anywhere; font-size: 14px; }
.error-text { min-height: 18px; margin: 0; color: var(--red); font-size: 13px; }

.module-placeholder .panel { min-height: 360px; }
.module-placeholder p { max-width: 780px; color: var(--muted); line-height: 1.7; }
.module-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.module-cards article { min-height: 126px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface-soft); }
.module-cards b { display: block; margin-bottom: 10px; }
.module-cards p { margin: 0; font-size: 13px; }

.lock-notice { border: 1px solid rgba(245,158,11,0.35); border-radius: var(--radius); padding: 14px; background: rgba(245,158,11,0.1); }
.lock-notice strong { display: block; margin-bottom: 6px; color: #92400e; }
.lock-notice p { margin: 0; color: var(--muted); line-height: 1.55; }
.reconciliation-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.reconciliation-summary article { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface-soft); }
.reconciliation-summary span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.reconciliation-summary b { display: block; margin-top: 8px; font-size: 24px; }
.process-rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.process-rule-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-soft);
}

.process-rule-card p {
  margin: 0;
  color: #263449;
  line-height: 1.55;
}

.process-rule-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.process-rule-meta span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(255,255,255,0.76);
  font-size: 12px;
}

.process-rule-meta b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.task-panel { min-height: 520px; }
.task-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.task-summary article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface-soft);
}
.task-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.task-summary b {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}
.task-list {
  display: grid;
  gap: 12px;
}
.task-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 15px;
  background: var(--surface-soft);
}
.task-card.overdue,
.task-card.rejected { border-left-color: var(--red); }
.task-card.approval,
.task-card.dueSoon,
.task-card.dueToday,
.task-card.upcoming { border-left-color: #f59e0b; }
.task-card.completed { border-left-color: var(--green); }
.task-card p {
  margin: 0;
  color: #263449;
  line-height: 1.55;
}
.task-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.task-meta span {
  display: grid;
  gap: 4px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  background: rgba(255,255,255,0.72);
  overflow-wrap: anywhere;
}
.task-meta b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.task-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.task-assignment {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.task-assignment select {
  min-width: 150px;
  max-width: 220px;
}
.task-events {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.task-calendar-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.task-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.task-calendar-navigation,
.task-calendar-scope {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-calendar-navigation > strong {
  min-width: 118px;
  text-align: center;
}

.task-calendar-nav-button {
  min-width: 36px;
  padding-inline: 10px;
  font-size: 20px;
}

.task-calendar-scope {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  background: var(--surface-soft);
}

.task-calendar-scope button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.task-calendar-scope button[aria-pressed="true"] {
  color: #fff;
  background: var(--nav-deep);
}

.task-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
}

.task-calendar-board {
  min-width: 0;
  overflow-x: auto;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.task-calendar-weekdays,
.task-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(105px, 1fr));
  min-width: 735px;
}

.task-calendar-weekdays span {
  padding: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.task-calendar-grid {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.task-calendar-day {
  min-height: 142px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 7px;
  background: var(--surface);
}

.task-calendar-day.outside {
  background: #f8fafc;
}

.task-calendar-day.today {
  background: #fff8ef;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .45);
}

.task-calendar-date {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.task-calendar-day.outside .task-calendar-date { color: #98a2b3; }
.task-calendar-day.today .task-calendar-date { color: #fff; background: var(--amber); }

.task-calendar-items {
  display: grid;
  gap: 5px;
  margin-top: 4px;
}

.task-calendar-item {
  position: relative;
  display: grid;
  gap: 2px;
  width: 100%;
  overflow: hidden;
  border: 1px solid #dce8e1;
  border-radius: 7px;
  padding: 6px 6px 6px 9px;
  color: var(--ink);
  background: #f0f7f3;
  text-align: left;
}

.task-calendar-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: var(--blue);
}

.task-calendar-item.warning::before { background: var(--amber); }
.task-calendar-item.danger::before { background: var(--red); }
.task-calendar-item.done::before { background: var(--green); }
.task-calendar-item:hover { border-color: #9fc1ae; box-shadow: 0 6px 14px rgba(15, 23, 42, .09); }
.task-calendar-item small,
.task-calendar-item b,
.task-calendar-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-calendar-item small { color: var(--green); font-size: 9px; font-weight: 900; }
.task-calendar-item b { font-size: 11px; }
.task-calendar-item span { color: var(--muted); font-size: 9px; }
.task-calendar-more { color: var(--muted); font-size: 10px; font-weight: 800; }

.task-calendar-agenda { padding: 16px; }
.task-calendar-agenda-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.task-calendar-agenda-head small { color: var(--amber); font-weight: 900; }
.task-calendar-agenda-head h4 { margin: 3px 0 0; font-size: 17px; }
.task-calendar-agenda-head > span { display: grid; min-width: 30px; height: 30px; place-items: center; border-radius: 8px; color: #9a5b08; background: #fff4df; font-size: 12px; font-weight: 900; }
.task-calendar-selected { border-radius: var(--radius); padding: 13px; background: var(--surface-soft); }
.task-calendar-selected p { margin: 9px 0; color: #344054; font-size: 12px; line-height: 1.5; }
.task-calendar-selected dl { display: grid; gap: 7px; margin: 0 0 11px; }
.task-calendar-selected dl div { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px; }
.task-calendar-selected dt { color: var(--muted); font-size: 10px; font-weight: 800; }
.task-calendar-selected dd { margin: 0; overflow-wrap: anywhere; font-size: 11px; }
.task-calendar-agenda-list { display: grid; gap: 4px; margin-top: 10px; }
.task-calendar-agenda-list button { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; align-items: center; width: 100%; border: 0; border-radius: 7px; padding: 7px; color: var(--ink); background: transparent; text-align: left; }
.task-calendar-agenda-list button:hover,
.task-calendar-agenda-list button.active { background: #eef4f0; }
.task-calendar-agenda-list time { color: var(--amber); font-size: 10px; font-weight: 900; }
.task-calendar-agenda-list b,
.task-calendar-agenda-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-calendar-agenda-list b { font-size: 11px; }
.task-calendar-agenda-list small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.task-list-details { margin-top: 16px; }
.task-list-details > summary { margin-bottom: 12px; color: var(--nav-deep); font-size: 13px; font-weight: 900; cursor: pointer; }
.task-events summary {
  width: fit-content;
  cursor: pointer;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.task-events ol {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 22px;
}
.task-events li {
  padding-left: 4px;
}
.task-events li b,
.task-events li span,
.task-events li small {
  display: block;
}
.task-events li span,
.task-events li small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.notification-channel-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  min-height: 42px;
}
.provider-state {
  font-size: 16px !important;
}
.provider-state.ready {
  color: var(--green);
}
.provider-state.waiting {
  color: #b45309;
}
#notificationProviderCards small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.module-search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 420px) auto auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.module-search-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.module-search-copy strong {
  font-size: 14px;
}

.module-search-copy span,
.module-search-count {
  color: var(--muted);
  font-size: 12px;
}

.module-search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: var(--surface);
}

.module-search-icon {
  position: relative;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  opacity: 0.72;
}

.module-search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
  transform: rotate(45deg);
}

.module-search-input input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.module-search-clear {
  min-height: 40px;
}

.module-search-empty {
  margin: -2px 0 14px;
}

.hidden,
.search-hidden {
  display: none !important;
}
.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
  font-weight: 800;
}

.edoc-center-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0;
}

.edoc-center-summary article {
  position: relative;
  overflow: hidden;
}

.edoc-center-summary article::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #22c55e);
}

.edoc-center-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 0.8fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.edoc-center-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.edoc-center-toolbar label > span,
.edoc-filter-result {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.edoc-center-toolbar input,
.edoc-center-toolbar select {
  width: 100%;
  min-width: 0;
}

.edoc-filter-result {
  grid-column: 1 / -1;
}

.edoc-register-table table {
  min-width: 1180px;
}

.edoc-register-actions {
  display: grid;
  gap: 8px;
  justify-items: start;
}

@media (max-width: 1100px) {
  .edoc-center-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edoc-center-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .edoc-center-toolbar,
  .edoc-center-summary { grid-template-columns: 1fr; }
}



.property-facility-field {
  display: grid;
  gap: 12px;
}

.facility-field-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-end;
}

.facility-field-head > span,
.facility-selected-panel > strong,
.facility-custom-panel > strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.facility-field-head small,
.facility-custom-panel p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.facility-picker-module {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  display: grid;
  gap: 14px;
  padding: 14px;
}

.facility-add-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 150px) auto;
  gap: 10px;
  align-items: end;
}

.facility-add-row label,
.facility-selected-item label {
  margin: 0;
}

.facility-add-row .secondary-action {
  min-height: 44px;
  white-space: nowrap;
}

.facility-selected-panel,
.facility-custom-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding-top: 14px;
}

.facility-selected-list {
  display: grid;
  gap: 8px;
}

.facility-selected-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 1fr) minmax(100px, 130px) auto;
  padding: 10px;
}

.facility-selected-item > span {
  color: var(--text);
  font-weight: 900;
}

.facility-selected-item input {
  height: 36px;
}

.facility-selected-item .danger-text {
  justify-self: end;
}

.facility-custom-panel.disabled {
  background: #f8fafc;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
}

.empty-state.compact {
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
}
@media (max-width: 1100px) {
  .app-shell, .hero-panel, .dashboard-layout, .module-grid, .contract-layout, .field-grid, .detail-grid, .facility-add-row, .facility-selected-item { grid-template-columns: 1fr; }
  .app-shell { --sidebar-width: auto; }
  .sidebar-resize-handle { display: none; }
  .sidebar-card { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar, .topbar-actions, .module-toolbar { align-items: stretch; flex-direction: column; }
  .topbar-actions { justify-content: flex-start; }
  .account-module { justify-content: space-between; width: 100%; }
  .account-module .user-pill { flex: 1; }
  .search { width: 100%; }
  .task-calendar-layout { grid-template-columns: 1fr; }
  .task-calendar-board { border-right: 0; border-bottom: 1px solid var(--line); }
  .module-search { grid-template-columns: 1fr; align-items: stretch; }
  .module-search-count { justify-self: start; }
}

@media (max-width: 760px) {
  .login-screen { padding: 16px; }
  .login-shell { grid-template-columns: 1fr; min-height: auto; }
  .login-brand-panel { min-height: 360px; padding: 28px; }
  .login-brand-visual { min-height: 220px; padding: 22px 0; }
  .login-panel { padding: 30px 22px; }
  .login-form-head { align-items: flex-start; flex-direction: column; }
  .main, .sidebar { padding: 18px 14px; }
  .metric-grid, .module-cards, .reconciliation-summary, .task-summary, .task-meta { grid-template-columns: 1fr; }
  .task-actions { align-items: stretch; }
  .task-assignment { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .task-assignment select { flex: 1; min-width: 140px; max-width: none; }
  .task-calendar-toolbar { align-items: stretch; flex-direction: column; }
  .task-calendar-navigation { flex-wrap: wrap; }
  .task-calendar-navigation > strong { flex: 1; }
  .task-calendar-scope { width: 100%; }
  .task-calendar-scope button { flex: 1; }
  .task-calendar-day { min-height: 128px; }
  .hero-panel h3 { font-size: 26px; }
  .topbar h2 { font-size: 24px; }
  .metric strong { font-size: 28px; }
  .subnav { padding-left: 0; }
}
.finance-grid {
  align-items: start;
}

.report-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}


.client-info-layout {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.client-record-form input[type="file"] {
  height: auto;
  padding: 10px 12px;
  background: #fff;
}

.client-record-form small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.document-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.document-chip {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  color: #334155;
  background: #eef2f7;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-empty-row td {
  color: var(--muted);
  text-align: center;
}

.form-status.error {
  color: var(--red);
}
.form-status {
  min-height: 18px;
  margin: 0;
  color: #137333;
  font-size: 13px;
  font-weight: 700;
}

.compact-table small {
  color: var(--muted);
  line-height: 1.5;
}

.workflow-assignment-panel {
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid #cfd8e6;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}
.workflow-assignment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.workflow-assignment-head h4 { margin: 0 0 6px; font-size: 17px; }
.workflow-assignment-head p { margin: 0; color: var(--muted); font-size: 13px; }
.workflow-assignment-table select { min-width: 150px; }
.workflow-assignment-table td:first-child { min-width: 220px; }
.workflow-assignment-table td:first-child small { display: block; margin-top: 3px; }

@media (max-width: 900px) {
  .workflow-assignment-head { flex-direction: column; }
  .company-module-switch { width: 100%; }
  .company-module-switch select { flex: 1; min-width: 0; }
}


@media (max-width: 1100px) {
  .report-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .report-summary {
    grid-template-columns: 1fr;
  }
}


.permission-cell {
  display: grid;
  gap: 10px;
  min-width: 320px;
}

.permission-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.permission-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: 6px 10px;
  color: #314155;
  background: #eef2f7;
  font-size: 12px;
  line-height: 1.35;
}

.permission-pill.strong {
  color: #137333;
  background: rgba(39,174,96,0.12);
  font-weight: 800;
}

.muted-text {
  color: var(--muted);
}

.permission-row td {
  padding: 0;
  background: #fbfcff;
}

.permission-editor {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

.permission-editor-head,
.permission-footer,
.permission-catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.permission-editor-head div:first-child,
.permission-catalog-head {
  display: grid;
  align-items: start;
  justify-content: start;
}

.permission-editor-head span,
.permission-catalog-head span {
  color: var(--muted);
  font-size: 12px;
}

.permission-actions,
.permission-footer {
  flex-wrap: wrap;
}

.permission-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.permission-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.permission-group summary {
  min-height: 42px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-weight: 800;
}

.permission-options {
  display: grid;
}

.permission-option {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  color: var(--ink);
  font-size: 13px;
}

.permission-option:last-child {
  border-bottom: 0;
}

.permission-option input {
  width: auto;
  margin-top: 2px;
  accent-color: var(--blue);
}

.permission-option span {
  display: grid;
  gap: 3px;
}

.permission-option small {
  color: var(--muted);
}

.permission-option.readonly {
  background: var(--surface-soft);
}

.permission-catalog {
  display: grid;
  gap: 14px;
}


@media (max-width: 1100px) {
  .permission-groups {
    grid-template-columns: 1fr;
  }

  .permission-editor-head,
  .permission-footer,
  .permission-catalog-head {
    align-items: stretch;
    flex-direction: column;
  }
}



.attachment-native-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attachment-uploader {
  display: grid;
  gap: 10px;
  border: 1px dashed #b7c4d7;
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  outline: none;
}

.attachment-uploader:focus,
.attachment-uploader:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79,100,255,0.12);
}

.attachment-uploader-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.attachment-uploader-main div {
  display: grid;
  gap: 4px;
}

.attachment-uploader-main strong {
  color: var(--ink);
  font-size: 13px;
}

.attachment-uploader-main span,
.attachment-inline-list > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.attachment-inline-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}

.attachment-pill,
.attachment-remove,
.attachment-preview-chip {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.attachment-pill {
  display: inline-flex;
  align-items: center;
  max-width: 240px;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: #1f3a5f;
  background: #eaf0ff;
  font-size: 12px;
  font-weight: 800;
}

.attachment-pill span,
.attachment-preview-chip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-remove {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: #64748b;
  background: #eef2f7;
  font-weight: 900;
}

.attachment-preview-chip {
  max-width: 220px;
  text-align: left;
}

.attachment-preview-modal {
  width: min(1080px, calc(100vw - 28px));
}

.attachment-preview-body {
  min-height: min(720px, calc(100vh - 64px));
  grid-template-rows: auto minmax(0, 1fr);
}

.attachment-preview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.attachment-preview-head h3 {
  margin: 0;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.attachment-preview-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.attachment-preview-actions {
  display: flex;
  gap: 8px;
}

.attachment-download {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  font-size: 20px;
}

.attachment-download.disabled {
  pointer-events: none;
  opacity: 0.42;
}

.attachment-preview-content {
  display: grid;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.attachment-preview-content img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  margin: auto;
  object-fit: contain;
}

.attachment-preview-content iframe {
  width: 100%;
  height: min(640px, calc(100vh - 220px));
  border: 0;
  background: #fff;
}

.attachment-preview-content pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  color: var(--ink);
  background: #fff;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.attachment-preview-empty,
.attachment-file-card {
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.attachment-file-card strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}
.client-row-actions {
  min-width: 142px;
  justify-content: center;
}

.client-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 30px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  background: #2563eb;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(37,99,235,0.16);
}

.client-edit-button:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.client-cancel-edit {
  margin-left: 8px;
}
.client-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 30px;
  border: 1px solid #dc2626;
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  background: #dc2626;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(220,38,38,0.18);
}

.client-delete-button:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.client-delete-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.readonly-action {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 8px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}
.empty-attachment {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  color: #64748b;
  background: #eef2f7;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.client-info-layout .table-card th:last-child,
.client-info-layout .table-card td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -10px 0 18px rgba(15, 23, 42, 0.08);
}

.client-info-layout .table-card th:last-child {
  z-index: 3;
  background: #f8fafc;
}
.record-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.record-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.record-action-primary,
.record-action-edit {
  border-color: #2563eb;
  color: #fff;
  background: #2563eb;
  box-shadow: 0 8px 16px rgba(37,99,235,0.16);
}

.record-action-primary:hover,
.record-action-edit:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.record-action-danger,
.record-action-delete,
.record-action-reject {
  border-color: #dc2626;
  color: #fff;
  background: #dc2626;
  box-shadow: 0 8px 16px rgba(220,38,38,0.18);
}

.record-action-danger:hover,
.record-action-delete:hover,
.record-action-reject:hover {
  border-color: #b91c1c;
  background: #b91c1c;
}

.record-action-success,
.record-action-approve {
  border-color: #059669;
  color: #fff;
  background: #059669;
  box-shadow: 0 8px 16px rgba(5,150,105,0.16);
}

.record-action-success:hover,
.record-action-approve:hover {
  border-color: #047857;
  background: #047857;
}

.record-action-neutral,
.record-action-view {
  border-color: #cbd5e1;
  color: #334155;
  background: #fff;
}

.record-action-button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.page-tabbed-panel,
.page-tab-panels,
.page-tab-panel.active {
  display: grid;
  gap: 16px;
}

.page-tabs {
  align-items: flex-end;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 28px;
  min-height: 44px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.page-view-tabs {
  margin-bottom: 14px;
}

.page-tab-button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  min-height: 42px;
  padding: 0 2px 12px;
  position: relative;
  white-space: nowrap;
}

.page-tab-button:hover,
.page-tab-button.active {
  color: #1d4ed8;
}

.page-tab-button.active::after {
  background: #2563eb;
  border-radius: 999px 999px 0 0;
  bottom: -1px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
}

.page-tab-panel {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
}

.page-tab-panel[hidden] {
  display: none !important;
}

.compact-head {
  margin-bottom: 0;
}

.lease-flow-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.lease-flow-list article {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-soft);
}

.lease-flow-list b {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.lease-flow-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .page-tabs {
    gap: 18px;
  }

  .lease-flow-list {
    grid-template-columns: 1fr;
  }
}.approval-workflow-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  align-items: start;
}
.approval-workflow-form,
.approval-workflow-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-soft);
}
.approval-form-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.approval-form-head h4 {
  margin: 0 0 4px;
  font-size: 16px;
}
.approval-form-head span,
.approval-workflow-form small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.approval-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.approval-form-actions .form-status {
  min-height: 20px;
  margin: 0;
  color: var(--green);
  font-size: 13px;
}
.approval-form-actions .form-status.error {
  color: var(--red);
}
.approval-workflow-card {
  border-left: 4px solid #f59e0b;
  background: #fff;
}
.approval-workflow-card.approved { border-left-color: var(--green); }
.approval-workflow-card.rejected { border-left-color: var(--red); }
.approval-workflow-card p {
  margin: 0;
  color: #263449;
  line-height: 1.55;
}
.approval-flow-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.approval-flow-line span,
.approval-note,
.approval-attachments {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(248,250,252,0.9);
  overflow-wrap: anywhere;
}
.approval-flow-line b,
.approval-note b,
.approval-attachments b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.approval-decision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.compact-action {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}
.danger-action {
  color: #b42318;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}
.approval-decision-modal .modal-body {
  width: min(620px, calc(100vw - 28px));
}
.cleaning-approval-form {
  background: transparent;
  border: 0;
  padding: 0;
  gap: 16px;
}

.cleaning-form-intro,
.cleaning-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.cleaning-section {
  display: grid;
  gap: 14px;
}

.cleaning-section-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.cleaning-section-head h4 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--ink);
}

.cleaning-section-head span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.55;
}

.step-pill {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #d8eaff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  min-height: 28px;
  padding: 0 10px;
}

.cleaning-area-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.area-check {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  gap: 7px;
  min-height: 96px;
  padding: 12px;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.area-check input {
  height: 16px;
  width: 16px;
}

.area-check strong {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.area-check small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.area-check:has(input:checked) {
  background: #edfdf7;
  border-color: #78d6a4;
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.08);
}

.photo-zone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.photo-zone-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.photo-zone-card.is-disabled {
  background: #f8fafc;
  opacity: 0.68;
}

.photo-zone-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.photo-zone-head b {
  color: var(--ink);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.photo-requirement {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
}

.photo-upload-box {
  align-content: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 12px;
}

.photo-upload-box b {
  color: var(--ink);
  font-size: 13px;
}

.photo-upload-box input {
  width: 100%;
}

.approval-footer {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  padding-top: 14px;
}

.approval-submit-stack {
  align-items: end;
  display: grid;
  gap: 8px;
}

.approval-submit-stack .form-status {
  color: var(--green);
  font-size: 13px;
  margin: 0;
  min-height: 18px;
  text-align: right;
}

.approval-submit-stack .form-status.error {
  color: var(--red);
}

.cleaning-meta-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cleaning-meta-summary span {
  background: rgba(248,250,252,0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 8px 10px;
}

.cleaning-meta-summary b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .cleaning-area-grid,
  .photo-zone-grid,
  .cleaning-meta-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .cleaning-section-head,
  .photo-zone-head,
  .approval-footer {
    grid-template-columns: 1fr;
  }

  .cleaning-section-head,
  .photo-zone-head {
    display: grid;
  }

  .cleaning-area-grid,
  .photo-zone-grid,
  .cleaning-meta-summary {
    grid-template-columns: 1fr;
  }

  .approval-submit-stack {
    align-items: stretch;
  }

  .approval-submit-stack .form-status {
    text-align: left;
  }
}
@media (max-width: 980px) {
  .approval-workflow-layout,
  .approval-flow-line {
    grid-template-columns: 1fr;
  }
}
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
}

.pipeline-column {
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.pipeline-column .item-top {
  margin-bottom: 10px;
}

.pipeline-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.pipeline-card strong,
.pipeline-card span,
.pipeline-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.date-time-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  align-items: center;
}

.date-time-pair input {
  width: 100%;
  min-width: 0;
}

@media (max-width: 640px) {
  .date-time-pair {
    grid-template-columns: 1fr;
  }
}
.flow-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.flow-strip article {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.flow-strip article span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #102a43;
  background: rgba(217, 173, 27, 0.18);
  font-size: 12px;
  font-weight: 900;
}

.flow-strip article b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.35;
}

.lead-flow-layout {
  align-items: start;
}

.flow-worklog-panel {
  margin-bottom: 14px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

@media (max-width: 1180px) {
  .flow-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .flow-strip { grid-template-columns: 1fr; }
}
.account-security-cell {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.security-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.security-badges small {
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.security-badge,
.audit-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #334155;
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.security-badge.ok {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.2);
}

.security-badge.warn {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.22);
}

.security-badge.danger {
  color: #b42318;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
}

.security-reset-button {
  justify-self: start;
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(37, 99, 235, 0.06);
}

.audit-log-panel {
  display: grid;
  gap: 14px;
}

.audit-filter-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) minmax(220px, 1.4fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.audit-filter-bar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.audit-filter-bar input,
.audit-filter-bar select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
}

.audit-search-field input {
  min-width: 220px;
}

.audit-chip.action {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.08);
}

.audit-detail-cell {
  min-width: 220px;
  max-width: 520px;
  overflow-wrap: anywhere;
  color: #334155;
}

.checkbox-line {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
}

.checkbox-line input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

@media (max-width: 1180px) {
  .audit-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .audit-filter-bar {
    grid-template-columns: 1fr;
  }
  .audit-search-field input {
    min-width: 0;
  }
}
/* Staff access redesign */
.staff-card-layout {
  display: grid;
  grid-template-columns: minmax(340px, 424px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.staff-card-list-panel,
.staff-detail-panel {
  padding: 0;
  overflow: hidden;
}

.staff-card-list-head,
.staff-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 18px;
}

.staff-card-list-head h3,
.staff-detail-title h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.staff-card-list-head span,
.staff-detail-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.staff-count-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--blue);
  background: rgba(51, 112, 255, 0.09);
  font-size: 12px;
  font-weight: 900;
}

.staff-card-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  background: var(--surface);
}

.staff-card-list {
  display: grid;
  gap: 10px;
  height: var(--staff-card-list-height, min(620px, calc(100vh - 286px)));
  min-height: 260px;
  overflow: auto;
  padding: 14px 12px;
  background: var(--surface-soft);
}

.staff-card-list-resize-handle {
  display: grid;
  width: 100%;
  height: 22px;
  place-items: center;
  border: 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #eef3f9);
  cursor: row-resize;
}

.staff-card-list-resize-handle::before {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  border-radius: 999px;
  background: #9aa7b8;
}

.staff-card-list-resize-handle:hover::before,
body.is-staff-list-resizing .staff-card-list-resize-handle::before {
  background: var(--blue);
}

body.is-staff-list-resizing,
body.is-window-resizing {
  cursor: row-resize;
  user-select: none;
}

.staff-card,
.staff-detail-panel {
  --staff-tone: #3370ff;
  --staff-tone-soft: rgba(51, 112, 255, 0.1);
  --staff-tone-pale: rgba(51, 112, 255, 0.08);
  --staff-tone-ink: #1d4ed8;
  --staff-avatar-bg: #172033;
}

.staff-card {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 4px solid var(--staff-tone);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink);
  background: linear-gradient(90deg, var(--staff-tone-pale), var(--surface) 34%);
  text-align: left;
}

.staff-card:hover,
.staff-card.active {
  border-color: var(--staff-tone);
  box-shadow: 0 0 0 3px var(--staff-tone-soft);
}

.staff-card-main,
.staff-detail-identity {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.staff-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  background: var(--staff-avatar-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  font-weight: 900;
}

.staff-card .role-tone-pill {
  color: var(--staff-tone-ink);
  background: var(--staff-tone-soft);
}

.staff-card .staff-no-pill {
  color: #475569;
  background: #eef2f7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

.staff-card[data-role-tone="admin"],
.staff-detail-panel[data-role-tone="admin"] {
  --staff-tone: #3370ff;
  --staff-tone-soft: rgba(51, 112, 255, 0.14);
  --staff-tone-pale: rgba(51, 112, 255, 0.06);
  --staff-tone-ink: #1d4ed8;
  --staff-avatar-bg: #172033;
}

.staff-card[data-role-tone="executive"],
.staff-detail-panel[data-role-tone="executive"] {
  --staff-tone: #4f46e5;
  --staff-tone-soft: rgba(79, 70, 229, 0.13);
  --staff-tone-pale: rgba(79, 70, 229, 0.055);
  --staff-tone-ink: #3730a3;
  --staff-avatar-bg: #252154;
}

.staff-card[data-role-tone="board"],
.staff-detail-panel[data-role-tone="board"] {
  --staff-tone: #0f766e;
  --staff-tone-soft: rgba(15, 118, 110, 0.13);
  --staff-tone-pale: rgba(15, 118, 110, 0.055);
  --staff-tone-ink: #0f766e;
  --staff-avatar-bg: #153f3b;
}

.staff-card[data-role-tone="management"],
.staff-detail-panel[data-role-tone="management"] {
  --staff-tone: #c77700;
  --staff-tone-soft: rgba(199, 119, 0, 0.14);
  --staff-tone-pale: rgba(199, 119, 0, 0.055);
  --staff-tone-ink: #92400e;
  --staff-avatar-bg: #4a3216;
}

.staff-card[data-role-tone="finance"],
.staff-detail-panel[data-role-tone="finance"] {
  --staff-tone: #15803d;
  --staff-tone-soft: rgba(21, 128, 61, 0.13);
  --staff-tone-pale: rgba(21, 128, 61, 0.052);
  --staff-tone-ink: #166534;
  --staff-avatar-bg: #193c2a;
}

.staff-card[data-role-tone="market"],
.staff-detail-panel[data-role-tone="market"] {
  --staff-tone: #ea8a00;
  --staff-tone-soft: rgba(234, 138, 0, 0.14);
  --staff-tone-pale: rgba(234, 138, 0, 0.055);
  --staff-tone-ink: #b45309;
  --staff-avatar-bg: #4a3518;
}

.staff-card[data-role-tone="compliance"],
.staff-detail-panel[data-role-tone="compliance"] {
  --staff-tone: #7c3aed;
  --staff-tone-soft: rgba(124, 58, 237, 0.13);
  --staff-tone-pale: rgba(124, 58, 237, 0.052);
  --staff-tone-ink: #5b21b6;
  --staff-avatar-bg: #312158;
}

.staff-card[data-role-tone="operations"],
.staff-detail-panel[data-role-tone="operations"] {
  --staff-tone: #0891b2;
  --staff-tone-soft: rgba(8, 145, 178, 0.13);
  --staff-tone-pale: rgba(8, 145, 178, 0.052);
  --staff-tone-ink: #0e7490;
  --staff-avatar-bg: #163e4a;
}

.staff-card[data-role-tone="cleaning"],
.staff-detail-panel[data-role-tone="cleaning"] {
  --staff-tone: #22a06b;
  --staff-tone-soft: rgba(34, 160, 107, 0.14);
  --staff-tone-pale: rgba(34, 160, 107, 0.055);
  --staff-tone-ink: #047857;
  --staff-avatar-bg: #173f31;
}

.staff-card[data-role-tone="repair"],
.staff-detail-panel[data-role-tone="repair"] {
  --staff-tone: #0d9488;
  --staff-tone-soft: rgba(13, 148, 136, 0.13);
  --staff-tone-pale: rgba(13, 148, 136, 0.052);
  --staff-tone-ink: #0f766e;
  --staff-avatar-bg: #173f3d;
}

.staff-card-name strong,
.staff-detail-title h3 {
  overflow-wrap: anywhere;
}

.staff-card-name small,
.staff-card-foot,
.staff-muted-line {
  color: var(--muted);
  font-size: 12px;
}

.staff-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.staff-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.staff-detail-identity {
  grid-template-columns: 56px minmax(0, 1fr);
}

.staff-detail-identity .staff-avatar {
  width: 56px;
  height: 56px;
  font-size: 18px;
}

.staff-detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.staff-detail-tabs {
  border-bottom: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.staff-detail-tabs button {
  min-height: 46px;
}

.staff-detail-body {
  padding: 18px;
}

.staff-detail-section[hidden] {
  display: none;
}

.staff-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.staff-detail-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-soft);
}

.staff-detail-stat b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
}

.staff-detail-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.staff-readonly-field {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 11px;
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.staff-position-editor {
  display: grid;
  gap: 12px;
}

.staff-position-editor .role-editor {
  max-width: none;
}

.staff-position-editor .role-title-input {
  width: 100%;
}

.staff-permission-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
}

.staff-detail-permission-editor .permission-groups {
  gap: 10px;
}

.staff-detail-permission-editor .permission-group:not([open]) {
  background: var(--surface);
}

.staff-detail-permission-editor .permission-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-security-grid {
  display: grid;
  gap: 10px;
}

.staff-security-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-soft);
}

.staff-security-item b {
  display: block;
  color: var(--ink);
}

.staff-security-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.staff-detail-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1200px) {
  .staff-card-layout {
    grid-template-columns: 1fr;
  }
  .staff-card-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .staff-card-filters,
  .staff-detail-stats,
  .staff-detail-form,
  .staff-permission-toolbar,
  .staff-detail-permission-editor .permission-options {
    grid-template-columns: 1fr;
  }
  .staff-card-main,
  .staff-detail-identity,
  .staff-detail-head {
    grid-template-columns: 1fr;
  }
  .staff-detail-actions {
    justify-content: flex-start;
  }
}

.contract-template-select-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr);
  gap: 12px;
  margin: 12px 0 16px;
}

.contract-template-select-row label,
.contract-field-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #24314a;
  font-size: 12px;
  font-weight: 700;
}

.contract-field-group {
  border: 1px solid #d9e3f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  margin-top: 12px;
}

.contract-field-group h4 {
  margin: 0 0 12px;
  color: #12233f;
  font-size: 14px;
}

.contract-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contract-field-grid input,
.contract-field-grid textarea,
.contract-template-select-row select {
  width: 100%;
  border: 1px solid #d8e1ee;
  border-radius: 7px;
  padding: 9px 10px;
  font: inherit;
  color: #0f1f3a;
  background: #fff;
}

.contract-field-grid textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.45;
}

.contract-confirm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #17243c;
  font-weight: 700;
}

.contract-confirm-row input {
  width: 16px;
  height: 16px;
}

@media (max-width: 860px) {
  .contract-field-grid {
    grid-template-columns: 1fr;
  }
}

.contract-preview {
  position: sticky;
  top: 16px;
  height: var(--resizable-window-height, min(760px, calc(100vh - 48px)));
  min-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  background: #edf2f8;
  scrollbar-gutter: stable;
}


.resizable-scroll-window {
  scrollbar-width: thin;
}

.resizable-window-handle {
  position: fixed;
  z-index: 1200;
  display: none;
  height: 18px;
  place-items: center;
  border: 0;
  border-top: 1px solid rgba(216, 225, 238, 0.72);
  border-radius: 0 0 8px 8px;
  background: rgba(247, 250, 254, 0.86);
  box-shadow: 0 -5px 12px rgba(15, 23, 42, 0.06);
  cursor: row-resize;
}

.resizable-window-handle::before {
  content: "";
  display: block;
  width: 54px;
  height: 3px;
  border-radius: 999px;
  background: #9aa7b8;
}

.resizable-window-handle:hover::before,
body.is-window-resizing .resizable-window-handle::before {
  background: var(--blue);
}
.contract-preview-empty {
  display: grid;
  min-height: 420px;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: #52627a;
}

.contract-preview-empty h3 {
  margin: 0;
  color: #12233f;
}

.contract-paper-preview {
  box-sizing: border-box;
  width: min(100%, 720px);
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #d6dfeb;
  border-top: 3px solid #14233d;
  border-radius: 4px;
  background: #fff;
  padding: 32px clamp(22px, 4vw, 38px) 40px;
  color: #111827;
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.55;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}
.contract-paper-preview *,
.contract-paper-preview *::before,
.contract-paper-preview *::after {
  box-sizing: border-box;
}

.contract-paper-preview p,
.contract-paper-preview td,
.contract-paper-preview th {
  overflow-wrap: anywhere;
  word-break: break-word;
}


.contract-docx-preview {
  white-space: normal;
}

.contract-docx-header {
  display: flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 18px;
  border-bottom: 1px solid #d8e1ee;
  padding-bottom: 10px;
  color: #34445f;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.contract-docx-footer {
  margin-top: 28px;
  border-top: 1px solid #d8e1ee;
  padding-top: 10px;
  color: #52627a;
  text-align: center;
  font-size: 10px;
}

.contract-docx-paragraph {
  margin: 7px 0;
  color: #111827;
  text-align: justify;
}

.contract-docx-paragraph.center {
  text-align: center;
}

.contract-docx-paragraph.bold,
.contract-docx-paragraph.heading-like {
  font-weight: 700;
}

.contract-docx-paragraph.heading-like {
  margin-top: 15px;
  color: #101f3d;
}

.contract-docx-table {
  page-break-inside: auto;
}
.contract-preview-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid #d8e1ee;
  padding-bottom: 12px;
  color: #42526d;
  font-size: 11px;
}

.contract-preview-brand img {
  width: 120px;
  height: auto;
  object-fit: contain;
}

.contract-paper-preview h3 {
  margin: 0 0 20px;
  color: #101f3d;
  text-align: center;
  font-size: 18px;
  line-height: 1.35;
}

.contract-paper-preview h3 small {
  font-size: 13px;
}

.contract-paper-preview h4 {
  margin: 16px 0 6px;
  color: #111827;
  font-size: 12px;
  letter-spacing: 0;
}

.contract-paper-preview p {
  margin: 8px 0;
  text-align: justify;
}

.contract-legal-line {
  text-align: center !important;
  font-weight: 700;
}

.contract-preview-callout {
  margin: 14px 0;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
}

.contract-preview-table {
  width: 100%;
  max-width: 100%;
  margin: 10px 0 14px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11px;
}

.contract-preview-table th,
.contract-preview-table td {
  border: 1px solid #cfd8e6;
  padding: 7px 8px;
  vertical-align: middle;
}

.contract-preview-table th {
  background: #f3f6fa;
  font-weight: 700;
}

.contract-preview-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 28px;
}

.contract-preview-signatures div {
  border-top: 1px solid #1f2937;
  padding-top: 8px;
  min-height: 64px;
}

.contract-preview-signatures b,
.contract-preview-signatures span {
  display: block;
}

.contract-preview-note {
  margin-top: 24px;
  border-top: 1px solid #d8e1ee;
  padding-top: 10px;
  color: #52627a;
  font-size: 11px;
}








.market-trend-panel {
  margin-bottom: 16px;
}
.market-trend-panel .reconciliation-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.market-trend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.market-chart-block {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-soft);
}
.market-chart-block h4 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 14px;
}
.trend-bars {
  display: grid;
  gap: 11px;
}
.trend-row {
  display: grid;
  gap: 6px;
}
.trend-row-head,
.trend-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.trend-row-head span {
  min-width: 0;
  overflow: hidden;
  color: #263449;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trend-row-head b {
  color: #0b2554;
  font-size: 12px;
  white-space: nowrap;
}
.trend-meta {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 11px;
}
.trend-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf2;
}
.trend-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}
.trend-bars.compact .trend-track {
  height: 8px;
}
.marketing-workflow-grid {
  align-items: start;
}
.marketing-price-panel .approval-workflow-card,
.marketing-pricing-form {
  border-left: 4px solid var(--blue);
}
.marketing-refresh-form {
  border-left: 4px solid #22c55e;
}
.marketing-ad-panel .ad-list {
  margin-top: 12px;
}

.market-research-panel {
  display: grid;
  gap: 14px;
}
.market-research-panel .page-tab-panels {
  margin-top: 0;
}
.market-research-panel .inline-panel {
  box-shadow: none;
}
.market-research-panel select[multiple] {
  min-height: 156px;
  padding: 6px;
}
.market-research-panel select[multiple] option {
  border-radius: 6px;
  padding: 7px 9px;
}
.market-research-audit-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.market-research-audit-strip article {
  display: grid;
  gap: 4px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 12px;
  background: #eff6ff;
}
.market-research-audit-strip span,
.market-research-audit-strip small {
  color: var(--muted);
  font-size: 11px;
}
.market-research-audit-strip strong {
  color: #1d4ed8;
  font-size: 14px;
}
.compact-head {
  margin-bottom: 12px;
}
.market-summary-grid,
.market-daily-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.market-daily-summary article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface-soft);
}
.market-daily-summary span,
.market-summary-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.market-daily-summary b,
.market-summary-grid b {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 19px;
}
.market-daily-summary small {
  display: block;
  margin-top: 3px;
  color: #168a4a;
  font-size: 11px;
  font-weight: 800;
}
.market-trend-grid,
.market-daily-grid,
.market-funnel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.market-chart-block {
  min-height: 205px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-soft);
}
.market-chart-block h4 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 14px;
}
.market-chart-wide {
  grid-column: 1 / -1;
}
.market-line-chart svg {
  display: block;
  width: 100%;
  min-height: 158px;
  height: auto;
  overflow: visible;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.chart-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--blue);
  vertical-align: -1px;
}
.chart-legend span:nth-child(2)::before {
  background: var(--teal);
}
.market-chart-frame {
  fill: transparent;
  stroke: #dbe4ef;
  stroke-width: 1;
}
.market-chart-grid-line {
  stroke: #e3e9f2;
  stroke-width: 1;
}
.market-line-a,
.market-line-b,
.market-line-c {
  fill: none;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.market-line-a { stroke: var(--blue); }
.market-line-b { stroke: var(--teal); }
.market-line-c { stroke: #7c5cff; }
.market-dot-a { fill: var(--blue); }
.market-dot-b { fill: var(--teal); }
.market-dot-c { fill: #7c5cff; }
.market-chart-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.market-target-line {
  fill: none;
  stroke: #c77c17;
  stroke-width: 2;
  stroke-dasharray: 6 6;
}
.market-value-chip rect {
  fill: var(--surface);
  stroke: var(--line);
  rx: 6;
}
.market-value-chip text {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 900;
}
.market-daily-table {
  display: grid;
  gap: 7px;
  margin-top: 6px;
}
.market-daily-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 44px 48px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}
.market-daily-row b {
  color: var(--ink);
  text-align: right;
}
.market-funnel {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}
.market-funnel-step {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 12px;
}
.market-funnel-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}
.market-funnel-track {
  height: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf6;
}
.market-funnel-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}
.market-funnel-value {
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}
@media (max-width: 980px) {
  .market-summary-grid,
  .market-daily-summary,
  .market-trend-grid,
  .market-daily-grid,
  .market-funnel-grid {
    grid-template-columns: 1fr;
  }
  .market-chart-wide {
    grid-column: auto;
  }
}

.equipment-filter-panel { margin-bottom: 16px; }
.equipment-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; }
.equipment-filter-grid label { display: grid; gap: 7px; color: #344054; font-size: 12px; font-weight: 850; }
.equipment-filter-grid label span { color: var(--muted); line-height: 1.35; text-transform: uppercase; }
.equipment-path { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 11px; color: #344054; background: var(--surface-soft); font-size: 13px; font-weight: 850; }
.equipment-source-note { color: var(--muted); font-size: 12px; font-weight: 750; }
.equipment-view-tabs { margin: 0 0 16px; }
.equipment-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; margin: 0 0 16px; }
.equipment-search { position: relative; }
.equipment-search span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #98a2b3; font-weight: 900; }
.equipment-search input { min-height: 42px; padding-left: 42px; font-weight: 750; }
.equipment-view { display: none; }
.equipment-view.active { display: block; }
.equipment-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 430px); gap: 16px; align-items: start; }
.equipment-table-card table { min-width: 1180px; }
.equipment-side { display: grid; gap: 16px; }
.equipment-detail-grid { grid-template-columns: 1fr 1fr; }
.equipment-history { display: grid; gap: 8px; margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface-soft); }
.equipment-history > strong { color: var(--ink); font-size: 13px; }
.equipment-history div { display: grid; grid-template-columns: 70px minmax(0, 1fr) minmax(90px, auto); gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; color: var(--muted); font-size: 12px; }
.equipment-history b { color: var(--ink); font-size: 12px; }
.equipment-history small { text-align: right; }
.equipment-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.equipment-quick-actions .secondary-action,
.equipment-quick-actions .danger-action { min-height: 32px; padding: 0 10px; font-size: 12px; }
.danger-action { border: 1px solid rgba(239,68,68,.28); border-radius: var(--radius); color: var(--red); background: #fff; font-weight: 850; }
.equipment-flow-note { display: grid; gap: 8px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--surface-soft); color: var(--muted); font-size: 12px; line-height: 1.55; }
.equipment-flow-note strong { color: var(--ink); font-size: 13px; }
.equipment-event-type { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 9px; color: #1d4ed8; background: rgba(51,112,255,.1); font-size: 12px; font-weight: 850; }
.equipment-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.equipment-form-grid .field-wide { grid-column: 1 / -1; }
.equipment-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.equipment-readonly-pill { display: inline-flex; align-items: center; min-height: 34px; border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; color: var(--muted); background: var(--surface); font-size: 12px; font-weight: 850; }
@media (max-width: 1320px) { .equipment-filter-grid, .equipment-layout, .equipment-toolbar { grid-template-columns: 1fr; } }
.price-review-grid,
.price-review-summary {
  display: grid;
  gap: 10px;
}
.price-review-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.price-review-column {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fff;
}
.price-review-column h4 {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}
.price-review-column.is-muted {
  opacity: 0.62;
  background: rgba(248,250,252,0.9);
}
.price-review-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.price-review-summary span,
.approved-price-register {
  min-width: 0;
}
.price-review-summary span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: rgba(239,246,255,0.56);
  overflow-wrap: anywhere;
}
.price-review-summary b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.approved-price-register {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
@media (max-width: 980px) {
  .price-review-grid,
  .price-review-summary,
  .market-research-audit-strip {
    grid-template-columns: 1fr;
  }
}

.step-one-pricing-form {
  display: grid;
  gap: 12px;
}
.step-one-badge {
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 5px 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
}
.pricing-step-flow {
  display: grid;
  grid-template-columns: repeat(11, auto);
  align-items: center;
  justify-content: start;
  gap: 7px;
  min-height: 34px;
  overflow-x: auto;
  padding: 6px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}
.pricing-step-flow span {
  border-bottom: 2px solid #dbe3ee;
  padding: 5px 2px;
}
.pricing-step-flow span.active {
  border-color: var(--blue);
  color: var(--blue);
}
.pricing-step-flow span.completed {
  border-color: #86efac;
  color: #166534;
}
.pricing-step-flow i {
  color: #94a3b8;
  font-style: normal;
}
.price-system-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  padding: 10px;
  background: #f8fafc;
}
.price-system-strip label,
.step-one-pricing-form label {
  min-width: 0;
}
.price-system-strip input[readonly],
.step-one-pricing-form input[readonly],
[data-system-price-field] {
  border-color: #dbe3ee;
  background: #f4f7fb;
  color: #475569;
}
.price-approval-eligibility {
  border-left: 3px solid #64748b;
  padding: 7px 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}
.price-approval-eligibility.eligible {
  border-left-color: #16a34a;
  background: #f0fdf4;
  color: #166534;
}
.price-approval-eligibility.draft-only {
  border-left-color: #d97706;
  background: #fffbeb;
  color: #92400e;
}
.pricing-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.price-scope-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.price-scope-status span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  padding: 8px 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
}
.price-scope-status span.approved {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.price-scope-status span.returned,
.price-scope-status span.legacy_unverified {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.price-decision-actions {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.pricing-monthly-coverage {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 12px;
  margin-bottom: 10px;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  padding: 9px 11px;
  background: #f8fafc;
}
.pricing-monthly-coverage span {
  display: flex;
  gap: 7px;
  color: #475569;
  font-size: 12px;
}
.pricing-monthly-coverage strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--ink);
  font-size: 16px;
}
.pricing-monthly-coverage small {
  color: var(--muted);
}
.approved-price-register td strong,
.approved-price-register td small {
  display: block;
}
.approved-price-register td small {
  margin-top: 3px;
  color: var(--muted);
}
.muted-cell {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .price-system-strip,
  .price-scope-status {
    grid-template-columns: 1fr;
  }
  .pricing-step-flow {
    grid-template-columns: repeat(11, max-content);
  }
}

/* Progressive property picker used by property_id fields across the system. */
.ph-property-picker-mount,
.ph-step-property-picker { position: relative; width: 100%; }
.ph-native-property-select { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.ph-step-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 40px; border: 1px solid #d0d5dd; border-radius: 6px; padding: 0 11px; color: #101828; background: #fff; font-size: 12px; font-weight: 850; text-align: left; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.ph-step-trigger:hover { border-color: #98a2b3; background: #fcfcfd; }
.ph-step-trigger[aria-expanded="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51,112,255,.12); }
.ph-step-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-step-trigger i { color: #344054; font-style: normal; font-size: 13px; }
.ph-step-menu { position: absolute; z-index: 90; left: 0; top: calc(100% + 8px); width: min(360px, calc(100vw - 40px)); border: 1px solid #d0d5dd; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 22px 48px rgba(15, 23, 42, .16); }
.ph-step-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); color: #344054; background: #fff; }
.ph-step-head strong { display: block; color: #101828; font-size: 13px; font-weight: 900; }
.ph-step-head span { display: block; margin-top: 2px; color: #667085; font-size: 12px; font-weight: 750; line-height: 1.35; }
.ph-step-head button { min-height: 28px; border: 1px solid #d0d5dd; border-radius: 6px; padding: 0 9px; color: #344054; background: #fff; font-size: 11px; font-weight: 850; }
.ph-step-head button:hover { background: #f2f4f7; }
.ph-step-head button[hidden] { display: none; }
.ph-step-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.ph-step-progress span { display: flex; align-items: center; gap: 6px; min-width: 0; color: #98a2b3; font-size: 11px; font-weight: 850; }
.ph-step-progress b { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 999px; color: #667085; background: #e4e7ec; font-size: 11px; }
.ph-step-progress span.active { color: #1d4ed8; }
.ph-step-progress span.active b { color: #fff; background: var(--blue); box-shadow: 0 0 0 3px rgba(51,112,255,.12); }
.ph-step-progress span.done { color: #15803d; }
.ph-step-progress span.done b { color: #fff; background: #16a34a; }
.ph-step-context { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fff; }
.ph-step-context span { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; border: 1px solid #dbeafe; border-radius: 999px; padding: 4px 9px; color: #1e3a8a; background: #eff6ff; font-size: 11px; font-weight: 800; }
.ph-step-context b { color: #2563eb; font-weight: 900; }
.ph-step-context em { color: #667085; font-size: 12px; font-style: normal; line-height: 1.4; }
.ph-step-list { display: grid; gap: 3px; max-height: 280px; overflow: auto; padding: 8px; background: #fff; }
.ph-step-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; min-height: 42px; border: 0; border-radius: 6px; padding: 9px 10px; color: #101828; background: #fff; font-size: 12px; font-weight: 850; text-align: left; }
.ph-step-list button:hover { background: #f2f4f7; }
.ph-step-list button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-step-list button small { color: #667085; font-size: 11px; font-weight: 850; }
.ph-step-list button i { color: var(--blue); font-size: 16px; font-style: normal; font-weight: 900; }
.ph-step-empty { padding: 16px 10px; color: #667085; font-size: 12px; line-height: 1.45; }
@media (max-width: 680px) { .ph-step-menu { width: min(340px, calc(100vw - 32px)); } }

/* Step 2 Listing module: approved-price lock and one row per platform post. */
#listingManagementHost { min-width: 0; }
.marketing-workflow-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
.marketing-workflow-overview {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
  gap: 28px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #fff 0%, #f7faff 62%, #eef5ff 100%);
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
.marketing-workflow-copy { display: grid; gap: 5px; }
.marketing-workflow-copy h2 { margin: 0; color: var(--ink); font-size: clamp(18px, 2vw, 24px); line-height: 1.2; }
.marketing-workflow-copy p { max-width: 620px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.marketing-workflow-eyebrow { color: #2563eb; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.marketing-process-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.marketing-process-track li { position: relative; display: flex; gap: 9px; align-items: center; min-width: 0; border: 1px solid #dbe3ee; border-radius: 8px; padding: 10px; background: rgba(255,255,255,.9); }
.marketing-process-track li:not(:last-child)::after { content: "›"; position: absolute; z-index: 2; right: -8px; color: #98a2b3; font-size: 18px; font-weight: 900; }
.marketing-process-track li > b { display: grid; width: 26px; height: 26px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: #2563eb; font-size: 11px; }
.marketing-process-track li > span { display: grid; min-width: 0; gap: 2px; }
.marketing-process-track strong { overflow: hidden; color: #1f2937; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.marketing-process-track small { overflow: hidden; color: #667085; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.marketing-workspace-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  padding: 6px;
  background: #f2f4f7;
}
.marketing-workspace-tabs button { display: flex; gap: 11px; align-items: center; min-height: 58px; border: 1px solid transparent; border-radius: 7px; padding: 8px 14px; color: #667085; background: transparent; text-align: left; }
.marketing-workspace-tabs button > b { display: grid; min-width: 52px; height: 28px; place-items: center; border-radius: 999px; color: #475467; background: #e4e7ec; font-size: 10px; text-transform: uppercase; }
.marketing-workspace-tabs button > span { display: grid; gap: 2px; font-size: 13px; font-weight: 900; }
.marketing-workspace-tabs button small { color: #98a2b3; font-size: 10px; font-weight: 650; }
.marketing-workspace-tabs button:hover { color: #344054; background: rgba(255,255,255,.7); }
.marketing-workspace-tabs button.active { border-color: #bfdbfe; color: #1d4ed8; background: #fff; box-shadow: 0 2px 7px rgba(15,23,42,.06); }
.marketing-workspace-tabs button.active > b { color: #fff; background: #2563eb; }
.marketing-workspace-tabs button.active small { color: #667085; }
.marketing-workspace-panel { min-width: 0; border-color: #dbe3ee; padding: 20px; box-shadow: 0 10px 28px rgba(15,23,42,.05); }
.marketing-workspace-panel[hidden] { display: none !important; }
.marketing-workspace-panel > .panel-head { margin-bottom: 16px; border-bottom: 1px solid #e4e7ec; padding-bottom: 14px; }
.listing-status-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: -4px 0 14px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 8px;
}
.listing-status-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 9px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.listing-status-tabs button:hover { color: var(--ink); background: var(--surface-soft); }
.listing-status-tabs button.active { color: #1d4ed8; background: #eff6ff; }
.listing-status-tabs button b {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  padding: 0 5px;
  color: #475467;
  background: #e4e7ec;
  font-size: 10px;
}
.listing-status-tabs button.active b { color: #fff; background: var(--blue); }
.listing-create-details {
  margin-bottom: 14px;
  border-block: 1px solid var(--line);
  background: #fcfcfd;
}
.listing-create-details > summary {
  padding: 12px 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.listing-create-form { display: grid; gap: 12px; padding: 2px 0 14px; }
.listing-create-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(130px, .5fr);
  gap: 10px;
}
.listing-create-form label,
.listing-post-editor-row label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}
.listing-create-form label > span,
.listing-post-editor-row label > span { color: var(--muted); }
.listing-create-form input,
.listing-create-form select,
.listing-create-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}
.listing-create-form textarea { min-height: 92px; padding-block: 9px; resize: vertical; }
.listing-create-form input:focus,
.listing-create-form select:focus,
.listing-create-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(51,112,255,.1); }
.listing-create-form label > small { color: var(--muted); font-size: 10px; font-weight: 600; line-height: 1.4; }
.listing-unit-details { grid-column: 1 / -1; }
.listing-price-preview {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(130px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-left: 4px solid #98a2b3;
  border-radius: 6px;
  padding: 9px 11px;
  background: #fff;
}
.listing-price-preview > span { color: var(--muted); font-size: 11px; font-weight: 850; }
.listing-price-preview > b { font-size: 15px; }
.listing-price-preview > small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.listing-price-preview.ready { border-left-color: var(--green); background: #f7fcf9; }
.listing-price-preview.blocked { border-left-color: var(--red); background: #fffafa; }
.listing-post-editor { display: grid; gap: 8px; }
.listing-post-editor-head,
.listing-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.listing-post-editor-head > strong { font-size: 12px; }
.listing-post-editor-row {
  display: grid;
  grid-template-columns: minmax(105px, .7fr) minmax(180px, 1.4fr) minmax(125px, .7fr) minmax(140px, .8fr) minmax(126px, .7fr) 32px;
  gap: 8px;
  align-items: end;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}
.listing-remove-post {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #b42318;
  background: #fff;
  font-size: 18px;
  line-height: 1;
}
.listing-remove-post:hover { border-color: rgba(239,68,68,.35); background: #fff5f5; }
.listing-form-actions { justify-content: flex-end; }
.listing-form-actions .form-message { margin-right: auto; color: var(--green); font-size: 12px; font-weight: 750; }
.listing-form-actions .form-message.error { color: #b42318; }
.listing-form-actions .primary-action:disabled { cursor: not-allowed; opacity: .45; }
.listing-table-wrap { width: 100%; overflow: auto; }
.listing-table { min-width: 760px; }
.listing-table th { font-size: 11px; white-space: nowrap; }
.listing-table td { min-width: 110px; vertical-align: top; font-size: 12px; }
.listing-table td:nth-child(2) { min-width: 180px; }
.listing-table td:nth-child(4) { min-width: 180px; }
.listing-table td > strong,
.listing-table td > span,
.listing-table td > small { display: block; }
.listing-table td > small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.listing-platform-links { display: grid; gap: 5px; }
.listing-platform-links a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 28px;
  border-bottom: 1px solid var(--line);
  color: #1d4ed8;
  font-size: 11px;
  text-decoration: none;
}
.listing-platform-links .listing-invalid-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 28px;
  border-bottom: 1px solid var(--line);
  color: #b42318;
  font-size: 11px;
}
.listing-invalid-link small { color: #b42318; font-size: 10px; }
.listing-platform-links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-platform-links a small { color: var(--muted); font-size: 10px; }
.listing-compliance {
  display: inline-flex !important;
  width: max-content;
  margin-top: 5px;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 850;
}
.listing-compliance.current { color: #137333; background: rgba(39,174,96,.12); }
.listing-compliance.review { color: #92400e; background: rgba(245,158,11,.15); }
.listing-compliance.blocked { color: #b42318; background: rgba(239,68,68,.12); }
.listing-empty,
.listing-empty-inline { color: var(--muted); text-align: center; }
.tag.muted { color: #475467; background: #f2f4f7; }
.listing-detail-workbench {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}
.listing-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.listing-detail-head div { display: grid; gap: 3px; }
.listing-detail-head strong { font-size: 14px; }
.listing-detail-head small { color: var(--muted); font-size: 11px; }
.listing-detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.listing-detail-summary span { display: grid; gap: 4px; padding: 10px; border-right: 1px solid var(--line); font-size: 12px; }
.listing-detail-summary span:last-child { border-right: 0; }
.listing-detail-summary b { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.listing-detail-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.listing-detail-content > div { display: grid; gap: 7px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 10px; background: #fff; }
.listing-detail-content b { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.listing-detail-content pre { margin: 0; color: var(--ink); font: inherit; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.listing-photo-chips { min-width: 0; }
.listing-take-down-controls { display: grid; grid-template-columns: minmax(180px, .6fr) minmax(0, 1.4fr); gap: 10px; align-items: end; margin-bottom: 10px; }
.listing-take-down-controls label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.listing-take-down-controls select { min-height: 38px; border: 1px solid #d0d5dd; border-radius: 6px; padding: 0 10px; background: #fff; }
.listing-confirm-take-down { display: flex !important; align-items: center; min-height: 38px; border: 1px solid #fecaca; border-radius: 6px; padding: 8px 10px; color: #991b1b !important; background: #fff7f7; }
.listing-confirm-take-down input { flex: 0 0 auto; width: 16px; height: 16px; }
.listing-take-down-table { min-width: 880px; }
.listing-take-down-table td { vertical-align: top; font-size: 11px; }
.listing-take-down-table td:nth-child(2) { max-width: 250px; overflow-wrap: anywhere; }
.listing-take-down-table td small { display: block; margin-top: 3px; color: var(--muted); }
.listing-take-down-table select { min-width: 130px; min-height: 32px; border: 1px solid #d0d5dd; border-radius: 5px; background: #fff; }
@media (max-width: 1180px) {
  .listing-create-fields { grid-template-columns: 1fr; }
  .marketing-workflow-overview { grid-template-columns: 1fr; gap: 14px; }
  .listing-post-editor-row { grid-template-columns: 1fr 1fr; }
  .listing-post-url { grid-column: 1 / -1; }
  .listing-remove-post { justify-self: end; }
  .listing-detail-summary { grid-template-columns: 1fr 1fr; }
  .listing-detail-summary span:nth-child(2) { border-right: 0; }
}
@media (max-width: 680px) {
  .marketing-workspace-tabs,
  .marketing-process-track { grid-template-columns: 1fr; }
  .marketing-process-track li:not(:last-child)::after { content: "↓"; right: auto; bottom: -12px; left: 18px; }
  .marketing-workspace-tabs button { min-height: 52px; }
  .marketing-workflow-overview,
  .marketing-workspace-panel { padding: 14px; }
  .listing-post-editor-row,
  .listing-price-preview { grid-template-columns: 1fr; }
  .listing-remove-post { justify-self: start; }
  .listing-detail-summary,
  .listing-detail-content,
  .listing-take-down-controls { grid-template-columns: 1fr; }
  .listing-detail-summary span { border-right: 0; border-bottom: 1px solid var(--line); }
  .listing-detail-summary span:last-child { border-bottom: 0; }
}

/* Step 2.1: system-generated ISO-week Listing refresh work orders. */
.listing-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: -4px 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 3px;
  background: #f2f4f7;
}
.listing-mode-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  padding: 0 10px;
  color: #667085;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
}
.listing-mode-tabs button:hover { color: #101828; background: rgba(255,255,255,.65); }
.listing-mode-tabs button.active { color: #1d4ed8; background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.listing-mode-tabs button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-mode-tabs button b {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  padding: 0 5px;
  color: #475467;
  background: #e4e7ec;
  font-size: 10px;
}
.listing-mode-tabs button.active b { color: #fff; background: var(--blue); }
.listing-mode-body { min-width: 0; }
.refresh-period-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  margin-bottom: 12px;
  border-left: 3px solid var(--blue);
  padding: 8px 10px;
  color: #344054;
  background: #f8fafc;
  font-size: 11px;
}
.refresh-period-strip > span:first-child { min-width: 0; }
.refresh-period-strip > span:first-child b { margin-right: 7px; color: #101828; }
.refresh-period-strip > small { grid-column: 1 / -1; color: #667085; line-height: 1.4; }
.refresh-filter-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.refresh-filter-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  border: 0;
  border-radius: 5px;
  padding: 0 8px;
  color: #667085;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.refresh-filter-tabs button:hover { color: #101828; background: #f2f4f7; }
.refresh-filter-tabs button.active { color: #1d4ed8; background: #eff6ff; }
.refresh-filter-tabs button b { color: #475467; font-size: 10px; }
.refresh-filter-tabs button.active b { color: #1d4ed8; }
.refresh-task-list { border-bottom: 1px solid var(--line); }
.refresh-task-row {
  display: grid;
  grid-template-columns: minmax(165px, 1.45fr) minmax(115px, .8fr) minmax(76px, .55fr) auto 14px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 60px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 5px;
  color: #101828;
  background: #fff;
  text-align: left;
}
.refresh-task-row:last-child { border-bottom: 0; }
.refresh-task-row:hover { background: #f8fafc; }
.refresh-task-main,
.refresh-task-week,
.refresh-task-progress { display: grid; min-width: 0; gap: 3px; }
.refresh-task-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.refresh-task-row small { color: #667085; font-size: 10px; line-height: 1.35; }
.refresh-task-week b,
.refresh-task-progress b { color: #344054; font-size: 11px; }
.refresh-task-row > i { color: #98a2b3; font-size: 18px; font-style: normal; }
.refresh-empty { padding: 24px 10px; color: #667085; font-size: 12px; text-align: center; }
.refresh-form-notice {
  margin-bottom: 10px;
  border-left: 3px solid var(--green);
  padding: 8px 10px;
  color: #166534;
  background: #f0fdf4;
  font-size: 11px;
  line-height: 1.45;
}
.refresh-form-notice.error { border-left-color: #dc2626; color: #991b1b; background: #fef2f2; }
.refresh-workbench-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.refresh-workbench-head .icon-button { width: 32px; min-width: 32px; height: 32px; }
.refresh-workbench-head > div { display: grid; min-width: 0; gap: 3px; }
.refresh-workbench-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.refresh-workbench-head small { color: #667085; font-size: 10px; }
.refresh-step-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  margin: 12px 0;
}
.refresh-step-flow > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 5px 7px;
  color: #667085;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.refresh-step-flow > span b {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #475467;
  background: #e4e7ec;
  font-size: 10px;
}
.refresh-step-flow > span.active { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; }
.refresh-step-flow > span.active b { color: #fff; background: var(--blue); }
.refresh-step-flow > span.done { border-color: #bbf7d0; color: #166534; background: #f0fdf4; }
.refresh-step-flow > span.done b { color: #fff; background: #16a34a; }
.refresh-step-flow > i { color: #98a2b3; font-size: 16px; font-style: normal; }
.refresh-system-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  background: #f8fafc;
}
.refresh-system-strip span {
  display: grid;
  gap: 3px;
  min-width: 0;
  border-bottom: 1px solid #e4e7ec;
  padding: 8px 10px;
  color: #344054;
  font-size: 11px;
  line-height: 1.4;
}
.refresh-system-strip span:nth-child(odd) { border-right: 1px solid #e4e7ec; }
.refresh-system-strip span:nth-last-child(-n+2) { border-bottom: 0; }
.refresh-system-strip b { color: #667085; font-size: 10px; }
.refresh-verification-form { display: grid; gap: 10px; margin-top: 12px; }
.platform-refresh-log {
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}
.platform-refresh-log-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 6px;
  color: #667085;
  font-size: 12px;
  letter-spacing: .01em;
}
.platform-refresh-log-title strong { font-weight: 900; }
.platform-refresh-log-title span {
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 2px 8px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 900;
}
.platform-refresh-log-title small { color: #665b8d; font-size: 11px; font-weight: 800; }
.platform-refresh-log-scroll { width: 100%; overflow-x: auto; }
.platform-refresh-log table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  table-layout: auto;
  background: #fff;
}
.platform-refresh-log th {
  padding: 7px 10px;
  color: #062f37;
  background: #e8edf3;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
}
.platform-refresh-log td {
  border-bottom: 1px solid #dce3eb;
  padding: 7px 10px;
  color: #344054;
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
}
.platform-refresh-log tbody tr:last-child td { border-bottom: 0; }
.platform-refresh-log th:nth-child(1) { min-width: 120px; }
.platform-refresh-log th:nth-child(2) { min-width: 230px; }
.platform-refresh-log th:nth-child(3) { min-width: 160px; }
.platform-refresh-log th:nth-child(4) { min-width: 285px; }
.platform-refresh-log th:nth-child(5) { min-width: 185px; }
.platform-refresh-log th:nth-child(6) { min-width: 150px; }
.platform-refresh-log th:nth-child(7) { min-width: 100px; }
.platform-refresh-log a,
.platform-refresh-placeholder-row td:nth-child(2) span {
  display: block;
  max-width: 245px;
  overflow: hidden;
  color: #075cff;
  text-decoration: underline;
  text-overflow: ellipsis;
}
.platform-refresh-log input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
  padding: 0;
  accent-color: #2563eb;
  vertical-align: middle;
}
.platform-refresh-log input[type="checkbox"]:disabled { opacity: 1; }
.platform-refresh-placeholder-row { color: #475467; }
.platform-refresh-invalid-url { color: #b42318; }
.platform-refresh-log-note {
  margin: 7px 0 0;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 8px 10px;
  color: #475467;
  background: #f8fafc;
  font-size: 11px;
  line-height: 1.55;
}
.platform-refresh-log-caption {
  margin: 6px 0 0;
  color: #3157d5;
  font-size: 10px;
  font-style: italic;
  line-height: 1.4;
}
.refresh-platform-item {
  min-width: 0;
  margin: 0;
  border: 1px solid #dbe3ee;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}
.refresh-platform-item.verified { border-left: 3px solid #16a34a; background: #fbfefc; }
.refresh-platform-item.blocked { border-left: 3px solid #dc2626; background: #fffafa; }
.refresh-platform-item legend {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 0 5px;
  color: #101828;
  font-size: 11px;
}
.refresh-platform-item legend > span {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #667085;
  font-size: 10px;
}
.refresh-platform-item.verified legend > span { background: #16a34a; }
.refresh-platform-item legend strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.refresh-platform-item legend small { color: #166534; font-size: 10px; }
.refresh-platform-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}
.refresh-platform-head > div { display: grid; min-width: 0; gap: 3px; }
.refresh-platform-head span { color: #667085; font-size: 10px; font-weight: 800; }
.refresh-platform-head small { overflow: hidden; color: #344054; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.refresh-platform-head .secondary-action { min-height: 30px; padding: 0 9px; font-size: 10px; text-decoration: none; }
.refresh-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}
.refresh-check-grid label { display: grid; min-width: 0; gap: 5px; color: #667085; font-size: 10px; font-weight: 800; }
.refresh-check-grid input,
.refresh-check-grid select {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 0 8px;
  color: #101828;
  background: #fff;
  font-size: 11px;
}
.refresh-check-grid input[readonly] { color: #475467; background: #f2f4f7; }
.refresh-photo-check {
  display: flex !important;
  grid-column: 1 / 2;
  align-items: center;
  min-height: 34px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 0 8px;
  color: #344054 !important;
  background: #fff;
}
.refresh-photo-check input { width: 16px; min-height: 16px; flex: 0 0 auto; padding: 0; }
.refresh-check-note { grid-column: 2 / -1; }
.refresh-platform-item:disabled { opacity: 1; }
.refresh-platform-item:disabled input,
.refresh-platform-item:disabled select { color: #475467; background: #f8fafc; }
.refresh-blockers {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
  border-top: 1px solid #fecaca;
  padding-top: 8px;
  color: #991b1b;
  font-size: 10px;
}
.refresh-blockers span { border-radius: 999px; padding: 3px 7px; background: #fee2e2; }
.refresh-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.refresh-form-actions > span { color: #667085; font-size: 10px; line-height: 1.4; }
.refresh-form-actions .primary-action { flex: 0 0 auto; }
@media (max-width: 1180px) {
  .refresh-task-row { grid-template-columns: minmax(150px, 1fr) minmax(110px, .7fr) auto 14px; }
  .refresh-task-progress { display: none; }
  .refresh-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refresh-check-note { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .refresh-task-row { grid-template-columns: minmax(0, 1fr) auto 12px; }
  .refresh-task-week { display: none; }
  .refresh-step-flow { grid-template-columns: 1fr; }
  .refresh-step-flow > i { display: none; }
  .refresh-system-strip,
  .refresh-check-grid { grid-template-columns: 1fr; }
  .refresh-system-strip span,
  .refresh-system-strip span:nth-child(odd) { border-right: 0; border-bottom: 1px solid #e4e7ec; }
  .refresh-system-strip span:last-child { border-bottom: 0; }
  .refresh-photo-check,
  .refresh-check-note { grid-column: auto; }
  .refresh-platform-head { grid-template-columns: minmax(0, 1fr); }
  .refresh-platform-head .secondary-action { justify-self: start; }
  .refresh-form-actions { align-items: stretch; flex-direction: column; }
}
/* Consolidated property reference view */
.property-reference-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}
.property-reference-metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: linear-gradient(145deg, #ffffff, #f7faff);
  box-shadow: var(--shadow);
}
.property-reference-metric span,
.property-reference-metric small { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; }
.property-reference-metric strong { display: block; margin: 7px 0 5px; color: #0f172a; font-size: 21px; line-height: 1.15; }
.property-reference-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  border: 1px solid #cfe0ff;
  border-radius: var(--radius);
  padding: 10px 12px;
  color: #344054;
  background: #f5f8ff;
  font-size: 12px;
  line-height: 1.5;
}
.property-reference-note strong { flex: 0 0 auto; color: var(--blue); }
.property-master-table table { min-width: 1520px; }
.property-master-table td small { color: var(--muted); line-height: 1.5; }
.property-master-table th:last-child,
.property-master-table td:last-child { position: sticky; right: 0; z-index: 2; background: #fff; box-shadow: -10px 0 18px rgba(15, 23, 42, 0.08); }
.property-master-table th:last-child { z-index: 3; background: var(--surface-soft); }
.property-ownership-panel { margin: 0 0 16px; }
.property-source-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 7px 11px; color: #3157a6 !important; background: #edf3ff; font-weight: 800; }
.ownership-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ownership-overview-card { min-width: 0; border: 1px solid var(--line); border-left: 4px solid #6c8ef5; border-radius: var(--radius); padding: 14px; background: #fff; }
.ownership-overview-card[data-ownership-scope="subsidiary"] { border-left-color: #00a7a0; }
.ownership-overview-card[data-ownership-scope="sister_company"] { border-left-color: #9a6ad8; }
.ownership-overview-card[data-ownership-scope="personal"] { border-left-color: #e28a2b; }
.ownership-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ownership-card-head small,
.ownership-card-head strong { display: block; }
.ownership-card-head small { margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.ownership-card-head strong { color: #172033; font-size: 15px; }
.ownership-card-head > span { flex: 0 0 auto; border-radius: 999px; padding: 5px 8px; color: #3157a6; background: #edf3ff; font-size: 11px; font-weight: 850; }
.ownership-overview-card > p { margin: 10px 0; color: var(--muted); font-size: 12px; }
.ownership-card-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.ownership-card-stats span { border-radius: 8px; padding: 7px; color: var(--muted); background: var(--surface-soft); font-size: 10px; }
.ownership-card-stats b { display: block; margin-bottom: 2px; color: var(--ink); font-size: 13px; }
.ownership-building-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ownership-building-list span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 7px; color: #475467; font-size: 10px; }
.ownership-building-list b { color: var(--blue); }
@media (max-width: 1180px) {
  .property-reference-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ownership-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .property-reference-summary,
  .ownership-overview-grid { grid-template-columns: 1fr; }
  .property-reference-note { align-items: flex-start; flex-direction: column; }
}

.tag.info { color: #175cd3; background: rgba(47, 108, 246, 0.12); }

.leasing-process-panel { margin-top: 16px; }
.process-version-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  color: #2458bc !important;
  background: #edf3ff;
  font-size: 11px;
  font-weight: 850;
}
.leasing-process-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}
.leasing-process-grid button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px;
  color: #172033;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.leasing-process-grid button:hover,
.leasing-process-grid button:focus-visible {
  border-color: #7ea2f8;
  background: #f5f8ff;
  box-shadow: 0 8px 20px rgba(47, 108, 246, 0.11);
}
.leasing-process-grid b {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 9px;
  padding: 0 5px;
  color: #fff;
  background: #2f6cf6;
  font-size: 11px;
}
.leasing-process-grid span { min-width: 0; font-size: 12px; font-weight: 800; line-height: 1.35; }
.leasing-process-grid small { color: var(--muted); font-size: 10px; font-weight: 650; }
.process-support-link {
  width: 100%;
  margin-top: 10px;
  border: 1px dashed #9bb5ef;
  border-radius: 10px;
  padding: 9px 12px;
  color: #3157a6;
  background: #f8faff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.property-reference-tree { display: grid; gap: 14px; margin-bottom: 14px; }
.property-holder-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid #5078d8;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.property-holder-card[data-ownership-scope="subsidiary"] { border-top-color: #008a86; }
.property-holder-card[data-ownership-scope="sister_company"] { border-top-color: #8b5ac7; }
.property-holder-card[data-ownership-scope="personal"] { border-top-color: #c87527; }
.property-holder-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: #fff;
  background: #3157a6;
}
.property-holder-card[data-ownership-scope="subsidiary"] > header { background: #127f84; }
.property-holder-card[data-ownership-scope="sister_company"] > header { background: #7d529f; }
.property-holder-card[data-ownership-scope="personal"] > header { background: #9b6030; }
.property-holder-card > header strong,
.property-holder-card > header span,
.property-holder-card > header small { display: block; color: inherit; }
.property-holder-card > header strong { font-size: 16px; }
.property-holder-card > header span { margin-top: 3px; font-size: 12px; opacity: .92; }
.property-holder-card > header small { margin-top: 3px; font-size: 10px; opacity: .78; }
.property-holder-totals { flex: 0 0 auto; text-align: right; font-size: 12px; }
.property-holder-totals b { font-size: 16px; }
.property-holder-buildings { display: grid; gap: 10px; padding: 14px; }
.property-building-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.property-building-group > summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: #667085;
  background: #f7f8fa;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}
.property-building-group > summary::marker { color: #667085; }
.property-building-name { color: #172033; font-size: 13px; font-weight: 850; }
.property-building-table { overflow-x: auto; }
.property-building-table table { min-width: 1120px; }
.property-building-table td { vertical-align: top; }
.property-building-table td > strong,
.property-building-table td > small,
.property-building-table td > .tag { display: block; margin-bottom: 4px; }
.property-doc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0; }
.property-doc-tags > span {
  border-radius: 6px;
  padding: 3px 6px;
  color: #475467;
  background: #eef1f5;
  font-size: 10px;
  font-weight: 750;
}
.property-rent-cell strong { color: #172033; }
.property-rent-cell small { display: block; color: var(--muted); }
.property-master-details { margin-top: 4px; }
.property-master-details > summary {
  margin-bottom: 10px;
  color: #3157a6;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}
.property-tree-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}
@media (max-width: 1180px) {
  .leasing-process-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .leasing-process-grid { grid-template-columns: 1fr; }
  .property-holder-card > header { align-items: flex-start; flex-direction: column; }
  .property-holder-totals { text-align: left; }
  .property-building-group > summary { grid-template-columns: 1fr; }
}

.contract-process-workbench {
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid var(--line, #d8dee8);
  border-radius: 14px;
  background: #f8fafc;
}

.contract-workbench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.contract-workbench-head div {
  display: grid;
  gap: 2px;
}

.contract-workbench-head span:not(.tag) {
  color: var(--muted, #64748b);
  font-size: 12px;
}

.contract-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 9px;
}

.contract-step-grid article {
  display: flex;
  gap: 9px;
  min-height: 96px;
  padding: 10px;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  background: #fff;
}

.contract-step-grid article.is-current {
  border-color: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.12);
}

.contract-step-grid article.is-complete {
  border-color: #86c59d;
  background: #f3fbf6;
}

.contract-step-grid article > div {
  display: grid;
  align-content: start;
  gap: 3px;
}

.contract-step-grid article small {
  color: var(--muted, #64748b);
  line-height: 1.35;
}

.contract-step-no {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 28px;
  border-radius: 999px;
  background: #e7edf6;
  color: #1e3a5f;
  font-size: 11px;
  font-weight: 800;
}

.contract-step-grid .is-complete .contract-step-no {
  background: #dff3e6;
  color: #166534;
}

.contract-step-grid .is-current .contract-step-no {
  background: #fff0cf;
  color: #9a4e05;
}

.page-data-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 24px 16px;
  padding: 10px 14px;
  border: 1px solid #b7c9df;
  border-radius: 10px;
  background: #f3f7fc;
  color: #36516f;
  font-size: 13px;
}

.page-data-status[hidden] {
  display: none;
}

.page-data-status.is-error {
  border-color: #efb2aa;
  background: #fff5f3;
  color: #9f2f24;
}

/* Property groups: additive workspace backed by the existing property master. */
.property-group-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid #cbd9e9;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff 0%, #edf5ff 55%, #f7fafc 100%);
}

.property-group-intro > div { display: grid; gap: 5px; }
.property-group-intro span,
.property-group-form > header span {
  color: #2f6b9e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.property-group-intro h2,
.property-group-form > header h2 { margin: 0; color: #16324f; }
.property-group-intro p,
.property-group-form > header p { margin: 0; color: #61748a; }

.property-group-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.property-group-metrics article {
  display: grid;
  gap: 4px;
  padding: 15px 18px;
  border: 1px solid #d8e0ea;
  border-radius: 13px;
  background: #fff;
}
.property-group-metrics strong { color: #183b5b; font-size: 25px; }
.property-group-metrics span { color: #6b7d90; font-size: 12px; }

.property-group-list-panel { overflow: hidden; }
.property-group-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.property-group-toolbar .search { flex: 1; }
.property-group-toolbar select { min-width: 150px; }
.property-group-table { overflow: auto; }
.property-group-table table { min-width: 1120px; }
.property-group-table td { vertical-align: top; }
.property-group-table td > b + small,
.property-group-identity,
.property-group-state,
.property-group-allocation-summary { display: grid; gap: 4px; }
.property-group-identity code { width: fit-content; color: #2f6b9e; font-size: 11px; }
.property-group-table small,
.property-group-table .muted { color: #748397; font-size: 11px; }

.property-group-member-tags,
.property-group-scope-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 350px;
}
.property-group-member-tag,
.property-group-scope-tags span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #d8e1ec;
  border-radius: 999px;
  background: #f7f9fc;
  color: #3f5268;
  font-size: 11px;
}
.property-group-member-tag.is-primary {
  border-color: #9fc0e1;
  background: #eaf4ff;
  color: #245781;
}
.property-group-member-tag small { color: inherit; opacity: .75; }
.property-group-status {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.property-group-status.is-active { background: #e5f7eb; color: #19713b; }
.property-group-status.is-draft { background: #fff4d8; color: #8b5d06; }
.property-group-status.is-inactive { background: #eef1f5; color: #667386; }
.property-group-actions { display: flex; gap: 8px; }
.property-group-actions .danger { color: #b13a31; }
.property-group-empty,
.property-group-selected-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 28px;
  color: #66798e;
  text-align: center;
}

.property-group-dialog {
  width: min(1120px, calc(100vw - 30px));
  max-width: none;
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(18, 38, 61, .28);
}
.property-group-dialog::backdrop { background: rgba(18, 34, 52, .55); backdrop-filter: blur(2px); }
.property-group-form { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100vh - 28px); background: #f5f7fa; }
.property-group-form > header,
.property-group-form > footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: #fff;
}
.property-group-form > header { justify-content: space-between; border-bottom: 1px solid #dce3eb; }
.property-group-form > header > div { display: grid; gap: 4px; }
.property-group-form > footer { justify-content: flex-end; border-top: 1px solid #dce3eb; }
.property-group-form > footer .error-text { flex: 1; margin: 0; color: #b23b32; }
.property-group-form-body { display: grid; gap: 14px; padding: 16px; overflow: auto; }
.property-group-form-section {
  display: grid;
  gap: 14px;
  padding: 17px;
  border: 1px solid #d8e0ea;
  border-radius: 13px;
  background: #fff;
}
.property-group-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.property-group-section-head b { color: #213e5b; }
.property-group-section-head span { color: #718195; font-size: 12px; }

.property-group-hierarchy-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.15fr auto;
  align-items: end;
  gap: 10px;
}
.property-group-hierarchy-grid label,
.property-group-selected-card > label { display: grid; gap: 5px; }
.property-group-hierarchy-grid label > span,
.property-group-selected-card > label > span { color: #5c6f84; font-size: 10px; font-weight: 800; }
.property-group-hierarchy-grid select { width: 100%; }
.property-group-path {
  padding: 9px 12px;
  border-left: 3px solid #5991bf;
  border-radius: 4px;
  background: #f3f8fd;
  color: #49647e;
  font-size: 12px;
}
.property-group-selected-head { display: flex; justify-content: space-between; }
.property-group-selected-head span { color: #6e8093; font-size: 12px; }
.property-group-selected { display: grid; gap: 8px; }
.property-group-selected-card {
  display: grid;
  grid-template-columns: 34px minmax(230px, 1fr) auto 125px 125px 34px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  background: #fbfcfe;
}
.property-group-member-order {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e9f2fb;
  color: #2b6392;
  font-size: 12px;
  font-weight: 800;
}
.property-group-member-main { display: grid; gap: 2px; }
.property-group-member-main span,
.property-group-member-main small { color: #718195; font-size: 11px; }
.property-group-primary { display: flex !important; grid-auto-flow: column; align-items: center; color: #294f72; font-size: 12px; white-space: nowrap; }

.property-group-scope-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}
.property-group-scope-grid label {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  background: #fbfcfe;
}
.property-group-scope-grid label:has(input:checked) { border-color: #91b7da; background: #f0f7fe; }
.property-group-scope-grid label span { display: grid; gap: 4px; }
.property-group-scope-grid small { color: #738499; line-height: 1.35; }
.property-group-scope-grid em { position: absolute; top: 7px; right: 8px; color: #2e6b9d; font-size: 10px; font-style: normal; }

@media (max-width: 1080px) {
  .property-group-hierarchy-grid { grid-template-columns: 1fr 1fr; }
  .property-group-selected-card { grid-template-columns: 34px 1fr auto; }
  .property-group-selected-card > label { grid-column: span 1; }
  .property-group-scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .property-group-intro { align-items: flex-start; flex-direction: column; }
  .property-group-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-group-toolbar,
  .property-group-section-head { align-items: stretch; flex-direction: column; }
  .property-group-hierarchy-grid,
  .property-group-scope-grid { grid-template-columns: 1fr; }
  .property-group-selected-card { grid-template-columns: 30px 1fr 30px; }
  .property-group-selected-card > label { grid-column: 2 / -1; }
}
