:root {
  --color-nav-dark: #061d3a;
  --color-nav-darker: #08284f;
  --color-slate: #315d84;
  --color-action: #1263cf;
  --color-action-hover: #0f56b5;
  --color-action-active: #0d4a9b;
  --color-muted-slate: #66758a;
  --color-soft-surface: #eef4f8;
  --color-page-bg: #f6f8fb;
  --color-card-bg: #ffffff;
  --color-text: #10213a;
  --color-text-secondary: #66758a;
  --color-text-muted: #8a97a8;
  --color-border: #dfe5ec;
  --color-border-strong: #cfd8e3;
  --color-success: #1fa463;
  --color-success-bg: #e8f7ef;
  --color-warning: #f59e0b;
  --color-warning-bg: #fff7e8;
  --color-danger: #ef4444;
  --color-danger-bg: #fdecec;
  --color-purple: #7c3aed;
  --color-purple-bg: #f3eefc;
  --focus-ring: rgba(18, 99, 207, 0.22);
  --shadow-soft: 0 8px 24px rgba(16, 33, 58, 0.06);
  --radius-panel: 12px;
  --radius-control: 10px;
  --shell-width: min(1800px, calc(100% - 48px));
  --ops-sidebar-width: 250px;
  --font-sans: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body.site-body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-page-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

a {
  color: var(--color-action);
}

a:hover {
  color: var(--color-action-hover);
}

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

.page-shell {
  width: var(--shell-width);
  margin: 0 auto;
  padding: 24px 0 28px;
}

.site-main {
  display: grid;
  gap: 20px;
}

.site-header-primary {
  min-width: 0;
}

.header-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.site-footer {
  margin-top: 24px;
  padding: 18px 6px 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

.brand-mark,
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
}

.brand-mark {
  color: #f5f8fb;
}

.eyebrow {
  color: var(--color-slate);
}

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

.brand-subtitle {
  margin: 4px 0 0;
  color: rgba(232, 239, 245, 0.72);
  font-size: 0.88rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--color-nav-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  position: relative;
  z-index: 20;
}

.nav-menu-toggle {
  display: none;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(238, 244, 248, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-combo {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  gap: 0;
}

.nav-combo .nav-link {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.nav-combo-trigger {
  min-width: 34px;
  min-height: 38px;
  padding: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 1px solid rgba(238, 244, 248, 0.14);
}

.nav-combo-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 0.15s ease;
}

.nav-combo.is-open .nav-combo-trigger::after {
  transform: translateY(2px) rotate(-135deg);
}

.nav-combo .nav-dropdown-menu {
  left: 0;
}

.user-session {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.user-session-name {
  color: rgba(232, 239, 245, 0.86);
  font-size: 0.9rem;
  font-weight: 600;
}

.ops-panel,
.dashboard-panel {
  padding: 22px 24px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-soft);
}

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

.page-supporting,
.section-supporting {
  margin: 0;
  color: var(--color-text-secondary);
  max-width: 48rem;
}

.ops-panel h1,
.dashboard-panel h1 {
  margin: 6px 0 8px;
  font-size: clamp(1.65rem, 2.4vw, 2.1rem);
  line-height: 1.15;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.dashboard-section {
  margin-top: 22px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.metric-card,
.action-card,
.attention-row {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-soft-surface);
  text-decoration: none;
  color: inherit;
}

.metric-card-link:hover,
.action-card:hover,
.attention-row:hover {
  border-color: var(--color-border-strong);
  background: #e7eef4;
}

.metric-card-label,
.action-card-copy,
.attention-row-label {
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.metric-card-value,
.action-card-title,
.attention-row-count {
  color: var(--color-text);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
}

.action-card-title {
  font-size: 1rem;
}

.action-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.attention-list,
.recent-stack {
  display: grid;
  gap: 10px;
}

.attention-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.attention-row-static {
  cursor: default;
}

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

.recent-block h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.recent-list li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
}

.recent-list span {
  color: var(--color-text-secondary);
  font-size: 0.86rem;
}

.empty-state-compact {
  padding: 16px;
}

.nav-link,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(245, 248, 251, 0.88);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-button {
  gap: 8px;
  font-family: inherit;
}

.nav-button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 0.15s ease;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav-dropdown.is-open .nav-button::after {
  transform: translateY(2px) rotate(-135deg);
}

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

.nav-link.is-active,
.nav-button.is-active,
.nav-dropdown.is-active .nav-button,
.nav-dropdown.is-open .nav-button,
.nav-combo.is-active .nav-button,
.nav-combo.is-open .nav-button {
  background: rgba(238, 244, 248, 0.16);
  border-color: rgba(238, 244, 248, 0.18);
  color: #ffffff;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  gap: 6px;
  min-width: max-content;
  width: max-content;
  max-width: min(calc(100vw - 32px), 18rem);
  padding: 10px;
  background: rgba(19, 31, 60, 0.98);
  border: 1px solid rgba(232, 239, 245, 0.16);
  border-radius: 14px;
  box-shadow: 0 18px 34px rgba(9, 18, 38, 0.28);
  white-space: nowrap;
  transform: translateY(-6px);
  transform-origin: top left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease-out, transform 0.16s ease-out, visibility 0.16s ease-out;
}

.site-nav[data-nav-ready] .nav-dropdown.is-open .nav-dropdown-menu,
.site-nav[data-nav-ready] .nav-combo.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-link {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(245, 248, 251, 0.88);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-dropdown-link.is-active {
  background: rgba(238, 244, 248, 0.16);
  border-color: rgba(238, 244, 248, 0.18);
  color: #ffffff;
}

.hero-panel,
.message-panel,
.auth-panel,
.dashboard-panel,
.form-card,
.table-card,
.detail-card,
.filter-card,
.status-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-soft);
}

.hero-panel,
.message-panel,
.auth-panel,
.dashboard-panel {
  padding: 28px;
}

.hero-panel,
.message-panel {
  max-width: 940px;
  margin: 0 auto;
}

h1 {
  margin: 8px 0 14px;
  color: var(--color-text);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.08;
  font-weight: 680;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 12px;
  color: var(--color-text);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
  font-weight: 650;
}

p {
  margin: 0 0 1rem;
}

.lead,
.message-panel p,
.status-card p,
.auth-note,
.dashboard-copy,
.detail-note,
.masked-guidance,
.empty-state p,
.detail-list dd {
  color: var(--color-text-secondary);
}

.lead,
.message-panel p,
.status-card p,
.auth-note,
.dashboard-copy {
  max-width: 56rem;
  line-height: 1.65;
}

.status-card {
  margin-top: 22px;
  padding: 20px 22px;
  background: var(--color-soft-surface);
  border-color: var(--color-border-strong);
  box-shadow: none;
}

.flash-stack {
  display: grid;
  gap: 12px;
}

.flash-message {
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-card-bg);
  color: var(--color-text);
}

.flash-success {
  border-color: rgba(47, 117, 93, 0.25);
  background: var(--color-success-bg);
}

.flash-error {
  border-color: rgba(165, 69, 69, 0.24);
  background: var(--color-danger-bg);
}

.flash-info {
  background: #f7fafc;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.brand-logo {
  width: clamp(92px, 9vw, 132px);
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
}

.auth-panel h1,
.dashboard-panel h1 {
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.form-card {
  padding: 22px;
}

.form-card-wide {
  margin-top: 18px;
}

.field-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field-group label {
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 600;
}

.field-group input,
.field-group select,
.field-group textarea,
.inline-search input,
.multiselect-field {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  background: #ffffff;
  color: var(--color-text);
  font: inherit;
}

.field-group textarea {
  min-height: 132px;
  resize: vertical;
}

.field-group-checkbox {
  align-content: end;
}

.field-group-checkbox input {
  width: auto;
  min-height: 20px;
  justify-self: start;
}

.multiselect-field {
  min-height: 176px;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus,
.inline-search input:focus,
.multiselect-field:focus,
.nav-link:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.logout-button:focus-visible {
  outline: 2px solid transparent;
  border-color: var(--color-action);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.field-group input::placeholder,
.field-group textarea::placeholder,
.inline-search input::placeholder {
  color: var(--color-text-muted);
}

.field-error {
  color: var(--color-danger);
  font-size: 0.875rem;
}

.message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.primary-button,
.secondary-button,
.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

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

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

.primary-button:active {
  background: var(--color-action-active);
  border-color: var(--color-action-active);
}

.secondary-button,
.logout-button {
  background: #ffffff;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.secondary-button:hover,
.logout-button:hover {
  background: var(--color-soft-surface);
  color: var(--color-text);
}

.message-actions form {
  margin: 0;
}

.primary-button:disabled,
.secondary-button:disabled,
.logout-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
}

.dashboard-meta,
.subsection-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.dashboard-status {
  padding: 20px 22px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-panel);
  background: var(--color-soft-surface);
}

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

.form-section-grid {
  margin-bottom: 20px;
}

.form-stack {
  display: grid;
  gap: 20px;
  margin-bottom: 20px;
}

.form-grid-span {
  grid-column: 1 / -1;
}

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

.field-help {
  margin: 0;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.finance-generation-panel {
  display: grid;
  gap: 22px;
}

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

.finance-selection-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.finance-preview-card,
.finance-bulk-card {
  border: 1px solid var(--color-border-strong);
  background: var(--color-soft-surface);
}

.finance-preview-grid {
  margin-top: 18px;
}

.finance-action-row {
  align-items: center;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0 20px;
  color: var(--color-text-secondary);
}

.inline-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 18px 0 20px;
}

.filter-card {
  margin: 18px 0 20px;
  padding: 20px;
}

.filter-grid,
.filter-grid-wide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px 20px;
}

.filter-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.table-card,
.detail-card {
  padding: 18px 20px;
}

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

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .finance-billing-grid,
  .finance-selection-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-action-row .primary-button,
  .finance-action-row .secondary-button {
    width: 100%;
  }
}

.admin-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

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

.admin-table th {
  background: var(--color-soft-surface);
  color: var(--color-text-secondary);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover {
  background: rgba(238, 244, 248, 0.46);
}

.summary-table td:last-child,
.summary-table th:last-child {
  width: 11rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 20px;
  margin-bottom: 20px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px 18px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(216, 225, 231, 0.75);
}

.detail-list dt {
  color: var(--color-text-muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.detail-list dd {
  margin: 0;
}

.detail-stack {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.detail-note {
  margin: 0;
  line-height: 1.65;
  white-space: pre-wrap;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
}

.status-badge-active,
.status-badge-occupied {
  background: var(--color-success-bg);
  border-color: rgba(47, 117, 93, 0.24);
  color: var(--color-success);
}

.status-badge-inactive,
.status-badge-vacant,
.status-badge-expired,
.status-badge-terminated,
.status-badge-cancelled {
  background: #f7f9fb;
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

.status-badge-draft {
  background: var(--color-warning-bg);
  border-color: rgba(166, 108, 36, 0.22);
  color: var(--color-warning);
}

.status-badge-pending {
  background: rgba(47, 111, 168, 0.1);
  border-color: rgba(47, 111, 168, 0.18);
  color: var(--color-action-active);
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.72);
}

.empty-state h2 {
  margin-bottom: 8px;
}

.lease-context-card {
  margin-bottom: 20px;
}

.masked-guidance,
.role-list {
  margin-top: 0;
}

.role-list {
  padding-left: 18px;
}

.logout-form {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (max-width: 1024px) {
  :root {
    --shell-width: min(1800px, calc(100% - 40px));
  }

  .site-header {
    flex-direction: column;
  }

  .header-controls {
    justify-content: flex-start;
  }

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

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

  .form-grid,
  .form-section-grid {
    gap: 18px 20px;
  }
}

@media (max-width: 768px) {
  :root {
    --shell-width: calc(100% - 32px);
  }

  .page-shell {
    padding-top: 16px;
    padding-bottom: 22px;
  }

  .nav-menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.is-mobile-open {
    display: flex;
  }

  .site-header,
  .hero-panel,
  .message-panel,
  .auth-panel,
  .dashboard-panel,
  .ops-panel,
  .form-card,
  .table-card,
  .detail-card,
  .filter-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .form-grid,
  .form-section-grid,
  .detail-list,
  .filter-grid,
  .filter-grid-wide,
  .metric-grid,
  .action-card-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-meta,
  .subsection-header,
  .brand-lockup,
  .page-header,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .inline-search {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 540px) {
  :root {
    --shell-width: calc(100% - 24px);
  }

  body.site-body {
    font-size: 15px;
  }

  .site-header {
    padding: 16px;
  }

  .nav-link,
  .nav-button,
  .primary-button,
  .secondary-button,
  .logout-button {
    width: 100%;
  }

  .nav-combo {
    width: 100%;
  }

  .nav-combo .nav-link {
    flex: 1 1 auto;
  }

  .site-nav {
    width: 100%;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    width: 100%;
    max-width: none;
    margin-top: 0;
    white-space: normal;
  }

  .site-nav[data-nav-ready] .nav-dropdown-menu,
  .site-nav[data-nav-ready] .nav-combo .nav-dropdown-menu {
    display: none;
  }

  .site-nav[data-nav-ready] .nav-dropdown.is-open .nav-dropdown-menu,
  .site-nav[data-nav-ready] .nav-combo.is-open .nav-dropdown-menu {
    display: grid;
    margin-top: 8px;
  }

  .header-controls,
  .message-actions,
  .user-session {
    width: 100%;
  }

  .admin-table {
    min-width: 560px;
  }
}

/* --- Ops sidebar layout (authenticated) --- */
.ops-shell {
  display: grid;
  grid-template-columns: var(--ops-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}


.ops-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100vh;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, var(--color-nav-dark) 0%, var(--color-nav-darker) 100%);
  color: #f5f8fb;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  z-index: 30;
}

.ops-sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ops-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ops-brand-logo {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  padding: 3px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.ops-brand-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.ops-brand-name,
.ops-brand-sub {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #ffffff;
}

.ops-brand-name { font-size: 0.92rem; }

.ops-brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.ops-brand .brand-mark {
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.2;
  font-weight: 700;
}

.ops-brand .brand-subtitle {
  margin-top: 2px;
  font-size: 0.78rem;
}

.ops-shell .site-nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  margin-top: 8px;
  flex: 1 1 auto;
}

.ops-shell .nav-link,
.ops-shell .nav-button {
  justify-content: flex-start;
  width: 100%;
  border-radius: 10px;
  min-height: 46px;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

.ops-shell .nav-link {
  padding-left: 14px;
  padding-right: 14px;
  color: rgba(255, 255, 255, 0.72);
  border: 0;
  background: transparent;
}

.ops-shell .nav-link:hover,
.ops-shell .nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.ops-shell .nav-icon {
  flex: 0 0 auto;
  opacity: 0.9;
}

.ops-shell .nav-link.is-active,
.ops-shell .nav-combo.is-active > .nav-link.is-active,
.ops-shell .nav-dropdown.is-active > .nav-link.is-active {
  background: var(--color-action);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(18, 99, 207, 0.28);
}

.ops-shell .nav-combo.is-active .nav-combo-trigger.is-active,
.ops-shell .nav-dropdown.is-active .nav-combo-trigger.is-active {
  background: transparent;
  border-color: transparent;
  color: #ffffff;
}

.ops-shell .nav-combo.is-open .nav-combo-trigger,
.ops-shell .nav-dropdown.is-open .nav-combo-trigger {
  background: transparent;
  border-color: transparent;
  color: #ffffff;
}

.ops-shell .nav-link.is-active .nav-icon {
  opacity: 1;
  color: #ffffff;
}

.ops-shell .nav-combo,
.ops-shell .nav-dropdown.nav-combo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  position: relative;
}

.ops-shell .nav-combo .nav-link {
  border-radius: 10px;
}

.ops-shell .nav-combo-trigger {
  position: absolute;
  inset: 0 0 0 auto;
  width: 28px;
  min-width: 28px;
  opacity: 0;
  border: 0;
  background: transparent;
}

.ops-shell .nav-combo-trigger.nav-button::after,
.ops-shell .nav-combo.is-open .nav-combo-trigger.nav-button::after,
.ops-shell .nav-dropdown.is-open .nav-combo-trigger.nav-button::after {
  content: none;
}

.ops-shell .nav-dropdown-menu,
.ops-shell .nav-combo .nav-dropdown-menu {
  top: 0;
  left: calc(100% + 8px);
  right: auto;
  transform: translateY(-6px);
  transform-origin: top left;
}

.ops-shell .site-nav[data-nav-ready] .nav-dropdown.is-open .nav-dropdown-menu,
.ops-shell .site-nav[data-nav-ready] .nav-combo.is-open .nav-dropdown-menu {
  transform: translateY(0);
}

.ops-sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  gap: 10px;
}

.ops-sidebar-org { display: none; }

.ops-sidebar-org-name {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
}

.ops-sidebar-org-meta {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
}

.ops-sidebar-profile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.ops-sidebar-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #163a63;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ops-sidebar-profile-text {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.ops-sidebar-profile-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-sidebar-profile-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.58);
}

.ops-sidebar-profile-caret {
  width: 7px;
  height: 7px;
  border-right: 1.6px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1.6px solid rgba(255, 255, 255, 0.55);
  transform: rotate(45deg);
  margin-top: -4px;
}

.ops-sign-out {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: flex-start;
  min-height: 36px;
  padding: 6px 8px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.ops-sign-out:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.ops-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  padding: 0 24px 20px;
}

.ops-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  background: rgba(246, 248, 251, 0.94);
  backdrop-filter: blur(8px);
  z-index: 15;
}

.ops-topbar-title {
  min-width: 0;
  flex: 1 1 auto;
}

.ops-topbar-title h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  line-height: 1.15;
}

.ops-topbar-title .eyebrow {
  display: none;
}

.ops-topbar-subtitle {
  margin: 4px 0 0;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.ops-topbar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.ops-topbar-user {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.ops-top-search {
  position: relative;
  display: flex;
  align-items: center;
}

.ops-top-search-icon {
  position: absolute;
  left: 12px;
  display: inline-flex;
  color: var(--color-text-muted);
  pointer-events: none;
}

.ops-top-search input {
  min-width: min(360px, 42vw);
  min-height: 40px;
  padding: 8px 14px 8px 38px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--color-text);
  font: inherit;
}

.ops-top-search-placeholder input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ops-topbar-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ops-topbar-profile-meta {
  display: grid;
  gap: 0;
  line-height: 1.2;
}

.ops-topbar-avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #163a63;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ops-topbar-role {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.ops-shell .site-footer {
  margin-top: auto;
}

.ops-shell .header-controls {
  gap: 8px;
}

.ops-shell .header-controls .primary-button,
.ops-shell .header-controls .secondary-button {
  min-height: 40px;
  padding: 8px 14px;
}

.portfolio-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(200px, 0.7fr);
  gap: 16px;
  align-items: center;
}

.occupancy-ring {
  --occupancy: 0;
  width: 132px;
  height: 132px;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--color-card-bg) 68%, transparent 69% 100%),
    conic-gradient(var(--color-action) calc(var(--occupancy) * 1%), var(--color-border) 0);
  display: grid;
  place-items: center;
  text-align: center;
}

.occupancy-ring-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.occupancy-ring-label {
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.property-card-grid,
.tenant-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.entity-card {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.entity-card-media {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  background:
    linear-gradient(145deg, #1b2a3d 0%, #244f77 48%, #2f6fa8 100%);
}

.entity-card-media .property-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.entity-card-media-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.property-placeholder {
  position: relative;
  display: grid;
  place-items: stretch;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
  background:
    linear-gradient(145deg, #1b2a3d 0%, #244f77 48%, #2f6fa8 100%);
}

.property-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../images/branding/originals/somnium-properties-logo-master.png");
  background-repeat: no-repeat;
  background-position: calc(100% - 12px) calc(100% - 10px);
  background-size: 34px auto;
  opacity: 0.18;
  pointer-events: none;
}

.property-placeholder-svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-placeholder-sky {
  fill: transparent;
}

.property-placeholder-mini {
  width: 44px;
  height: 36px;
  min-height: 36px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.property-placeholder-mini::after {
  background-size: 16px auto;
  background-position: calc(100% - 4px) calc(100% - 3px);
  opacity: 0.22;
}

.property-placeholder-mini .property-placeholder-svg {
  border-radius: 8px;
}

.entity-card-body {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
}

.entity-card-tenant .entity-card-body {
  padding-top: 14px;
}

.entity-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.entity-card-header-avatar {
  align-items: center;
}

.entity-card-header-text {
  flex: 1 1 auto;
  min-width: 0;
}

.entity-card-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}

.entity-card-meta,
.entity-card-stats {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.86rem;
}

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

.entity-card-stats dt {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.entity-card-stats dd {
  margin: 0;
  color: var(--color-text);
  font-weight: 600;
}

.entity-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.entity-card-muted {
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

.avatar-initials {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1b2a3d, #2f6fa8);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.avatar-initials-sm {
  width: 32px;
  height: 32px;
  font-size: 0.72rem;
}

.avatar-initials-md {
  width: 40px;
  height: 40px;
}

.avatar-initials-lg {
  width: 48px;
  height: 48px;
  font-size: 0.92rem;
}

.lease-progress {
  display: grid;
  gap: 6px;
  min-width: 140px;
}

.lease-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}

.lease-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--color-action);
}

.lease-progress-fill.is-warning {
  background: var(--color-warning);
}

.lease-progress-fill.is-danger {
  background: var(--color-danger);
}

.lease-progress-fill.is-ok {
  background: var(--color-success);
}

.lease-progress-meta {
  color: var(--color-text-secondary);
  font-size: 0.8rem;
}

.activity-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.activity-tab {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.activity-tab.is-active {
  background: rgba(47, 111, 168, 0.1);
  border-color: rgba(47, 111, 168, 0.28);
  color: var(--color-action-active);
}

.activity-panel[hidden] {
  display: none;
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

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

.property-hero {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.property-hero-media {
  min-height: 160px;
  border-radius: var(--radius-panel);
  background:
    linear-gradient(145deg, rgba(49, 93, 132, 0.35), rgba(27, 42, 61, 0.7)),
    repeating-linear-gradient(
      -24deg,
      rgba(255, 255, 255, 0.06) 0 12px,
      rgba(255, 255, 255, 0) 12px 24px
    );
}

.finance-lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.finance-lane {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-soft-surface);
}

.finance-lane h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.finance-lane p {
  margin: 0 0 12px;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

.deferred-notice {
  max-width: 40rem;
  padding: 20px 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-soft-surface);
}

.deferred-notice h2 {
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.dashboard-layout-wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  align-items: start;
}

.quick-actions-panel {
  position: sticky;
  top: 84px;
}

/* Dashboard composition */
.dash-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  gap: 20px;
  align-items: start;
}

.dash-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.dash-rail {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 84px;
}

.dash-section,
.dash-group,
.dash-occupancy,
.dash-property-summary,
.dash-activity,
.dash-qa,
.dash-alerts {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-soft);
}

.dash-section,
.dash-activity,
.dash-occupancy,
.dash-property-summary,
.dash-qa,
.dash-alerts {
  padding: 18px 18px 16px;
}

.dash-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-section-head h2,
.dash-panel-title,
.dash-group-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dash-section-link {
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

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

.dash-metric {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  padding: 14px 14px 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(30, 50, 68, 0.05);
  text-decoration: none;
  color: inherit;
  min-height: 88px;
}

a.dash-metric:hover {
  border-color: rgba(47, 111, 168, 0.35);
  color: inherit;
}

.dash-metric-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(47, 111, 168, 0.1);
  color: var(--color-action);
}

.dash-metric-occupied .dash-metric-icon {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.dash-metric-vacant .dash-metric-icon {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.dash-metric-label {
  grid-column: 2;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dash-metric-value {
  grid-column: 2;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.dash-metric-occupancy {
  position: relative;
}

.dash-metric-ring {
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #fff 64%, transparent 65% 100%),
    conic-gradient(var(--color-action) calc(var(--occupancy, 0) * 1%), var(--color-border) 0);
}

.dash-group-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.dash-group {
  padding: 16px 16px 14px;
}

.dash-group-note {
  margin: 4px 0 10px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.dash-group-stats {
  margin: 10px 0 0;
  display: grid;
  gap: 10px;
}

.dash-group-stats > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.dash-group-stats dt {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
}

.dash-group-stats dd {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}

.dash-group-stats a {
  text-decoration: none;
}

.dash-mid-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.55fr);
  gap: 14px;
  align-items: stretch;
}

.dash-occupancy-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 8px;
}

.dash-occupancy-ring {
  --occupancy: 0;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--color-card-bg) 66%, transparent 67% 100%),
    conic-gradient(var(--color-action) calc(var(--occupancy) * 1%), #e4ebf1 0);
  display: grid;
  place-items: center;
}

.dash-occupancy-ring-inner {
  text-align: center;
}

.dash-occupancy-pct {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.dash-occupancy-caption {
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.dash-occupancy-legend {
  margin: 0;
  display: grid;
  gap: 8px;
}

.dash-occupancy-legend > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--color-soft-surface);
}

.dash-occupancy-legend dt {
  color: var(--color-text-secondary);
  font-size: 0.86rem;
}

.dash-occupancy-legend dd {
  margin: 0;
  font-weight: 700;
}

.dash-property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.dash-property-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
}

.dash-property-media {
  min-height: 84px;
  background:
    linear-gradient(135deg, rgba(49, 93, 132, 0.3), rgba(27, 42, 61, 0.55)),
    repeating-linear-gradient(
      -28deg,
      rgba(255, 255, 255, 0.05) 0 10px,
      rgba(255, 255, 255, 0) 10px 20px
    );
}

.dash-property-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.dash-property-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.dash-property-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.dash-property-meta {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.84rem;
}

.dash-property-stats {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.dash-property-stats dt {
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dash-property-stats dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.dash-property-view {
  justify-self: start;
  min-height: 34px;
  padding: 4px 12px;
  font-size: 0.84rem;
}

.dash-activity-table-wrap {
  overflow-x: auto;
}

.dash-activity-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dash-activity-table th,
.dash-activity-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.dash-activity-table th {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--color-soft-surface);
}

.dash-activity-table tbody tr:hover td {
  background: rgba(47, 111, 168, 0.04);
}

.dash-finance-footer {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 4px 2px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.dash-finance-footer a {
  font-weight: 600;
  text-decoration: none;
}

.dash-finance-footer-meta {
  color: var(--color-text-muted);
}

.dash-qa-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.dash-qa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  color: var(--color-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}

a.dash-qa-btn:hover {
  border-color: rgba(47, 111, 168, 0.35);
  background: rgba(47, 111, 168, 0.06);
  color: var(--color-action-active);
}

.dash-qa-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  color: var(--color-text-muted);
}

.dash-qa-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(47, 111, 168, 0.1);
  color: var(--color-action);
}

.dash-qa-btn.is-disabled .dash-qa-icon {
  background: var(--color-soft-surface);
  color: var(--color-text-muted);
}

.dash-alert-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.dash-alert {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  border-left-width: 3px;
}

.dash-alert-info {
  border-left-color: var(--color-action);
}

.dash-alert-warning {
  border-left-color: var(--color-warning);
  background: var(--color-warning-bg);
}

.dash-alert-danger {
  border-left-color: var(--color-danger);
  background: var(--color-danger-bg);
}

.dash-alert-link,
.dash-alert-static {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
}

.dash-alert-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.dash-alert-detail {
  grid-column: 1;
  color: var(--color-text-secondary);
  font-size: 0.8rem;
}

.dash-alert-count {
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(27, 42, 61, 0.08);
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
}

@media (max-width: 1100px) {
  .ops-shell {
    grid-template-columns: 1fr;
  }

  .ops-sidebar {
    position: relative;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .ops-shell .site-nav {
    display: none;
  }

  .ops-shell .site-nav.is-mobile-open {
    display: flex;
  }

  .ops-shell .nav-menu-toggle {
    display: inline-flex;
  }

  .ops-shell .nav-dropdown-menu,
  .ops-shell .nav-combo .nav-dropdown-menu {
    position: static;
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
  }

  .ops-shell .site-nav[data-nav-ready] .nav-dropdown-menu,
  .ops-shell .site-nav[data-nav-ready] .nav-combo .nav-dropdown-menu {
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .ops-shell .site-nav[data-nav-ready] .nav-dropdown.is-open .nav-dropdown-menu,
  .ops-shell .site-nav[data-nav-ready] .nav-combo.is-open .nav-dropdown-menu {
    display: grid;
    margin-top: 8px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .portfolio-spotlight,
  .dashboard-layout-wide,
  .dash-shell,
  .px-dash,
  .dash-mid-row,
  .dash-group-row,
  .px-portfolio,
  .px-finance,
  .px-activity,
  .finance-lane-grid,
  .finance-launch-grid,
  .finance-panel-grid,
  .property-card-grid,
  .tenant-card-grid,
  .messages-shell,
  .property-hero {
    grid-template-columns: 1fr;
  }

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

  .px-dash-rail {
    position: static;
  }

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

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

  .dash-rail,
  .quick-actions-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  .ops-main {
    padding: 0 16px 16px;
  }

  .ops-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ops-top-search input {
    min-width: 0;
    width: 100%;
  }

  .dash-metric-grid {
    grid-template-columns: 1fr;
  }

  .lease-summary-grid,
  .finance-metric-grid {
    grid-template-columns: 1fr;
  }

  .dash-occupancy-body {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

/* Visual conformity — hub layouts */
.lease-summary-grid,
.finance-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.finance-metric-grid .metric-card,
.finance-metric-grid .metric-card-link {
  background: var(--color-card-bg);
  box-shadow: var(--shadow-soft);
}

.finance-hub {
  display: grid;
  gap: 18px;
  min-width: 0;
}

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

.finance-launch-panel,
.finance-panel {
  padding: 16px 16px 14px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.finance-launch-panel h2 {
  margin: 0 0 8px;
  font-size: 1.02rem;
}

.finance-launch-panel p,
.finance-panel-copy {
  margin: 0 0 12px;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

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

.finance-action-panel {
  margin-bottom: 4px;
}

.finance-action-metrics {
  margin-bottom: 14px;
}

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

.finance-ops-card {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 148px;
  padding: 16px 16px 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(16, 33, 58, 0.06);
  overflow: hidden;
}

.finance-ops-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--color-action);
}

.finance-ops-card.is-income::before { background: #2f9e44; }
.finance-ops-card.is-expense::before { background: #e67700; }
.finance-ops-card.is-unpaid::before { background: #c0392b; }
.finance-ops-card.is-cash::before { background: #1263cf; }

.finance-ops-card-icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 6px;
  border-radius: 999px;
}

.finance-ops-card.is-income .finance-ops-card-icon { background: #e8f7ec; color: #2f9e44; }
.finance-ops-card.is-expense .finance-ops-card-icon { background: #fff4e5; color: #e67700; }
.finance-ops-card.is-unpaid .finance-ops-card-icon { background: #fde8e8; color: #c0392b; }
.finance-ops-card.is-cash .finance-ops-card-icon { background: #eaf2fb; color: #1263cf; }

.finance-ops-card h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.finance-ops-card-amount {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.finance-ops-card-period,
.finance-ops-card-support {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 0.78rem;
}

.finance-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finance-subheading {
  margin: 16px 0 8px;
  font-size: 0.95rem;
}

.finance-task-table-wrap {
  margin-top: 8px;
}

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

.document-pending-note {
  margin: 12px 0 0;
  color: var(--color-text-secondary);
}

.chat-list-heading {
  margin: 10px 12px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.chat-list-item.is-group {
  background: #f4f8fd;
}

.chat-group-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eaf2fb;
  color: #1263cf;
  flex-shrink: 0;
}

.chat-bubble-sender {
  margin: 0 0 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.lease-preview-card {
  margin-top: 18px;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
}

.lease-legal-placeholder {
  margin-top: 16px;
  padding: 14px;
  background: #f7f4ea;
  border: 1px dashed #c4b57a;
  border-radius: 8px;
}

.finance-panel-stats {
  margin: 8px 0 10px;
  display: grid;
  gap: 8px;
}

.finance-panel-stats > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
}

.finance-panel-stats dt {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
}

.finance-panel-stats dd {
  margin: 0;
  font-weight: 700;
}

.finance-attention {
  padding: 16px 16px 14px;
}

.lease-tenant-cell,
.lease-property-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lease-tenant-text,
.lease-property-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.lease-tenant-name,
.lease-property-name {
  font-weight: 600;
  color: var(--color-text);
}

.lease-tenant-email,
.lease-unit-name {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.table-action-link {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.messages-shell {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  min-height: 360px;
}

.messages-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 14px 12px;
  background: linear-gradient(180deg, #1b2a3d 0%, #152233 100%);
  border-right: 1px solid var(--color-border);
}

.messages-nav-item {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(245, 248, 251, 0.72);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: not-allowed;
  opacity: 0.85;
}

.messages-nav-item.is-active {
  background: var(--color-action);
  color: #ffffff;
  opacity: 1;
}

.messages-main {
  display: grid;
  place-items: center;
  padding: 28px 24px;
  background: var(--color-card-bg);
}

.messages-empty {
  max-width: 28rem;
  text-align: center;
}

.messages-empty h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.messages-empty p {
  margin: 0;
  color: var(--color-text-secondary);
}

.role-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(47, 111, 168, 0.1);
  color: var(--color-action-active);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.users-table .status-badge {
  font-size: 0.75rem;
}

/* Pixel-conformity dashboard */
.px-dash {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 24%);
  gap: 20px;
  align-items: start;
}

.px-dash-main,
.px-dash-rail {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.px-dash-rail {
  position: sticky;
  top: 78px;
}

.px-panel {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 16px 18px;
}

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

.px-panel-head h2 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.px-panel-head h2 svg {
  color: var(--color-action);
  flex: 0 0 auto;
}

.px-panel-note {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.px-portfolio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px auto;
  gap: 16px;
  align-items: center;
}

.px-portfolio-divider {
  width: 1px;
  align-self: stretch;
  background: var(--color-border);
}

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

.px-metric {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 1px;
  align-items: center;
  min-height: 70px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 10px rgba(16, 33, 58, 0.03);
}

a.px-metric:hover { border-color: rgba(18, 99, 207, 0.35); color: inherit; }

.px-metric-icon {
  grid-row: 1 / span 2;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eaf2fb;
  color: var(--color-action);
}

.px-metric-icon.is-slate { background: #eef2f6; color: var(--color-muted-slate); }
.px-metric-icon.is-green { background: var(--color-success-bg); color: var(--color-success); }
.px-metric-icon.is-orange { background: var(--color-warning-bg); color: var(--color-warning); }
.px-metric-icon.is-red { background: #fde8e8; color: #c0392b; }
.px-metric-icon.is-blue { background: #eaf2fb; color: var(--color-action); }

.px-metric-label {
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.px-metric-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.px-donut {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 150px;
  padding: 4px 8px;
}

.px-donut-ring {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: conic-gradient(var(--color-action) 0 calc(var(--occ, 0) * 1%), #e6edf4 0);
}

.px-donut-ring::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: #fff;
}

.px-donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  z-index: 1;
}

.px-donut-center strong {
  font-size: 1.25rem;
  line-height: 1.05;
}

.px-donut-center span {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.px-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-weight: 600;
}

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

.px-legend .swatch,
.px-legend i.swatch {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  font-style: normal;
}

.swatch.is-occ { background: var(--color-action); }
.swatch.is-vac { background: #cfd8df; }
.swatch.is-income { background: var(--color-success); }
.swatch.is-expense { background: var(--color-danger); }
.swatch.is-unpaid { background: var(--color-warning); }

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

.px-chip {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 10px 12px 14px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

a.px-chip:hover { border-color: rgba(18, 99, 207, 0.35); color: inherit; }

.px-chip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
}

.px-chip.is-blue::after { background: var(--color-action); }
.px-chip.is-blue .px-chip-icon { background: #eaf2fb; color: var(--color-action); }

.px-chip.is-green::after { background: var(--color-success); }
.px-chip.is-green .px-chip-icon { background: var(--color-success-bg); color: var(--color-success); }

.px-chip.is-orange::after { background: var(--color-warning); }
.px-chip.is-orange .px-chip-icon { background: var(--color-warning-bg); color: var(--color-warning); }

.px-chip.is-red::after { background: var(--color-danger); }
.px-chip.is-red .px-chip-icon { background: var(--color-danger-bg); color: var(--color-danger); }

.px-chip.is-purple::after { background: var(--color-purple); }
.px-chip.is-purple .px-chip-icon { background: var(--color-purple-bg); color: var(--color-purple); }

.px-chip-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.px-chip-label {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
}

.px-chip-value {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
}

.px-finance {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

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

.px-finance-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

a.px-finance-card:hover { border-color: rgba(18, 99, 207, 0.35); color: inherit; }

.px-finance-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  margin-bottom: 2px;
}

.px-finance-icon.is-green { background: var(--color-success-bg); color: var(--color-success); }
.px-finance-icon.is-orange { background: var(--color-warning-bg); color: var(--color-warning); }
.px-finance-icon.is-red { background: var(--color-danger-bg); color: var(--color-danger); }

.px-finance-label {
  color: var(--color-text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}

.px-finance-value {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.px-trend {
  font-size: 0.75rem;
  font-weight: 700;
}

.px-trend.is-up { color: var(--color-success); }
.px-trend.is-warn { color: var(--color-danger); }
.px-trend.is-muted { color: var(--color-text-muted); font-weight: 600; }

.px-mix {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 132px;
}

.px-mix-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: conic-gradient(
    var(--color-success) 0 calc(var(--income, 0) * 1%),
    var(--color-danger) calc(var(--income, 0) * 1%) calc((var(--income, 0) + var(--expenses, 0)) * 1%),
    var(--color-warning) calc((var(--income, 0) + var(--expenses, 0)) * 1%) 100%
  );
  position: relative;
}

.px-mix-ring::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #fff;
}

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

.px-activity-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.px-activity-head h3 {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
}

.px-activity-head a,
.px-view-all {
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  color: var(--color-action);
}

.px-view-all {
  display: inline-block;
  margin-top: 10px;
}

.px-view-all.is-static {
  color: var(--color-action);
  margin: 10px 0 0;
}

.px-activity-list,
.px-task-list,
.px-attention-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.px-activity-list a,
.px-activity-list > li > div {
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fafbfc;
  text-decoration: none;
  color: inherit;
}

.px-activity-list a:hover { border-color: rgba(18, 99, 207, 0.35); color: inherit; }

.px-activity-list strong { font-size: 0.9rem; }
.px-activity-list span,
.px-activity-list em {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  font-style: normal;
}

.px-activity-foot {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}

.px-activity-foot strong {
  color: var(--color-text);
  font-weight: 700;
}

.px-empty {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

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

.px-qa {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 88px;
  padding: 14px 8px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.8rem;
  font-weight: 650;
}

a.px-qa:hover { border-color: rgba(18, 99, 207, 0.4); color: inherit; }

.px-qa > span {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eaf2fb;
  color: var(--color-action);
}

.px-qa.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.px-task-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.px-task-stat {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
}

.px-task-stat span {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}

.px-task-stat strong {
  font-size: 1.35rem;
  line-height: 1.1;
}

.px-task-stat.tone-open strong { color: var(--color-action); }
.px-task-stat.is-done strong { color: var(--color-success); }

.px-task-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fafbfc;
  text-decoration: none;
  color: inherit;
}

.px-task-list a:hover { border-color: rgba(18, 99, 207, 0.35); color: inherit; }

.px-urgency {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-top: 6px;
  background: var(--color-action);
}

.px-urgency.is-high { background: var(--color-danger); }
.px-urgency.is-medium { background: var(--color-warning); }
.px-urgency.is-low { background: var(--color-action); }

.px-task-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.px-task-body strong {
  font-size: 0.86rem;
  font-weight: 650;
}

.px-task-body span,
.px-task-body em {
  color: var(--color-text-secondary);
  font-size: 0.74rem;
  font-style: normal;
}

.px-priority {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.px-priority.is-high,
.px-priority.is-urgent { background: var(--color-danger-bg); color: var(--color-danger); }
.px-priority.is-medium,
.px-priority.is-normal { background: var(--color-warning-bg); color: #b45309; }
.px-priority.is-low { background: #eaf2fb; color: var(--color-action); }

.px-urgency.is-high,
.px-urgency.is-urgent { background: var(--color-danger); }
.px-urgency.is-medium,
.px-urgency.is-normal { background: var(--color-warning); }
.px-urgency.is-low { background: var(--color-action); }

.px-attention {
  padding: 12px 14px;
}

.px-attention .px-panel-head { margin-bottom: 8px; }
.px-attention .px-panel-head h2 { font-size: 0.95rem; }

.px-attention-list li {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fafbfc;
}

.px-attention-list li.is-warning { background: var(--color-warning-bg); border-color: #f1d7a4; }
.px-attention-list li.is-danger { background: var(--color-danger-bg); border-color: #f0bcbc; }
.px-attention-list li.is-info { background: #eef5fb; border-color: #c9dced; }

.px-attention-list a,
.px-attention-list > li > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 8px 10px;
  text-decoration: none;
  color: inherit;
}

.px-attention-list strong { font-size: 0.84rem; }
.px-attention-list span {
  grid-column: 1;
  color: var(--color-text-secondary);
  font-size: 0.74rem;
}
.px-attention-list em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-style: normal;
  font-size: 1.05rem;
  font-weight: 700;
}

.px-finance-link {
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.px-finance-link a {
  font-weight: 650;
  text-decoration: none;
}

.ops-shell .site-footer {
  margin-top: 12px;
  padding-top: 8px;
  font-size: 0.75rem;
}

@media (max-width: 1200px) {
  .px-dash,
  .px-portfolio,
  .px-finance,
  .px-activity {
    grid-template-columns: 1fr;
  }

  .px-portfolio-divider { display: none; }

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

  .px-dash-rail { position: static; }

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

@media (max-width: 768px) {
  .px-metric-grid,
  .px-tenancy,
  .px-finance-cards,
  .px-qa-grid,
  .px-task-summary,
  .finance-ops-card-grid {
    grid-template-columns: 1fr;
  }
}

.nav-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 8px;
  padding: 0 5px;
  border-radius: 999px;
  background: #c0392b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.messages-channel-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.messages-channel-link,
.messages-channel-sub {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
}

.messages-channel-link.is-active,
.messages-channel-sub.is-active {
  background: #1263cf;
  border-color: #1263cf;
  color: #fff;
}

.messages-home-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.messages-home-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
}

.chat-shell {
  padding-bottom: 0;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  min-height: 62vh;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: #fff;
}

.chat-list-pane {
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #f8fafc;
}

.chat-search {
  padding: 12px;
}

.chat-search input {
  width: 100%;
}

.chat-conversation-list {
  overflow-y: auto;
  flex: 1;
}

.chat-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.chat-list-item:hover,
.chat-list-item.is-active {
  background: #e8f1fb;
}

.chat-list-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.chat-list-name {
  font-weight: 600;
}

.chat-list-preview,
.chat-list-meta time {
  color: #667085;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.new-chat-user-list li + li {
  border-top: 1px solid var(--color-border);
}

.chat-thread-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
}

.chat-thread-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

.chat-back-link {
  display: none;
}

.chat-thread-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f6f8fb;
}

.chat-bubble {
  max-width: min(72%, 520px);
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.chat-bubble p {
  margin: 0 0 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble time {
  display: block;
  font-size: 0.72rem;
  color: #667085;
}

.chat-bubble.is-self {
  margin-left: auto;
  background: #1263cf;
  color: #fff;
}

.chat-bubble.is-self time {
  color: rgba(255, 255, 255, 0.8);
}

.chat-bubble.is-other {
  margin-right: auto;
  background: #fff;
  border: 1px solid var(--color-border);
}

.chat-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--color-border);
  background: #fff;
}

.chat-composer-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-composer-input {
  flex: 1;
  min-height: 44px;
  resize: none;
}

.chat-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  color: var(--color-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.chat-icon-button:hover {
  background: #e8f1fb;
}

.chat-emoji-wrap {
  position: relative;
}

.chat-emoji-picker {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 8;
  display: none;
  grid-template-columns: repeat(6, 1.75rem);
  gap: 4px;
  width: max-content;
  padding: 8px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.chat-emoji-picker.is-open {
  display: grid;
}

.chat-emoji-picker[hidden] {
  display: none;
}

.chat-emoji-choice {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}

.chat-emoji-choice:hover {
  background: #e8f1fb;
  border-radius: 6px;
}

.chat-selected-file {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #667085;
  font-size: 0.82rem;
}

.chat-selected-clear {
  border: 0;
  background: transparent;
  color: #1263cf;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.chat-attachment-image-link {
  display: inline-block;
  margin: 6px 0;
}

.chat-attachment-image {
  display: block;
  max-width: min(240px, 100%);
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.chat-pdf-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d2939;
  border: 1px solid var(--color-border);
}

.chat-pdf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 28px;
  border-radius: 6px;
  background: #d92d20;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.chat-pdf-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
  font-size: 0.82rem;
}

.chat-pdf-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-pdf-action {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1263cf;
  text-decoration: none;
}

@media (max-width: 900px) {
  .chat-attachment-image {
    max-width: 100%;
    max-height: 220px;
  }
}

.chat-thread-empty {
  margin: auto;
  text-align: center;
  padding: 32px;
  color: #667085;
}

.new-chat-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.email-body {
  white-space: pre-wrap;
  font-family: inherit;
  background: #f6f8fb;
  padding: 12px;
  border-radius: 8px;
}

.qa-delivery-banner {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #fff6e5;
  border: 1px solid #f0d9a6;
}

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

  .chat-shell.is-thread-open .chat-list-pane {
    display: none;
  }

  .chat-shell:not(.is-thread-open) .chat-thread-pane {
    display: none;
  }

  .chat-back-link {
    display: inline-flex;
    margin-right: 4px;
  }
}

