:root {
  --ink: #14233d;
  --muted: #66758f;
  --soft: #f5f7fb;
  --line: #dde4ee;
  --panel: #ffffff;
  --page: #f7f9fc;
  --green: #1f8b63;
  --green-deep: #17684b;
  --coral: #c85642;
  --teal: #1d3157;
  --gold: #d2a33b;
  --navy: #14233d;
  --navy-soft: #21385f;
  --navy-wash: #eef3fb;
  --gold-soft: #fff5de;
  --shadow: 0 16px 38px rgba(20, 35, 61, 0.08);
}

@media (max-width: 900px) {

  .project-account-settings-table {
    table-layout: auto;
    min-width: 720px;
  }

  .project-account-settings-table-wrap {
    overflow-x: auto;
  }}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(247,249,252,0.96)), var(--page);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--coral);
  font-weight: 800;
  text-transform: uppercase;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  gap: 10px;
  align-items: center;
}

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

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

.stat-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  overflow-wrap: anywhere;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 178px);
}

.pane-title, .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.section-head {
  position: sticky;
  top: 85px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

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

.section-head select { max-width: 190px; }

.unit-list {
  max-height: calc(100vh - 238px);
  overflow: auto;
  padding: 8px;
}

.empty-state {
  padding: 20px;
  color: var(--muted);
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  padding: 16px;
}

.kv, .record, .summary-box, .import-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.kv {
  padding: 12px;
  min-width: 0;
  transition: border-color 150ms ease, transform 150ms ease;
}

.kv:hover {
  border-color: rgba(53, 127, 145, 0.35);
  transform: translateY(-1px);
}

.kv span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.kv strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.records {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.record {
  padding: 14px;
  box-shadow: 0 8px 20px rgba(33, 47, 39, 0.04);
}

.record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.record-head span {
  color: var(--teal);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  color: var(--muted);
}

.mini-grid span { overflow-wrap: anywhere; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding: 16px 16px 0;
}

.summary-box {
  padding: 13px;
  border-top: 3px solid var(--teal);
}

.summary-box:nth-child(2) { border-top-color: var(--coral); }
.summary-box:nth-child(3) { border-top-color: var(--gold); }

.summary-box strong {
  display: block;
  font-size: 20px;
  margin-top: 4px;
}

.document-record select { margin-bottom: 6px; }

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

.import-box {
  margin: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
  border-top: 3px solid var(--teal);
}

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

dialog {
  border: none;
  outline: none;
  border-radius: 0;
  width: min(var(--dialog-width, 760px), calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

/* Unit Overview keeps its existing layout; these styles apply only to its setup gate and manager. */
#main-inventory.unit-setup-gated > :not(.inventory-setup-gate) { display: none; }
.inventory-setup-gate { max-width: 720px; margin: 36px auto; padding: 32px; text-align: center; border: 1px solid #d8e2ef; border-radius: 18px; background: #fff; box-shadow: 0 14px 36px rgba(16, 43, 78, .09); }
.inventory-setup-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; color: #a95a00; background: #fff4df; border: 1px solid #f4c572; font-size: 28px; font-weight: 700; }
.inventory-setup-gate h2 { margin: 0; color: #102b57; font-size: 22px; }
.inventory-setup-gate p { margin: 8px auto; color: #526b91; }
.inventory-setup-note { max-width: 560px; padding: 12px; border: 1px solid #f5d3a3; border-radius: 10px; background: #fffaf1; color: #89500a !important; }
.inventory-setup-actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.manage-units-trigger { margin-left: 10px; }
.manage-units-dialog { width: min(1120px, calc(100vw - 32px)); max-width: min(1120px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid #bfcde1; border-radius: 14px; overflow: hidden; }
.manage-units-shell, .manage-unit-editor { min-width: min(820px, calc(100vw - 28px)); margin: 0; background: #fff; }
.manage-units-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: min(660px, calc(100vh - 32px)); overflow: hidden; }
.manage-units-shell > header, .manage-unit-editor > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid #e1e8f2; }
.manage-units-shell h2, .manage-unit-editor h2 { margin: 0; font-size: 19px; line-height: 1.15; color: #102b57; }
.manage-units-title { display: grid; gap: 3px; }
.manage-units-shell .manage-units-title span { margin: 0; color: #617899; font-size: 13px; }
.manage-units-head-actions { display: flex; align-items: center; gap: 10px; }
.manage-units-head-actions .small-btn { min-height: 36px; }
.manage-units-close { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 1px solid #d8e3f1; border-radius: 10px; color: #173766; background: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.manage-units-close:hover, .manage-units-close:focus-visible { color: #fff; background: #173766; border-color: #173766; outline: none; }
.manage-units-filters { display: grid; grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(150px, 1fr)) auto; gap: 10px; padding: 10px 18px; border-bottom: 1px solid #e7edf5; }
.manage-units-filters input, .manage-units-filters select, .manage-unit-editor input, .manage-unit-editor select, .manage-units-pagination select { min-height: 38px; padding: 7px 10px; border: 1px solid #cbd8e9; border-radius: 8px; color: #132c54; background: #fff; }
.manage-units-filters .small-btn { min-height: 38px; white-space: nowrap; }
.manage-units-table { min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 18px; scrollbar-gutter: stable; }
.manage-units-table table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.manage-units-col-unit { width: 34%; }.manage-units-col-type { width: 17%; }.manage-units-col-status { width: 13%; }.manage-units-col-actions { width: 36%; }
.manage-units-table th, .manage-units-table td { height: 58px; padding: 8px 10px; border-bottom: 1px solid #e6edf5; text-align: left; vertical-align: middle; font-size: 14px; }
.manage-units-table th { position: sticky; top: 0; height: 44px; background: #f7faff; color: #173766; z-index: 1; }
.manage-unit-identity { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manage-unit-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; white-space: nowrap; }
.manage-unit-actions .small-btn { min-height: 34px; padding: 0 10px; box-shadow: none; }
.manage-unit-actions .danger-btn { min-height: 34px; padding: 0 10px; border: 1px solid #f0b8b2; border-radius: 8px; background: #fff; color: #c43d31; box-shadow: none; }
.manage-unit-actions .danger-btn:hover, .manage-unit-actions .danger-btn:focus-visible { border-color: #dc5a4a; background: #fff3f1; color: #b63428; outline: none; }
.unit-status-pill { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #edf5ff; color: #255a9e; }
.unit-status-pill.sold { background: #fff0f0; color: #bd2f2f; }.unit-status-pill.hold { background: #fff7e7; color: #a86100; }.unit-status-pill.archived { background: #eef1f5; color: #667085; }.unit-status-pill.unsold { background: #eaf8f0; color: #087842; }
.manage-units-shell > footer, .manage-unit-editor > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid #e1e8f2; color: #5c7192; font-size: 13px; background: #fff; }
.manage-units-pagination { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.manage-units-pagination select { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.manage-units-empty { padding: 28px !important; text-align: center !important; color: #6b7f9f; }
.manage-unit-editor { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 20px 20px; }
.manage-unit-editor header, .manage-unit-editor footer { grid-column: 1 / -1; }
.manage-unit-editor label { display: grid; gap: 5px; color: #31527d; font-size: 13px; font-weight: 700; }
.manage-unit-setup-message { color: #9c5800; font-size: 12px; font-weight: 500; }
.manage-unit-editor footer { padding: 12px 0 0; }
@media (max-width: 720px) { .manage-units-dialog { width: calc(100vw - 18px); max-width: calc(100vw - 18px); }.manage-units-shell, .manage-unit-editor { min-width: 0; }.manage-units-shell { height: min(700px, calc(100vh - 18px)); }.manage-units-filters { grid-template-columns: 1fr 1fr; padding: 12px; }.manage-units-filters input { grid-column: 1 / -1; }.manage-units-table { overflow-x: auto; padding: 0 12px; }.manage-units-table table { min-width: 760px; }.manage-units-table th, .manage-units-table td { padding: 9px 7px; }.manage-unit-actions { flex-wrap: wrap; }.manage-units-shell > footer { align-items: flex-start; flex-direction: column; }.manage-units-pagination { flex-wrap: wrap; }.manage-unit-editor { grid-template-columns: 1fr; padding: 0 14px 14px; }.inventory-setup-gate { margin: 18px 10px; padding: 24px 16px; } }

dialog:focus,
dialog:focus-visible,
.developer-editor-dialog:focus,
.developer-editor-dialog:focus-visible,
[role="dialog"]:focus,
[role="dialog"]:focus-visible {
  outline: none !important;
}

.dialog-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 16px;
  align-items: start;
}

.dialog-form h2,
.dialog-form .dialog-copy,
.dialog-form .booking-warning,
.dialog-form .dialog-actions {
  grid-column: 1 / -1;
}

.dialog-form h2 { margin: 0 0 4px; }

dialog button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

#paymentDialog,
#createProjectDialog,
#bookingDialog,
#bookingCancelDialog,
#bookingTransactionDialog {
  --dialog-width: 720px;
}

#createProjectDialog .dialog-form {
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
  padding: 22px 24px 18px;
  gap: 16px 18px;
  border: 1px solid #e4ebf5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

#createProjectDialog .dialog-form h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

#createProjectDialog .dialog-form input,
#createProjectDialog .dialog-form select {
  width: 100%;
  min-width: 0;
}

#createProjectError {
  margin-top: -4px;
}

#createProjectDialog .dialog-actions {
  padding-top: 4px;
}

#bookingTransactionDialog .dialog-form {
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
  scrollbar-gutter: stable;
  padding-bottom: 12px;
  border: 1px solid #e4ebf5;
  border-radius: 14px;
  background: #fff;
}

#bookingTransactionDialog .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 12px;
  background: linear-gradient(to top, #ffffff 78%, rgba(255, 255, 255, 0.92) 100%);
  border-top: 1px solid #eef3f8;
}

#bookingTransactionDialog.booking-transaction-refund-dialog {
  --dialog-width: 820px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .dialog-form {
  background: #fff;
  border: 1px solid #dce6f2;
  border-radius: 18px;
  box-shadow: 0 28px 72px rgba(15, 34, 64, 0.2);
  gap: 0;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  padding: 0;
}

#bookingTransactionDialog.booking-transaction-refund-dialog h2 {
  color: #10284f;
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
  padding: 20px 24px 4px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .dialog-copy {
  border-bottom: 1px solid #e5edf7;
  color: #637895;
  margin: 0;
  padding: 0 24px 16px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-config,
#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-summary-grid,
#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-form-grid,
#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionRemark,
#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionError,
#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionComplianceWarning {
  margin-left: 24px;
  margin-right: 24px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-form-grid,
#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionRemark {
  grid-column: 1 / -1;
  width: auto;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-config {
  margin-top: 14px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-config label {
  color: #385674;
  font-size: 12px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-config select {
  border-color: #cfddec;
  border-radius: 10px;
  min-height: 40px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-summary-grid {
  gap: 10px;
  margin-bottom: 14px;
  margin-top: 10px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-summary-grid div {
  background: #f7faff;
  border-color: #dce7f4;
  border-radius: 10px;
  min-height: 62px;
  padding: 10px 12px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-summary-grid div:nth-child(6) strong {
  color: #a06200;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-form-grid {
  border-top: 1px solid #edf2f8;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 14px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-form-grid input,
#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-form-grid select {
  border-color: #d4dfed;
  border-radius: 9px;
  min-height: 40px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionReceiptCategory,
#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionDepositAccount {
  display: none;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-field:has(#bookingTransactionReceiptCategory),
#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionDepositAccountWrap {
  display: none;
}

#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionRefundAccountWrap {
  grid-column: 1 / -1;
  margin-top: 2px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionRefundAccountWrap select {
  width: 100%;
}

#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionRefundAccountHelp {
  color: #647a96;
  display: block;
  font-size: 11px;
  margin-top: 5px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionRemark {
  border-color: #d4dfed;
  border-radius: 9px;
  margin-bottom: 14px;
  margin-top: 12px;
  min-height: 40px;
}

#bookingTransactionDialog.booking-transaction-refund-dialog .dialog-actions {
  align-items: center;
  background: #fff;
  border-top: 1px solid #e5edf7;
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
  padding: 14px 24px;
}

@media (max-width: 720px) {
  #bookingTransactionDialog.booking-transaction-refund-dialog {
    --dialog-width: calc(100vw - 20px);
  }

  #bookingTransactionDialog.booking-transaction-refund-dialog .dialog-form {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }

  #bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-form-grid {
    grid-template-columns: 1fr;
  }

  #bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-config,
  #bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-summary-grid,
  #bookingTransactionDialog.booking-transaction-refund-dialog .booking-transaction-form-grid,
  #bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionRemark,
  #bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionError,
  #bookingTransactionDialog.booking-transaction-refund-dialog #bookingTransactionComplianceWarning {
    margin-left: 16px;
    margin-right: 16px;
  }

  #bookingTransactionDialog.booking-transaction-refund-dialog h2,
  #bookingTransactionDialog.booking-transaction-refund-dialog .dialog-copy,
  #bookingTransactionDialog.booking-transaction-refund-dialog .dialog-actions {
    padding-left: 16px;
    padding-right: 16px;
  }
}

#projectMemberEditor,
#attachMemberDialog {
  --dialog-width: 760px;
}

#projectMembersDialog,
#projectSwitcherDialog {
  --dialog-width: 1180px;
}

#configureDialog {
  --dialog-width: 1280px;
}

@media (max-width: 720px) {
  .dialog-form {
    grid-template-columns: 1fr;
  }}

@media (max-width: 1040px) {
  .tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tab {
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
  }
  .content-grid { grid-template-columns: 1fr; }
  .unit-list { max-height: 340px; }}

@media (max-width: 720px) {
  .toolbar, .stats-row, .import-fields { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: 1fr 1fr; }
  .section-head {
    position: static;
    display: grid;
  }
  .section-head select { max-width: none; }}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #dbe4df;
  padding: 22px;
}

.brand-block img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
}

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

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

.brand-block span {
  margin-top: 4px;
  color: #64736b;
  font-size: 13px;
}

.panel-copy {
  margin: 4px 0 0;
  color: #64736b;
  font-size: 13px;
}

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

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 22px;
  padding: 22px;
}

.overview-main,
.overview-side {
  display: grid;
  gap: 22px;
  align-content: start;
}

.panel {
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dbe4df;
  padding: 15px 18px;
}

.panel-head.in-panel {
  border-top: 0;
}

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

.customer-fields {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.customer-fields div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
}

.customer-fields span {
  color: #64736b;
}

.customer-fields strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.full-btn {
  width: calc(100% - 36px);
  margin: 0 18px 18px;
}

.doc-stack {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.doc-item {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe4df;
  border-radius: 8px;
  padding: 13px;
}

.doc-item strong,
.doc-item span,
.doc-item small {
  display: block;
  overflow-wrap: anywhere;
}

.doc-item span {
  margin-top: 4px;
  color: #64736b;
  font-size: 13px;
}

.doc-item small {
  color: #87938d;
  font-size: 12px;
}

.doc-item em {
  justify-self: start;
  border: 1px solid #dbe4df;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
}

.doc-item em.good {
  border-color: #bfe1d2;
  background: #e6f6ef;
  color: #1d7757;
}

.doc-item em.bad {
  border-color: #f0c2bd;
  background: #fff0ee;
  color: #aa3d32;
}

.doc-item em.neutral {
  background: #f3f6f4;
  color: #64736b;
}

.mini-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 16px 0;
}

.records {
  padding: 16px;
}

.kv-grid {
  padding: 16px;
}

.empty-state {
  display: none;
}

@media (max-width: 1220px) {
  .project-header {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 980px) {
  .portal-shell {
    display: block;
  }

  .app-sidebar {
    width: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid #dbe4df;
  }

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

  .side-nav button {
    text-align: center;
  }

  .overview-grid,
  .summary-grid,
  .search-row {
    grid-template-columns: 1fr;
  }}

@media (max-width: 680px) {
  .workspace,
  .project-header {
    padding: 14px;
  }

  .header-filters,
  .side-nav,
  .mini-summary {
    grid-template-columns: 1fr;
  }

  .overview-grid {
    padding: 14px;
  }}

/* Compact desktop density */
body {
  font-size: 14px;
}

.brand-block {
  padding: 16px 18px;
  gap: 10px;
}

.brand-block img {
  width: 38px;
  height: 38px;
}

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

.brand-block span {
  font-size: 12px;
}

.header-filters {
  gap: 8px;
}

.header-filters span {
  font-size: 11px;
}

input,
select {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 14px;
}

button {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 14px;
}

.header-actions {
  gap: 7px;
}

.search-row {
  grid-template-columns: minmax(240px, 420px) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 12px;
}

.summary-grid {
  gap: 12px;
  margin-bottom: 14px;
}

.summary-card {
  padding: 13px 16px;
}

.summary-card strong {
  margin-top: 6px;
  font-size: 22px;
}

.content-card > .tabs {
  padding: 10px 12px;
  gap: 8px;
}

.content-card .tab {
  min-height: 34px;
  padding: 7px 13px;
}

.overview-grid {
  gap: 16px;
  padding: 16px;
}

.overview-main,
.overview-side {
  gap: 16px;
}

.panel-head {
  padding: 11px 14px;
}

.panel-head h2 {
  font-size: 16px;
}

.detail-table,
.data-table {
  font-size: 13px;
}

.detail-table td,
.data-table th,
.data-table td {
  padding: 9px 12px;
}

.customer-fields {
  gap: 9px;
  padding: 14px;
}

.full-btn {
  width: calc(100% - 28px);
  margin: 0 14px 14px;
}

.doc-stack {
  gap: 9px;
  padding: 12px;
}

.doc-item {
  gap: 8px;
  padding: 10px;
}

.records,
.kv-grid {
  padding: 12px;
  gap: 10px;
}

.record {
  padding: 11px 13px;
}

.mini-summary {
  padding: 12px 12px 0;
}

.header-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
  max-width: 1224px;
  margin-top: 16px;
}

.header-filters label:first-child {
  display: none;
}

.header-filters span {
  display: none;
}

.header-filters select {
  min-height: 44px;
  border-radius: 8px;
  border-color: #d5dde7;
  box-shadow: 0 2px 6px rgba(8, 20, 42, 0.12);
  color: #08142a;
  font-size: 16px;
  padding: 0 14px;
}

.header-actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 14px;
}

.header-actions button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 750;
  box-shadow: 0 2px 7px rgba(8, 20, 42, 0.12);
}

#changeProjectBtn {
  background: #fff;
  color: #08142a;
  border-color: #e0e6ee;
}

#projectMembersBtn {
  background: #1f5eff;
  border-color: #1f5eff;
}

#configureBtn {
  background: #081024;
  border-color: #081024;
}

#refreshBtn {
  display: none;
}

.search-row {
  display: none;
}

.summary-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  min-height: 96px;
  border-color: #dfe6ee;
  border-radius: 8px;
  padding: 18px 22px;
  box-shadow: 0 2px 7px rgba(8, 20, 42, 0.12);
}

.summary-card span {
  color: #546981;
  font-size: 15px;
}

.summary-card strong {
  color: #08142a;
  font-size: 26px;
  margin-top: 10px;
}

@media (max-width: 980px) {
  .header-filters,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .header-actions {
    flex-wrap: wrap;
  }}

/* Screenshot-matched overview flow */
.workspace > .summary-grid,
.workspace > .content-card {
  max-width: 1224px;
}

.overview-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 38px 34px;
}

.overview-main,
.overview-side {
  gap: 24px;
}

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

.panel {
  box-shadow: 0 2px 7px rgba(8, 20, 42, 0.06);
}

.panel-head {
  padding: 22px 28px;
}

.panel-head h2 {
  font-size: 20px;
}

.detail-table,
.data-table {
  font-size: 15px;
}

.detail-table td,
.data-table th,
.data-table td {
  padding: 15px 24px;
}

.detail-table td:nth-child(odd) {
  width: 220px;
}

.customer-fields {
  padding: 24px 28px;
}

.customer-fields div {
  font-size: 15px;
}

.full-btn {
  width: calc(100% - 56px);
  min-height: 60px;
  margin: 0 28px 28px;
}

.doc-stack {
  gap: 18px;
  padding: 24px;
}

.doc-item {
  position: relative;
  gap: 12px;
  padding: 28px 28px 24px;
}

.doc-item em {
  position: absolute;
  top: 24px;
  right: 28px;
  justify-self: auto;
}

.doc-item .document-actions {
  margin-top: 8px;
}

.doc-item .document-actions button {
  min-height: 42px;
  border-radius: 7px;
  font-size: 14px;
}

.doc-item select {
  max-width: 360px;
}

@media (max-width: 980px) {
  .overview-grid {
    padding: 20px;
  }

  .detail-table td:nth-child(odd) {
    width: auto;
  }}

/* Dense laptop mode: keep all fields, reduce visual bulk */
body {
  font-size: 12px;
}

.inventory-toolbar {
  display: none;
}

.inventory-toolbar.active {
  display: block;
}

.placeholder-panel {
  min-height: 220px;
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: #fff;
  padding: 22px;
}

.placeholder-panel h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.placeholder-panel p {
  margin: 0;
  color: #546981;
}

.developers-shell {
  display: grid;
  gap: 16px;
}

.developers-header h2 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.developers-header p,
.developers-breadcrumb {
  margin: 0;
  color: #546981;
}

.developers-breadcrumb {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.developers-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.developers-list-card,
.developers-editor-card {
  overflow: hidden;
}

.developer-editor-dialog {
  width: auto;
  border: 0;
  outline: none !important;
  padding: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
}

.developer-editor-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  box-shadow: none !important;
}

.developer-editor-dialog[open] {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  margin: 0;
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: none;
  appearance: none;
  -webkit-appearance: none;
}

.developer-dialog-card {
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
}

#partnerDialog.developer-editor-dialog {
  --dialog-width: 760px;
}

.partner-dialog-card {
  background: #fff;
  border: 1px solid #e4ebf5;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  width: min(760px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 44px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-y: hidden;
}

.partner-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #edf2f8;
  background: #fff;
}

.partner-dialog-header-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding-right: 0;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 auto;
}

.partner-dialog-header h2 {
  margin: 0 0 4px;
  flex: 0 0 auto;
}

.partner-dialog-header .dialog-copy {
  margin: 0;
  max-width: 720px;
}

.partner-dialog-header .partner-share-helper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.partner-dialog-header .partner-share-helper strong,
.partner-dialog-header .partner-share-helper span {
  margin: 0;
  font-size: 12px;
}

.partner-dialog-header .partner-share-helper small {
  display: none;
}

.partner-dialog-form {
  background: #fff;
  padding: 0;
  gap: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

.partner-dialog-section-title {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.partner-dialog-notes,
#partnerDialogError,
.partner-dialog-form .dialog-actions {
  grid-column: 1 / -1;
}

.partner-dialog-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  padding: 16px 20px 14px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  width: 100%;
  box-sizing: border-box;
  align-self: stretch;
  border: 0;
  outline: none;
  box-shadow: none;
}

.partner-dialog-body:focus,
.partner-dialog-body:focus-visible,
.partner-dialog-card:focus,
.partner-dialog-card:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.partner-dialog-actions {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 20px 18px;
  border-top: 1px solid #edf2f8;
  background: #fff;
}

.developers-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
}

.developers-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 18px;
}

.developers-summary-strip article {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
}

.developers-summary-strip span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.developers-summary-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  color: #0f172a;
}

.developers-editor-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
}

.developers-editor-head h3 {
  margin: 0;
  font-size: 18px;
}

.developers-form {
  display: grid;
  gap: 16px;
  padding: 18px 20px 88px;
  position: relative;
}

.developers-form-section {
  display: grid;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf2f7;
}

.developers-form-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.developers-form-section h4 {
  margin: 0;
  font-size: 16px;
}

.developers-form-grid {
  display: grid;
  gap: 12px;
}

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

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

.developers-form label,
.inline-select {
  display: grid;
  gap: 6px;
}

.developers-form label > span,
.inline-select span {
  color: #546981;
  font-size: 12px;
  font-weight: 700;
}

.developers-form label.label-invalid > span,
.developers-form .label-invalid > span,
.developers-form tr.label-invalid td:first-child,
.developers-form tr.label-invalid td strong {
  color: #c62828;
}

.developers-form .field-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.developers-form textarea {
  width: 100%;
  min-height: 90px;
  border: 1px solid #dbe4df;
  border-radius: 7px;
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
}

.developers-checkbox {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.developers-checkbox input {
  width: auto;
  min-height: 0;
}

.file-ref-field {
  align-content: start;
}

.file-ref-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.file-ref-row input[readonly] {
  background: #f8fafc;
}

.developer-documents-table-wrap {
  border: 1px solid #e5edf6;
  border-radius: 12px;
}

.developer-documents-table td,
.developer-documents-table th {
  vertical-align: middle;
}

.developer-doc-file-row {
  min-width: 280px;
}

.developer-doc-status-cell {
  display: grid;
  gap: 2px;
}

.developer-doc-status-cell strong {
  font-size: 13px;
  color: #0f172a;
}

.developer-doc-status-cell small {
  font-size: 11px;
  color: #64748b;
}

.compact-info-grid label {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e5edf6;
  border-radius: 10px;
  background: #f8fbff;
}

.compact-info-grid span {
  font-size: 12px;
  color: #64748b;
}

.compact-info-grid strong {
  font-size: 14px;
  color: #0f172a;
}

@media (max-width: 1100px) {
  .developers-form-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }}

@media (max-width: 780px) {
  .developers-form-grid-3 {
    grid-template-columns: 1fr;
  }}

.developers-section-headline {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.developers-partner-pick-list,
.developers-selected-partners,
.developers-legal-doc-list {
  display: grid;
  gap: 10px;
}

.developers-partner-row,
.developers-legal-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.developers-partner-choice,
.developers-legal-choice {
  display: flex !important;
  align-items: start;
  gap: 10px;
}

.developers-partner-choice input,
.developers-legal-choice input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
}

.developers-partner-choice strong,
.developers-legal-choice span {
  display: block;
  color: #0f172a;
}

.developers-partner-choice span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
}

.developer-inline-file {
  margin-top: 10px;
}

.developer-selected-chip {
  border: 1px solid #dcfce7;
  background: #f0fdf4;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 2px;
}

.developer-selected-chip span {
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
}

.developer-selected-chip small,
.developers-empty-inline {
  color: #64748b;
  font-size: 12px;
}

.developers-legal-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.developers-legal-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin-bottom: 10px;
}

.developers-delete-card {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.developers-delete-card strong {
  font-size: 18px;
  color: #9a3412;
}

.developers-delete-card p {
  margin: 0;
  color: #7c2d12;
}

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

.developers-sticky-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.94) 20%, rgba(255,255,255,1) 100%);
}

.danger-btn {
  background: #dc2626;
  border-color: #dc2626;
}

.danger-btn:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.danger-outline-btn {
  background: #fff;
  color: #dc2626;
  border-color: #fca5a5;
}

.danger-outline-btn:hover {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #f87171;
}

@media (max-width: 1180px) {
  .developers-grid,
  .developers-grid.two-col,
  .developers-form-grid-2,
  .developers-legal-picks,
  .developers-summary-strip {
    grid-template-columns: 1fr;
  }}

.report-generator-card {
  border: 1px solid #dbe4df;
  border-radius: 12px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.report-generator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.report-generator-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.report-generator-head p {
  margin: 0;
  color: #546981;
}

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

.report-generator-grid .field-block input[readonly] {
  background: #f8fbff;
}

@media (max-width: 960px) {
  .report-generator-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .report-generator-grid {
    grid-template-columns: 1fr;
  }}

.dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.dashboard-actions button {
  min-height: 38px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 2px 7px rgba(8, 20, 42, 0.12);
}

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

.dashboard-wide {
  margin-top: 10px;
}

.dashboard-card {
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 8px 22px rgba(33, 47, 39, 0.06);
  min-height: 102px;
}

.dashboard-card span {
  display: block;
  color: #546981;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-card strong {
  display: block;
  margin-top: 6px;
  color: #08142a;
  font-size: 20px;
  line-height: 1.1;
}

.dashboard-card small {
  display: block;
  margin-top: 7px;
  color: #697989;
  font-size: 11px;
}

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

.status-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#2d8b68 var(--sold), #edf2ef 0);
  position: relative;
  flex: 0 0 auto;
}

.status-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.status-ring span {
  position: relative;
  z-index: 1;
  color: #08142a;
  font-size: 11px;
  font-weight: 800;
}

.meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2ef;
  margin-top: 10px;
}

.meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #357f91;
}

.meter.green i {
  background: #2d8b68;
}

.meter.red i {
  background: #c85642;
}

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

.dashboard-card-head small {
  margin: 0;
}

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

.status-bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
}

.status-bar-row span {
  color: #314254;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.status-bar-row .meter {
  margin: 0;
}

.status-bar-row strong {
  margin: 0;
  font-size: 13px;
  text-align: right;
}

.header-filters {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 10px;
  max-width: 980px;
}

.header-filters select {
  min-height: 34px;
  font-size: 13px;
  padding: 0 10px;
}

.header-actions {
  gap: 8px;
  margin-top: 10px;
}

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

@media (max-width: 780px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }}

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

.summary-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 6px;
  margin-bottom: 8px;
  max-width: 980px;
}

.summary-card {
  min-height: 54px;
  padding: 8px 10px;
}

.summary-card span {
  font-size: 11px;
}

.summary-card strong {
  font-size: 16px;
  margin-top: 3px;
}

.content-card {
  max-width: 980px;
}

.content-card > .tabs {
  padding: 6px 8px;
  gap: 5px;
}

.content-card .tab {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.overview-grid {
  gap: 10px;
  padding: 10px;
}

.overview-main,
.overview-side {
  gap: 10px;
}

.panel-head {
  padding: 8px 12px;
}

.panel-head h2 {
  font-size: 15px;
}

.detail-table,
.data-table {
  font-size: 12px;
}

.detail-table td,
.data-table th,
.data-table td {
  padding: 6px 10px;
}

.detail-table td:nth-child(odd) {
  width: 140px;
}

.customer-fields {
  gap: 5px;
  padding: 10px 12px;
}

.customer-fields div {
  font-size: 12px;
}

.full-btn {
  width: calc(100% - 24px);
  min-height: 34px;
  margin: 0 12px 12px;
  font-size: 12px;
}

.doc-stack {
  gap: 8px;
  padding: 10px;
}

.doc-item {
  gap: 6px;
  padding: 10px 12px;
}

.doc-item span,
.doc-item small {
  font-size: 11px;
}

.doc-item em {
  top: 10px;
  right: 12px;
  padding: 2px 7px;
  font-size: 10px;
}

.doc-item .document-actions {
  gap: 5px;
  margin-top: 3px;
}

.doc-item .document-actions button {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 11px;
}

.doc-item select {
  min-height: 30px;
  max-width: 280px;
  font-size: 12px;
}

.records,
.kv-grid {
  padding: 8px;
  gap: 6px;
}

.kv-grid {
  display: block;
}

.compact-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.compact-detail-table td,
.compact-detail-table th {
  border-bottom: 1px solid #edf2ef;
  padding: 7px 12px;
  text-align: left;
}

.compact-detail-table td:nth-child(odd) {
  width: 18%;
  background: #f7faf8;
  color: #52645b;
  font-weight: 700;
  text-transform: uppercase;
}

.compact-detail-table td:nth-child(even) {
  width: 32%;
  font-weight: 750;
}

.compact-detail-table .group-row th {
  background: #eaf3ee;
  color: #1d624b;
  font-size: 13px;
  padding: 8px 12px;
}

.record,
.kv {
  padding: 8px 10px;
}

.record-head {
  margin-bottom: 6px;
}

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

.mini-summary {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
  padding: 8px 8px 0;
}

.summary-box {
  padding: 8px 10px;
}

.summary-box strong {
  font-size: 16px;
  margin-top: 3px;
}

.import-box {
  margin: 8px;
  padding: 10px;
  gap: 8px;
}

.import-fields {
  gap: 8px;
}

.configure-form {
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  overflow: hidden;
  padding: 16px;
}

.dialog-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.row-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.row-actions button {
  min-height: 24px;
  padding: 3px 6px;
  font-size: 10px;
}

.record-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
  margin-bottom: 8px;
}

.record-actions button {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11px;
}

.payment-operator {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: #1b2b3d;
}

.payment-gap {
  width: 8px;
}

.payment-filter-row {
  padding: 6px 16px 10px;
}

.unit-previous-bookings-shell {
  display: grid;
  gap: 14px;
}

.unit-previous-bookings-workspace {
  display: grid;
  gap: 14px;
}

.unit-previous-bookings-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}
.unit-previous-bookings-summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #d8e3ef;
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  box-shadow: 0 8px 24px rgba(16, 35, 63, 0.05);
}
.unit-previous-bookings-summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.unit-previous-bookings-summary-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.unit-previous-bookings-summary-copy span {
  color: #5f7390;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.unit-previous-bookings-summary-copy strong {
  color: #10284f;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.unit-previous-bookings-summary-card.tone-cycles {
  border-color: #dccfff;
  background: linear-gradient(180deg, #faf7ff 0%, #f3eeff 100%);
}
.unit-previous-bookings-summary-card.tone-cycles .unit-previous-bookings-summary-icon {
  background: rgba(123, 77, 255, 0.12);
  color: #6b3de8;
}
.unit-previous-bookings-summary-card.tone-received {
  border-color: #cfe0ff;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4ff 100%);
}
.unit-previous-bookings-summary-card.tone-received .unit-previous-bookings-summary-icon {
  background: rgba(36, 100, 232, 0.11);
  color: #1f53ba;
}
.unit-previous-bookings-summary-card.tone-refunded {
  border-color: #cdebd5;
  background: linear-gradient(180deg, #f7fff9 0%, #edf9f0 100%);
}
.unit-previous-bookings-summary-card.tone-refunded .unit-previous-bookings-summary-icon {
  background: rgba(39, 174, 96, 0.12);
  color: #1f9d58;
}
.unit-previous-bookings-summary-card.tone-pending {
  border-color: #f3ddb5;
  background: linear-gradient(180deg, #fffaf2 0%, #fff3e0 100%);
}
.unit-previous-bookings-summary-card.tone-pending .unit-previous-bookings-summary-icon {
  background: rgba(230, 145, 56, 0.14);
  color: #d17a14;
}

.unit-previous-bookings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.unit-previous-bookings-table-card,
.unit-previous-bookings-detail-card {
  background: #fff;
  border: 1px solid #d8e3ef;
  border-radius: 16px;
  overflow: hidden;
}

.unit-previous-bookings-table-card-full {
  width: 100%;
}

.previous-bookings-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.previous-bookings-table-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.previous-bookings-table-controls label {
  display: grid;
  gap: 4px;
}

.previous-bookings-table-controls span {
  color: #66798f;
  font-size: 11px;
  font-weight: 700;
}

.previous-bookings-table-controls select {
  min-width: 210px;
  height: 36px;
  padding: 6px 10px;
}

.unit-previous-bookings-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  padding: 0 16px 16px;
}

.unit-previous-bookings-detail-grid div {
  display: grid;
  gap: 4px;
}

.unit-previous-bookings-detail-grid span {
  color: #677887;
  font-size: 12px;
}

.unit-previous-bookings-detail-grid strong {
  color: #10233f;
}

.unit-previous-bookings-transactions {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.unit-previous-bookings-subhead {
  font-size: 13px;
  font-weight: 700;
  color: #10233f;
}

.unit-previous-bookings-table .selected-row {
  background: #f5f9ff;
}

.unit-previous-booking-row {
  cursor: pointer;
}

.unit-previous-bookings-table-card-full .table-wrap {
  overflow-x: hidden;
}

.unit-previous-booking-row:hover {
  background: rgba(36, 100, 232, 0.04);
}

.previous-booking-row-pending {
  background: #fff8e9;
  box-shadow: inset 4px 0 0 #d88400;
}

.previous-booking-row-partial {
  background: #fffbef;
}

.previous-booking-row-complete {
  background: #f3fbf5;
}

.previous-booking-row-pending:hover {
  background: #ffecea;
}

.previous-booking-row-partial:hover {
  background: #fff4d9;
}

.previous-booking-row-complete:hover {
  background: #eaf8ee;
}

.unit-previous-bookings-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.previous-booking-col-booking { width: 16%; }
.previous-booking-col-timeline { width: 17%; }
.previous-booking-col-status { width: 11%; }
.previous-booking-col-value { width: 14%; }
.previous-booking-col-refund { width: 18%; }
.previous-booking-col-action { width: 24%; }

.unit-previous-bookings-table th,
.unit-previous-bookings-table td {
  padding: 10px 9px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.previous-booking-booking-cell,
.previous-booking-timeline-cell,
.previous-booking-status-cell,
.previous-booking-refund-summary,
.previous-booking-pending-action {
  display: grid;
  gap: 4px;
}

.previous-booking-booking-cell strong,
.previous-booking-value,
.previous-booking-pending-action > strong {
  color: #10233f;
  font-size: 13px;
  line-height: 1.25;
}

.previous-booking-booking-cell span,
.previous-booking-timeline-cell span,
.previous-booking-status-cell small,
.previous-booking-refund-summary span,
.previous-booking-pending-action small {
  color: #6b7d90;
  font-size: 11px;
  line-height: 1.3;
}

.previous-booking-refund-summary strong {
  color: #10233f;
  display: block;
  font-size: 12px;
}

.previous-booking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.previous-booking-actions .small-btn {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 11px;
  white-space: normal;
}

.refund-state-pending {
  color: #a06200 !important;
}

.refund-state-partial {
  color: #a06200 !important;
}

.refund-state-complete {
  color: #1e7a4f !important;
}

.previous-booking-amount-stack {
  display: grid;
  gap: 3px;
}

.previous-booking-amount-stack strong {
  font-size: 13px;
  color: #10233f;
}

.previous-booking-amount-stack small {
  color: #71839b;
  font-size: 11px;
  line-height: 1.2;
}

.previous-booking-amount-stack.success strong {
  color: #1e7a4f;
}

.previous-booking-amount-stack.warning strong {
  color: #a06200;
}

.previous-booking-amount-stack.danger strong {
  color: #b63a2b;
}

.previous-booking-amount-stack.muted strong {
  color: #6e7d8d;
}

.previous-booking-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
  flex: 0 0 auto;
}

.previous-booking-state-dot.success {
  background: #24a26b;
}

.previous-booking-state-dot.warning {
  background: #d08a18;
}

.previous-booking-state-dot.danger {
  background: #d94b3f;
}

.previous-booking-action-btn {
  min-width: 100px;
}

.previous-bookings-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 10px 16px 14px;
  border-top: 1px solid #e7eef7;
  color: #5d718a;
  font-size: 12px;
}

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

.previous-booking-cyclewise-card {
  display: grid;
  gap: 14px;
}

.previous-booking-cyclewise-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.previous-booking-cyclewise-head p {
  margin: 4px 0 0;
  color: #63768f;
  font-size: 13px;
}

.previous-booking-cycle-filter {
  display: grid;
  gap: 4px;
  min-width: 240px;
}

.previous-booking-cycle-filter span {
  color: #66798f;
  font-size: 11px;
  font-weight: 700;
}

.previous-booking-cycle-filter select {
  min-width: 240px;
  height: 38px;
}

.previous-booking-cycle-list {
  display: grid;
  gap: 12px;
}

.previous-booking-cycle-card {
  border: 1px solid #e2eaf4;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.previous-booking-cycle-header {
  width: 100%;
  border: 0;
  background: #fff;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(180px, auto) 1fr auto;
  gap: 12px 18px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.previous-booking-cycle-header:hover {
  background: #f7fbff;
}

.previous-booking-cycle-header-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.previous-booking-cycle-header-primary strong {
  font-size: 18px;
  color: #10233f;
}

.previous-booking-cycle-header-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px 16px;
  align-items: center;
}

.previous-booking-cycle-header-meta span {
  display: grid;
  gap: 4px;
}

.previous-booking-cycle-header-meta label {
  font-size: 11px;
  color: #6f8196;
  font-weight: 700;
}

.previous-booking-cycle-header-meta strong {
  color: #19314d;
  font-size: 13px;
}

.previous-booking-cycle-chevron {
  color: #69809a;
  font-size: 15px;
}

.previous-booking-cycle-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 12px;
}

.previous-booking-cycle-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.previous-booking-cycle-tabs button {
  border: 0;
  background: transparent;
  color: #4e6480;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 0 10px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.previous-booking-cycle-tabs button.active {
  color: #1b61e7;
  border-color: #1b61e7;
}

.previous-booking-cycle-detail-table th,
.previous-booking-cycle-detail-table td {
  white-space: nowrap;
}

.previous-booking-empty-action {
  color: #8ca0b5;
  font-size: 13px;
}

.previous-booking-cycle-info-strip {
  margin: 0 16px 16px;
  border: 1px solid #f5dfb2;
  background: #fffaf0;
  color: #8e6210;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 12px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.success {
  background: #24a26b;
}

.legend-dot.warning {
  background: #d08a18;
}

.legend-dot.danger {
  background: #d94b3f;
}

#previousBookingDetailsDialog.developer-editor-dialog {
  padding: 0;
  border: none;
  background: transparent;
}

#previousBookingDetailsDialog.developer-editor-dialog[open] {
  inset: 0;
  align-items: center;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: 24px;
  justify-content: center;
}

#previousBookingDetailsDialog::backdrop {
  background: rgba(17, 34, 68, 0.3);
  backdrop-filter: blur(3px);
}

.previous-booking-details-card {
  display: flex;
  flex-direction: column;
  width: min(900px, calc(100vw - 48px));
  max-width: min(900px, calc(100vw - 48px));
  height: auto;
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(16, 40, 79, 0.16);
}

.previous-booking-popup-head,
.previous-booking-details-foot {
  background: #fff;
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}

.previous-booking-popup-head {
  align-items: start;
  border-bottom: 1px solid #e3eaf3;
  padding: 18px 24px 16px;
}

.previous-booking-popup-title {
  display: grid;
  gap: 5px;
}

.previous-booking-popup-eyebrow {
  color: #667b98;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.previous-booking-popup-head h2 {
  color: #10284f;
  font-size: 25px;
  line-height: 1.1;
  margin: 0;
}

.previous-booking-popup-head p {
  color: #637895;
  font-size: 13px;
  margin: 0;
}

.previous-booking-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

#previousBookingDetailsDialog .project-booking-details-modal-body {
  overflow-x: hidden;
  overflow-y: hidden;
  padding: 12px 24px 14px;
}

.previous-booking-popup-section {
  border-bottom: 1px solid #e8edf5;
  padding: 9px 0;
}

.previous-booking-popup-section:first-child {
  padding-top: 0;
}

.previous-booking-popup-section h3 {
  color: #17345d;
  font-size: 13px;
  margin: 0 0 9px;
}

.previous-booking-popup-info-grid,
.previous-booking-popup-refund-cards,
.previous-booking-popup-cancellation,
.previous-booking-popup-members {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.previous-booking-popup-info-grid > div,
.previous-booking-popup-cancellation > div,
.previous-booking-popup-members > div {
  background: #f8fbff;
  border: 1px solid #e2eaf4;
  border-radius: 9px;
  display: grid;
  gap: 4px;
  padding: 9px;
}

.previous-booking-popup-info-grid span,
.previous-booking-popup-cancellation span,
.previous-booking-popup-members span,
.previous-booking-popup-refund-cards span {
  color: #6b7d90;
  font-size: 10px;
  font-weight: 700;
}

.previous-booking-popup-info-grid strong,
.previous-booking-popup-cancellation strong,
.previous-booking-popup-members strong {
  color: #10284f;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.previous-booking-popup-refund-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.previous-booking-popup-refund-cards > div {
  background: #f7fbff;
  border: 1px solid #e0e9f3;
  border-radius: 10px;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.previous-booking-popup-refund-cards strong {
  color: #10284f;
  font-size: 16px;
}

.previous-booking-popup-progress {
  color: #4d637f;
  font-size: 12px;
  margin: 10px 0 0;
}

.previous-booking-popup-progress b {
  color: #d08a18;
  padding: 0 4px;
}

.previous-booking-popup-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.previous-booking-popup-tabs button {
  background: #f5f8fc;
  border: 1px solid #dce6f2;
  border-radius: 999px;
  color: #506987;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
}

.previous-booking-popup-tabs button.active {
  background: #eaf2ff;
  border-color: #a8c4ee;
  color: #134e9d;
}

.previous-booking-popup-tab-content {
  margin-top: 8px;
}

.previous-booking-popup-transaction-list {
  border: 1px solid #e2eaf3;
  border-radius: 10px;
  overflow: hidden;
}

.previous-booking-popup-transaction {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 0.9fr 0.85fr 1.3fr 1fr auto;
  padding: 9px 10px;
}

.previous-booking-popup-transaction + .previous-booking-popup-transaction {
  border-top: 1px solid #e8edf5;
}

.previous-booking-popup-transaction span {
  color: #5f7590;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.previous-booking-popup-transaction strong {
  color: #10284f;
  font-size: 12px;
}

.previous-booking-popup-empty {
  background: #f8fbff;
  border: 1px dashed #cbd9ea;
  border-radius: 10px;
  color: #69809d;
  font-size: 12px;
  padding: 16px;
  text-align: center;
}

.previous-booking-details-foot {
  border-top: 1px solid #e3eaf3;
  padding: 12px 24px;
}
}

@media (max-width: 900px) {
  #previousBookingDetailsDialog.developer-editor-dialog {
    width: auto;
    max-width: none;
  }

  .previous-booking-details-card {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    height: auto;
    max-height: calc(100vh - 32px);
  }

  #previousBookingDetailsDialog .project-booking-details-modal-body {
    overflow-y: auto;
  }

  .previous-booking-popup-head,
  #previousBookingDetailsDialog .project-booking-details-modal-body,
  .previous-booking-details-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .previous-booking-popup-info-grid,
  .previous-booking-popup-cancellation,
  .previous-booking-popup-members {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .previous-booking-popup-transaction {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .previous-bookings-table-controls {
    width: 100%;
  }

  .previous-bookings-table-controls label,
  .previous-bookings-table-controls select {
    width: 100%;
  }

  .unit-previous-bookings-table-card-full .table-wrap {
    overflow: visible;
  }

  .unit-previous-bookings-table,
  .unit-previous-bookings-table tbody,
  .unit-previous-bookings-table tr,
  .unit-previous-bookings-table td {
    display: block;
    width: 100%;
  }

  .unit-previous-bookings-table colgroup,
  .unit-previous-bookings-table thead {
    display: none;
  }

  .unit-previous-bookings-table tbody {
    padding: 10px;
  }

  .unit-previous-booking-row {
    border: 1px solid #dce5ef;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
  }

  .unit-previous-booking-row td {
    border: 0;
    padding: 8px 10px;
  }

  .unit-previous-booking-row td:not(:first-child) {
    border-top: 1px solid rgba(216, 227, 239, 0.75);
  }

  .unit-previous-booking-row td::before {
    color: #6b7d90;
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
    text-transform: uppercase;
  }

  .previous-booking-booking-cell,
  .previous-booking-timeline-cell,
  .previous-booking-status-cell,
  .previous-booking-refund-summary,
  .previous-booking-pending-action {
    gap: 5px;
  }

  .previous-booking-refund-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .previous-booking-actions {
    margin-top: 5px;
  }

  .previous-booking-cyclewise-head {
    align-items: start;
  }

  .previous-booking-cycle-filter,
  .previous-booking-cycle-filter select {
    width: 100%;
    min-width: 0;
  }

  .previous-booking-cycle-header {
    grid-template-columns: 1fr;
  }

  .previous-booking-cycle-header-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .previous-booking-details-grid,
  .previous-booking-amount-grid {
    grid-template-columns: 1fr 1fr;
  }}

@media (max-width: 640px) {
  .previous-booking-popup-info-grid,
  .previous-booking-popup-refund-cards,
  .previous-booking-popup-cancellation,
  .previous-booking-popup-members,
  .previous-booking-popup-transaction {
    grid-template-columns: 1fr;
  }

  .previous-booking-popup-head h2 {
    font-size: 22px;
  }

  .previous-booking-cycle-header-meta {
    grid-template-columns: 1fr;
  }

  .previous-booking-details-grid,
  .previous-booking-amount-grid {
    grid-template-columns: 1fr;
  }}

.unit-payment-receipt-cell {
  display: grid;
  gap: 4px;
}

.unit-payment-receipt-cell small {
  color: #6b7d90;
  font-size: 11px;
}

.unit-payment-receipt-cell .unit-payment-configure-error {
  color: #a52d2d;
  line-height: 1.35;
}

.unit-payment-generate-btn {
  white-space: nowrap;
}

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

.unit-payment-details-content {
  display: grid;
  gap: 10px;
}

.unit-payment-details-grid > div {
  border: 1px solid #e2eaf4;
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.unit-payment-details-grid span {
  color: #62758a;
  font-size: 10px;
  font-weight: 600;
}

.unit-payment-details-grid strong {
  color: #10284f;
  font-size: 13px;
  font-weight: 700;
}

.unit-payment-details-full {
  grid-column: 1 / -1;
}

.booking-action-menu-list button.danger {
  color: #c83a30;
}

.booking-action-menu-list button.danger:hover:not(:disabled) {
  background: #fff3f1;
  color: #a82f27;
}

.danger-btn {
  background: #d95743;
  border-color: #b54434;
}

.danger-btn:hover {
  background: #b54434;
}

@media (max-width: 1200px) {

  .payment-operator,
  .payment-gap {
    display: none;
  }

  .unit-previous-bookings-summary {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .unit-previous-bookings-layout {
    grid-template-columns: 1fr;
  }

  .unit-previous-bookings-detail-card {
    position: static;
  }}

@media (max-width: 900px) {

  .unit-previous-bookings-detail-grid {
    grid-template-columns: 1fr;
  }}

@media (max-width: 640px) {

  .unit-payment-details-grid {
    grid-template-columns: 1fr;
  }

  .unit-previous-bookings-summary {
    grid-template-columns: 1fr;
  }}

.attach-note {
  margin: 0 0 2px;
  color: #65736b;
  font-size: 12px;
}

.attach-empty {
  border: 1px dashed #cdd8d2;
  border-radius: 8px;
  color: #65736b;
  padding: 10px;
  font-size: 12px;
}

.dialog-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding-bottom: 8px;
  border-bottom: 1px solid #dbe4df;
}
.dialog-title.has-window-close {
  padding-right: 44px;
}

.dialog-title > div:first-child {
  min-width: 0;
  flex: 1;
}

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

.dialog-title p {
  color: #65736b;
  margin-top: 3px;
  font-size: 12px;
}
.dialog-shell-with-close {
  position: relative;
}
.dialog-window-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(24, 61, 123, 0.14);
  background: rgba(255, 255, 255, 0.92);
  color: #20304f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.dialog-title .dialog-window-close {
  position: absolute;
  top: 0;
  right: 0;
}
.dialog-shell-with-close > .dialog-window-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}
.dialog-window-close:hover,
.dialog-window-close:focus-visible {
  background: rgba(36, 100, 232, 0.08);
  border-color: rgba(36, 100, 232, 0.22);
  color: var(--primary);
  outline: none;
}

.project-dashboard-drilldown-dialog {
  --dialog-width: 900px;
}

.project-dashboard-drilldown-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 28px);
  background: #fff;
  min-height: min(68vh, 720px);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #dbe4ef;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.project-dashboard-drilldown-shell .dialog-title {
  padding: 16px 18px 12px;
}

.project-dashboard-drilldown-shell .dialog-title.has-window-close {
  padding-right: 68px;
}

.project-dashboard-drilldown-shell .dialog-title .dialog-window-close {
  top: 12px;
  right: 16px;
}

.project-dashboard-drilldown-body {
  padding: 14px 18px 16px;
  overflow: auto;
  min-height: 0;
  max-height: none;
}

.project-dashboard-drilldown-table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  width: 100%;
}

.project-dashboard-drilldown-shell .dialog-actions {
  padding: 12px 18px 16px;
  border-top: 1px solid #e8eef6;
  background: #fff;
}

.project-dashboard-drilldown-table th,
.project-dashboard-drilldown-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.project-dashboard-drilldown-table tr.clickable-row {
  cursor: pointer;
}

.project-dashboard-drilldown-table tr.clickable-row:hover td {
  background: rgba(24, 121, 78, 0.045);
}

.developer-dashboard-drilldown-dialog {
  --dialog-width: 920px;
}

.developer-dashboard-drilldown-body {
  background: linear-gradient(180deg, #f8fbff 0, #fff 56px);
}

.developer-drilldown-project-list {
  display: grid;
  gap: 12px;
}

.developer-drilldown-project-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 31, 68, 0.06);
}

.developer-drilldown-project-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.developer-drilldown-project-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.developer-drilldown-project-head strong {
  color: var(--navy);
  font-size: 15px;
}

.developer-drilldown-project-head span {
  color: var(--muted);
  font-size: 12px;
}

.developer-drilldown-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
}

.developer-drilldown-metric {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  background: #fff;
  min-height: 70px;
}

.developer-drilldown-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.developer-drilldown-metric strong {
  color: var(--navy);
  font-size: 18px;
  line-height: 1.1;
}

.developer-drilldown-metric.tone-danger strong { color: #c03632; }
.developer-drilldown-metric.tone-success strong { color: #18794e; }
.developer-drilldown-metric.tone-warn strong { color: #9a6700; }
.developer-drilldown-metric.is-focused {
  background: #f4f8ff;
}

.project-dashboard-drilldown-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  font-weight: 700;
}

.partner-year-end-dialog-form {
  width: min(96vw, 1250px);
  max-width: 1250px;
  max-height: 88vh;
  overflow: auto;
  overflow-x: hidden;
  grid-template-columns: 1fr;
  gap: 14px;
  border-radius: 14px;
  background: #fff;
  padding: 18px 20px 20px;
}

#partnerYearEndDialog.developer-editor-dialog {
  width: min(96vw, 1250px);
}

.partner-year-end-layout {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.partner-year-end-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  min-width: 0;
}

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

.partner-year-end-panel-head h3,
.partner-year-end-side-head h3,
.partner-year-end-side-head p {
  margin: 0;
}

.partner-year-end-head-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 210px));
  gap: 10px;
  align-items: end;
  margin-right: 52px;
}

.partner-year-end-head-controls label {
  display: grid;
  gap: 5px;
}

.partner-year-end-head-controls span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.partner-year-end-head-controls input,
.partner-year-end-head-controls select {
  height: 34px;
  font-size: 12px;
  padding: 6px 10px;
}

.partner-year-end-side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.partner-year-end-side-head p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}
.partner-year-end-table small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.partner-year-end-table-card {
  display: grid;
  gap: 10px;
}

.partner-year-end-table-wrap {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

.partner-year-end-table-wrap .table-wrap {
  overflow-x: hidden;
}

.partner-year-end-table {
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
}

.partner-year-end-table th,
.partner-year-end-table td {
  padding: 8px 6px;
  vertical-align: middle;
}

.partner-year-end-table th {
  white-space: nowrap;
}

.partner-year-end-table td:first-child {
  width: 180px;
}

.partner-year-end-table td:first-child strong,
.partner-year-end-table td:first-child small {
  display: block;
}

.partner-year-end-table td:nth-child(2),
.partner-year-end-table th:nth-child(2) {
  width: 70px;
}

.partner-year-end-table input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.partner-year-end-table input[type="date"] {
  min-width: 115px;
}

.partner-year-end-table .partner-year-end-amount {
  min-width: 105px;
}

.partner-year-end-amount {
  text-align: right;
}

.partner-year-end-totals-row td {
  background: #f8fbff;
  font-weight: 700;
}

.partner-year-end-totals-row td:not(:first-child):not(:nth-child(2)) {
  color: var(--primary);
}

.partner-year-end-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

@media (max-width: 1080px) {
  .partner-year-end-dialog-form {
    width: min(96vw, 1120px);
  }

  .partner-year-end-head-controls {
    grid-template-columns: 1fr 1fr;
  }}

@media (max-width: 900px) {
  .dialog-title.has-window-close {
    padding-right: 44px;
  }

  .partner-year-end-head-controls {
    grid-template-columns: 1fr;
    width: 100%;
    margin-right: 0;
    margin-top: 10px;
  }

  .dialog-title.has-window-close {
    flex-wrap: wrap;
  }

  .partner-year-end-table-wrap {
    overflow-x: auto;
  }

  .partner-year-end-table-wrap .table-wrap {
    overflow-x: auto;
  }

  .partner-year-end-table {
    min-width: 930px;
  }}

.project-leads-shell {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}
#main-project-module {
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}
.project-leads-head {
  align-items: flex-start;
  width: 100%;
  max-width: none;
  min-width: 0;
  gap: 12px;
  box-sizing: border-box;
}
.project-leads-head > *,
.project-leads-main,
.project-leads-table-card,
.project-leads-filters,
.project-leads-tabs,
.project-leads-kpis,
.project-leads-filter-row,
.project-leads-filter-row > *,
.project-leads-table-footer {
  min-width: 0;
  box-sizing: border-box;
}
.project-leads-head .members-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 100%;
}
.project-leads-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  width: 100%;
  max-width: none;
}
.lead-followup-queue-panel {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}
.lead-followup-queue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.lead-followup-queue-head h3 {
  margin: 0;
  color: #14233d;
  font-size: 18px;
}
.lead-followup-queue-head p {
  margin: 4px 0 0;
  color: #66758f;
  font-size: 13px;
}
.lead-followup-queue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.lead-followup-queue-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1.15fr);
  gap: 12px;
}
.lead-followup-queue-list {
  display: grid;
  gap: 8px;
  align-content: start;
}
.lead-followup-queue-item {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid #dfe7f1;
  border-radius: 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}
.lead-followup-queue-item:hover,
.lead-followup-queue-item.is-active {
  border-color: #bdd2ff;
  background: #f7faff;
  box-shadow: 0 12px 28px rgba(20, 35, 61, 0.08);
}
.lead-followup-queue-item-row,
.lead-followup-queue-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lead-followup-queue-item-row strong {
  color: #14233d;
  font-size: 14px;
}
.lead-followup-queue-item-meta {
  flex-wrap: wrap;
  color: #66758f;
  font-size: 12px;
}
.lead-followup-queue-item small {
  color: #7d8ba1;
  font-size: 11px;
}
.lead-followup-queue-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
}
.lead-followup-queue-chip.today {
  background: #eef5ff;
  border-color: #cbdcff;
  color: #2464e8;
}
.lead-followup-queue-chip.overdue {
  background: #fff1ef;
  border-color: #f5cac2;
  color: #d1483e;
}
.lead-followup-queue-focus {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e4ebf3;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fd 100%);
}
.lead-followup-queue-focus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.lead-followup-queue-focus-head span {
  display: block;
  color: #66758f;
  font-size: 12px;
}
.lead-followup-queue-focus-head h4 {
  margin: 3px 0 0;
  color: #14233d;
  font-size: 18px;
}
.lead-followup-queue-focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.lead-followup-queue-focus-grid div {
  display: grid;
  gap: 4px;
}
.lead-followup-queue-focus-grid strong {
  color: #14233d;
  font-size: 13px;
}
.lead-followup-queue-focus p {
  margin: 0;
  color: #31445f;
  font-size: 13px;
  line-height: 1.45;
}
.lead-followup-queue-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 6px 0 2px;
}
.lead-followup-queue-empty strong {
  color: #14233d;
  font-size: 16px;
}
.lead-followup-queue-empty p {
  margin: 0;
  color: #66758f;
  font-size: 13px;
}
.project-lead-kpi-card {
  text-align: left;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  min-height: 76px;
  border: 1px solid #dbe4df;
  background: #fff;
  color: #183d7b;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}
.project-lead-kpi-card:hover,
.project-lead-kpi-card:focus-visible {
  background: #f8fbff;
  border-color: rgba(36, 100, 232, 0.22);
  box-shadow: 0 10px 24px rgba(18, 34, 66, 0.08);
  transform: translateY(-1px);
  outline: none;
}
.project-lead-kpi-card.active {
  background: #f2f7ff;
  border-color: rgba(36, 100, 232, 0.34);
  box-shadow: 0 0 0 3px rgba(36, 100, 232, 0.08);
}
.project-lead-kpi-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-lead-kpi-label {
  display: block;
  color: #4d6280;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-lead-kpi-card .members-summary-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
}
.project-lead-kpi-card .members-summary-icon svg {
  width: 16px;
  height: 16px;
}
.project-lead-kpi-value {
  display: block;
  color: #10284f;
  font-size: 27px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.project-leads-filters {
  padding: 10px 12px;
  width: 100%;
  max-width: none;
  margin-right: 0;
  overflow: hidden;
}
.project-leads-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(108px, 0.82fr)) minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  width: 100%;
}
.project-leads-filter-row.extra {
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  margin-top: 8px;
  width: 100%;
}
.project-leads-filters {
  overflow: visible;
}
.project-leads-filter-row > * {
  min-width: 0;
}
.project-leads-filter-row > button {
  justify-self: stretch;
  max-width: 100%;
}

.project-leads-filter-row .ghost-btn.small-btn {
  min-width: 0;
  padding-inline: 12px;
  font-size: 13px;
  white-space: nowrap;
}
.project-leads-filters label {
  display: grid;
  gap: 3px;
}
.project-leads-filters label > span {
  font-size: 11px;
  font-weight: 700;
  color: #52657a;
}
.project-leads-filters input,
.project-leads-filters select,
.project-leads-filters button {
  min-height: 34px;
}
.project-leads-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.project-leads-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.project-leads-tabs .tab {
  min-height: 32px;
  padding: 6px 14px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.project-leads-tabs .tab.is-active {
  background: rgba(36, 100, 232, 0.08);
  color: var(--primary);
}
.project-leads-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef3fb;
  color: #4f6481;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.project-leads-tabs .tab.is-active .project-leads-tab-count {
  background: rgba(36, 100, 232, 0.14);
  color: #1f53ba;
}
.project-leads-main {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.project-leads-table-card,
.project-leads-detail-card {
  min-height: auto;
  width: 100%;
  max-width: none;
}
.project-leads-table-card {
  justify-self: stretch;
  padding: 12px 14px;
  overflow: hidden;
}
.project-leads-table-card .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}
.project-leads-table {
  width: 100%;
  table-layout: fixed;
  min-width: 0;
}
.project-leads-bulk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 14px;
  border-bottom: 1px solid #e6ece8;
  margin-bottom: 10px;
}
.project-leads-bulk-bar.is-visible {
  display: flex;
}
.project-leads-bulk-bar strong {
  display: block;
  color: #17325c;
  font-size: 14px;
}
.project-leads-bulk-bar span {
  color: #66768a;
  font-size: 12px;
}
.project-leads-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.project-leads-table td,
.project-leads-table th {
  vertical-align: middle;
  padding-top: 11px;
  padding-bottom: 11px;
  line-height: 1.35;
}
.project-leads-table th {
  padding-top: 12px;
  padding-bottom: 12px;
}
.project-leads-sort-btn {
  border: none;
  background: transparent;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 8px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.project-leads-sort-btn:hover,
.project-leads-sort-btn:focus-visible {
  background: #eef4ff;
  color: #17325c;
  box-shadow: inset 0 0 0 1px rgba(36, 100, 232, 0.08);
  outline: none;
}
.project-leads-sort-btn.is-active {
  color: #1f53ba;
  background: #f3f7ff;
  box-shadow: inset 0 0 0 1px rgba(36, 100, 232, 0.12);
}
.project-leads-sort-indicator {
  font-size: 11px;
  line-height: 1;
  color: #7a8699;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  transform: translateY(0.5px);
}
.project-leads-sort-btn.is-active .project-leads-sort-indicator {
  color: #1f53ba;
}
.project-leads-col-select {
  width: 40px;
  text-align: center;
}
.project-leads-col-id {
  width: 110px;
}
.project-leads-col-name {
  width: 150px;
  white-space: normal;
  word-break: break-word;
}
.project-leads-col-contact {
  width: 160px;
  white-space: normal;
  word-break: break-word;
}
.project-leads-col-source {
  width: 120px;
}
.project-leads-col-status {
  width: 110px;
}
.project-leads-col-priority {
  width: 100px;
}
.project-leads-col-owner {
  width: 160px;
}
.project-leads-col-followup {
  width: 130px;
  white-space: normal;
}
.project-leads-col-actions {
  width: 70px;
  text-align: center;
}
.table-row-menu {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.table-row-menu > summary {
  list-style: none;
}
.table-row-menu > summary::-webkit-details-marker {
  display: none;
}
.table-row-menu > .table-row-menu-panel {
  display: none !important;
}
.project-lead-action-menu-layer {
  position: fixed;
  z-index: 100120;
  display: none;
  min-width: 220px;
  max-width: min(240px, calc(100vw - 24px));
  padding: 6px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}
.project-lead-action-menu-layer.open {
  display: grid;
}
.project-lead-action-menu-layer button {
  border: none;
  background: transparent;
  min-height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  text-align: left;
  color: #102347;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.project-lead-action-menu-layer button:hover:not(:disabled) {
  background: #f3f7ff;
  color: #0b3b8f;
}
.project-lead-action-menu-layer button:disabled {
  cursor: not-allowed;
  color: #9aa8bf;
}
.project-lead-action-menu-layer button.is-danger {
  color: #b94a48;
}
.project-lead-action-menu-layer button.is-danger:hover:not(:disabled) {
  background: #fff1f1;
  color: #c62828;
}
.project-leads-table tr.selected {
  background: rgba(36, 100, 232, 0.05);
}
.project-lead-select-row,
#projectLeadsSelectAll {
  width: 16px;
  height: 16px;
  accent-color: #17325c;
}
.project-lead-contact-cell {
  display: grid;
  gap: 1px;
}
.project-lead-contact-cell small {
  color: #65736b;
  font-size: 11px;
  line-height: 1.25;
}
.project-lead-owner-cell {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border: 1px solid #dbe4df;
  border-radius: 12px;
  background: #f9fbfd;
  color: #17325c;
  text-align: left;
  min-width: 0;
}
.project-lead-owner-cell.is-clickable {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.project-lead-owner-cell.is-clickable:hover,
.project-lead-owner-cell.is-clickable:focus-visible {
  border-color: rgba(31, 83, 186, 0.34);
  box-shadow: 0 0 0 3px rgba(31, 83, 186, 0.08);
  outline: none;
}
.project-lead-owner-cell.unassigned {
  background: #fff8ee;
  border-color: #f2d3a5;
  justify-content: space-between;
  gap: 6px;
}
.project-lead-owner-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d6e3f8, #eef4ff);
  color: #17325c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex: 0 0 auto;
}
.project-lead-owner-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  flex: 1 1 auto;
}
.project-lead-owner-copy strong,
.project-lead-owner-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-lead-owner-copy strong {
  font-size: 12px;
  line-height: 1.2;
}
.project-lead-owner-copy small {
  color: #66768a;
  font-size: 10px;
  line-height: 1.15;
}
.project-lead-owner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff0d8;
  color: #b26a00;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}
.project-lead-owner-link {
  color: #1f53ba;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}
.project-lead-owner-dialog-card {
  width: min(560px, calc(100vw - 40px));
}
.project-lead-owner-form {
  display: grid;
  gap: 14px;
}
.project-lead-assignment-history-list {
  display: grid;
  gap: 10px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 4px;
}
.project-lead-assignment-history-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dbe4df;
  border-radius: 14px;
  background: #fbfcfe;
}
.project-lead-assignment-history-item strong {
  color: #17325c;
}
.project-lead-assignment-history-item span,
.project-lead-assignment-history-item small {
  color: #66768a;
}
.project-lead-detail-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.project-lead-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(66, 153, 225, 0.14);
  color: #1f4da3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.project-lead-detail-header h3 {
  margin: 0;
}
.project-lead-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 8px;
  color: #65736b;
  font-size: 13px;
}
.project-lead-detail-section {
  border-top: 1px solid #e4ece7;
  padding-top: 12px;
}
.project-lead-detail-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
}
.project-lead-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.project-lead-detail-grid > div {
  display: grid;
  gap: 3px;
}
.project-lead-detail-grid .span-2 {
  grid-column: span 2;
}
.project-lead-detail-grid span {
  color: #65736b;
  font-size: 12px;
}
.project-lead-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.project-lead-actions-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lead-details-modal {
  width: min(82vw, 1160px);
  max-width: min(82vw, 1160px);
  height: min(92vh, calc(100vh - 48px));
  max-height: 92vh;
  margin: auto;
  border: none;
  padding: 0;
  background: transparent;
  overflow: visible;
}
.lead-details-modal::backdrop {
  background: rgba(20, 35, 61, 0.28);
  backdrop-filter: blur(4px);
}
.lead-details-modal-card {
  display: flex;
  flex-direction: column;
  height: min(92vh, calc(100vh - 48px));
  max-height: 92vh;
  border-radius: 26px;
  border: 1px solid rgba(213, 221, 233, 0.95);
  background: #fff;
  box-shadow: 0 22px 64px rgba(20, 35, 61, 0.14);
  overflow: hidden;
}
.lead-details-modal-head,
.lead-details-modal-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: #fff;
}
.lead-details-modal-head {
  min-height: 48px;
}
.lead-details-modal-head {
  border-bottom: 1px solid #e8edf5;
}
.lead-details-modal-head h2 {
  margin: 0;
  font-size: 16px;
  color: #14233d;
  line-height: 1.15;
}
.lead-details-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px 72px;
  scroll-padding-bottom: 84px;
  display: grid;
  align-content: start;
  gap: 6px;
}
.lead-details-queue-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid #e5ebf3;
  border-radius: 16px;
  background: #fbfdff;
}
.lead-details-queue-nav {
  display: flex;
  gap: 8px;
}
.lead-details-queue-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #66758f;
  font-size: 12px;
}
.lead-details-queue-meta strong {
  color: #14233d;
  font-size: 13px;
}
.lead-details-modal-foot {
  position: sticky;
  bottom: 0;
  z-index: 20;
  border-top: 1px solid #e8edf5;
  min-height: 52px;
}
.lead-details-foot-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lead-details-summary-card,
.lead-details-info-strip,
.lead-details-panel,
.lead-details-quick-actions {
  border: 1px solid #e5ebf3;
  border-radius: 18px;
  background: #fff;
}
.lead-details-summary-card {
  display: grid;
  grid-template-columns: minmax(320px, 38%) minmax(0, 62%);
  min-height: 86px;
  max-height: none;
  overflow: visible;
}
.lead-details-summary-card.is-converted {
  grid-template-columns: minmax(340px, 36%) minmax(0, 64%);
  border-color: #d9e6dc;
  background: linear-gradient(180deg, #ffffff 0%, #fbfefd 100%);
}
.lead-details-summary-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px;
  min-height: auto;
  overflow: visible;
}
.project-lead-avatar.large {
  width: 56px;
  height: 56px;
  font-size: 20px;
}
.lead-details-summary-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  overflow: visible;
}
.lead-details-summary-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lead-details-summary-title-row h3 {
  margin: 0;
  font-size: 16px;
  color: #14233d;
}
.lead-status-badge-select {
  min-height: 28px;
  padding: 0 26px 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  background-position: right 10px center;
  appearance: none;
}
.lead-details-summary-line {
  display: grid;
  gap: 2px;
  color: #5e6f87;
  font-size: 12px;
  line-height: 1.35;
  min-width: 0;
}
.lead-details-summary-line span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lead-converted-summary-banner {
  display: inline-grid;
  gap: 2px;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #d8ebdf;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fff9 0%, #f0fbf4 100%);
}
.lead-converted-summary-banner strong {
  color: #1e7f52;
  font-size: 13px;
}
.lead-converted-summary-banner span {
  color: #65806f;
  font-size: 11px;
}
.lead-details-summary-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-left: 1px solid #edf2f8;
  overflow: visible;
}
.lead-details-metric-card {
  display: grid;
  gap: 2px;
  align-content: center;
  padding: 10px 10px;
  border-left: 1px solid #edf2f8;
}
.lead-details-metric-card:first-child {
  border-left: none;
}
.lead-details-metric-card span,
.lead-details-info-strip span,
.lead-details-panel span {
  color: #66758f;
  font-size: 11px;
}
.lead-details-metric-card strong,
.lead-details-info-strip strong {
  color: #14233d;
  font-size: 14px;
  font-weight: 700;
}
.lead-details-metric-card small {
  color: #7f8ca1;
  font-size: 11px;
}
.lead-details-info-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: visible;
  min-height: 52px;
  max-height: 54px;
}
.lead-details-info-strip.is-converted {
  min-height: 58px;
  max-height: none;
}
.lead-details-info-strip > div {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-left: 1px solid #edf2f8;
  min-width: 0;
}
.lead-details-info-strip > div:first-child {
  border-left: none;
}
.lead-priority-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lead-priority-stars {
  display: inline-flex;
  gap: 2px;
  color: #d3d9e3;
  font-size: 17px;
  line-height: 1;
}
.lead-priority-stars .active {
  color: #f0b429;
}
.lead-priority-star-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: inherit;
}
.lead-priority-stars.is-interactive .lead-priority-star-btn:hover span,
.lead-priority-star-btn.active span {
  color: #f0b429;
}
.lead-priority-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.lead-priority-badge.high {
  background: #fff0ec;
  color: #c85642;
}
.lead-priority-badge.medium {
  background: #fff5de;
  color: #b9770e;
}
.lead-priority-badge.low {
  background: #eef6ff;
  color: #2464e8;
}
.lead-details-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e8edf5;
  padding: 0 2px;
  min-height: 34px;
  max-height: 36px;
}
.lead-details-tabs button {
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 7px 9px 6px;
  color: #52657f;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.lead-details-tabs button.is-active {
  color: #2464e8;
  border-bottom-color: #2464e8;
}
.lead-details-tab-panel {
  min-height: 0;
  overflow: visible;
}
.lead-details-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: 8px;
  min-height: 0;
  overflow: visible;
}
.lead-details-overview-grid.converted-view {
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.85fr);
}
.lead-details-overview-main {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: visible;
}
.lead-converted-panel {
  padding: 10px 12px;
}
.lead-converted-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.lead-converted-hero-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #e4ebf5;
  border-radius: 16px;
  background: #fbfdff;
}
.lead-converted-hero-card.emphasis {
  border-color: #d8ebdf;
  background: linear-gradient(180deg, #f8fff9 0%, #effaf2 100%);
}
.lead-converted-hero-card span {
  color: #66758f;
  font-size: 11px;
}
.lead-converted-hero-card strong {
  color: #14233d;
  font-size: 18px;
  line-height: 1.2;
}
.lead-converted-hero-card small {
  color: #7f8ca1;
  font-size: 11px;
}
.lead-converted-details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.lead-converted-details-grid.customer {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lead-converted-details-grid > div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #edf2f8;
  border-radius: 14px;
  background: #fbfdff;
}
.lead-converted-details-grid span {
  color: #66758f;
  font-size: 11px;
}
.lead-converted-details-grid strong {
  color: #14233d;
  font-size: 14px;
  line-height: 1.35;
}
.lead-converted-journey-list {
  display: grid;
  gap: 10px;
}
.lead-converted-journey-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #e5ebf3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
.lead-converted-journey-item strong {
  color: #20365b;
  font-size: 13px;
}
.lead-converted-journey-item span {
  color: #14233d;
  font-size: 12px;
  font-weight: 600;
}
.lead-converted-journey-item small {
  color: #7b889d;
  font-size: 11px;
  line-height: 1.4;
}
.lead-details-panel {
  padding: 8px 12px;
  overflow: visible;
}
.lead-details-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.lead-details-panel-head h4,
.lead-details-quick-actions h4 {
  margin: 0;
  color: #14233d;
  font-size: 15px;
}
.lead-interaction-summary-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f9fcfb 0%, #f5fbf9 100%);
  border: 1px solid #e7f1ec;
  min-height: 72px;
  max-height: 82px;
  overflow: visible;
}
.lead-interaction-summary-card p {
  margin: 2px 0 8px;
  color: #1e2f4d;
  line-height: 1.35;
  font-size: 12px;
}
.lead-next-step-grid {
  display: grid;
  grid-template-columns: 0.95fr 0.8fr 0.95fr 1.25fr;
  gap: 8px;
}
.lead-next-step-grid label,
.lead-details-panel textarea {
  display: grid;
  gap: 5px;
}
.lead-next-step-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.lead-tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lead-tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2464e8;
  font-size: 11px;
  font-weight: 600;
}
.lead-details-quick-actions {
  padding: 8px 12px;
  display: grid;
  gap: 6px;
  align-content: start;
  overflow: visible;
}
.lead-quick-action-card {
  display: grid;
  gap: 2px;
  text-align: left;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #fff;
  min-height: 48px;
  padding: 8px 11px;
  cursor: pointer;
}
.lead-quick-action-card strong {
  color: #21385f;
  font-size: 13px;
}
.lead-quick-action-card small {
  color: #6f7d92;
  font-size: 11px;
}
.lead-quick-action-card:hover {
  border-color: #bdd2ff;
  background: #f8fbff;
}
.lead-converted-target-list {
  display: grid;
  gap: 10px;
}
.lead-converted-target-card {
  min-height: 60px;
}
.lead-quick-action-card.danger {
  border-color: #f1d7d2;
}
.lead-quick-action-card.danger strong {
  color: #d1483e;
}
.dialog-x-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #dbe4ef;
  background: #fff;
  color: #1b3157;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  text-shadow: none;
}
.dialog-x-btn:hover {
  background: #f5f8fd;
}
.lead-followup-modal {
  width: min(760px, calc(100vw - 32px));
  max-width: min(760px, calc(100vw - 32px));
  border: none;
  padding: 0;
  background: transparent;
  overflow: visible;
}
.lead-followup-modal::backdrop {
  background: rgba(20, 35, 61, 0.28);
  backdrop-filter: blur(4px);
}
.lead-followup-modal-card {
  display: flex;
  flex-direction: column;
  max-height: min(84vh, calc(100vh - 48px));
  border-radius: 24px;
  border: 1px solid #e1e8f3;
  background: #fff;
  box-shadow: 0 22px 64px rgba(20, 35, 61, 0.18);
  overflow: hidden;
}
.lead-followup-modal-head,
.lead-followup-modal-foot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
}
.lead-followup-modal-head {
  border-bottom: 1px solid #e8edf5;
}
.lead-followup-modal-head h3 {
  margin: 0;
  font-size: 18px;
  color: #14233d;
}
.lead-followup-modal-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #60728f;
}
.lead-followup-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 18px;
  background: #f8fbff;
}
.lead-followup-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.lead-followup-form-grid label {
  display: grid;
  gap: 6px;
  color: #17325c;
  font-size: 13px;
  font-weight: 600;
}
.lead-followup-form-grid label span {
  color: #4f678f;
}
.lead-followup-form-grid input,
.lead-followup-form-grid select,
.lead-followup-form-grid textarea {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid #d5def0;
  border-radius: 12px;
  background: #fff;
  box-sizing: border-box;
  font: inherit;
  color: #17325c;
}
.lead-followup-form-grid textarea {
  min-height: 88px;
  resize: vertical;
}
.lead-followup-full-width {
  grid-column: 1 / -1;
}
.lead-followup-modal-foot {
  border-top: 1px solid #e8edf5;
}
.lead-followup-modal-foot .ghost-btn,
.lead-followup-modal-foot .small-btn {
  min-width: 108px;
}

.lead-snooze-modal {
  width: min(460px, calc(100vw - 24px));
  max-width: min(460px, calc(100vw - 24px));
  border: none;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.lead-snooze-modal::backdrop {
  background: rgba(20, 35, 61, 0.32);
  backdrop-filter: blur(4px);
}

.lead-snooze-modal-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid #e1e8f3;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 35, 65, 0.18);
  overflow: hidden;
}

.lead-snooze-modal-head,
.lead-snooze-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
}

.lead-snooze-modal-head {
  border-bottom: 1px solid #e8edf5;
}

.lead-snooze-modal-head h3 {
  margin: 0;
  font-size: 16px;
  color: #14233d;
}

.lead-snooze-modal-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #60728f;
}

.lead-snooze-modal-body {
  padding: 14px 16px 16px;
  display: grid;
  gap: 12px;
  background: #fff;
}

.lead-snooze-field {
  display: grid;
  gap: 8px;
}

.lead-snooze-label {
  color: #14233d;
  font-size: 12px;
  font-weight: 700;
}

.lead-snooze-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
}

.lead-snooze-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #e5ebf6;
  border-radius: 999px;
  color: #2a3f61;
  font-size: 12px;
  font-weight: 600;
  background: #f8fbff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.lead-snooze-option input {
  display: none;
}

.lead-snooze-option.selected {
  border-color: #7bc98f;
  background: #eefbf1;
  box-shadow: inset 0 0 0 1px rgba(65, 168, 95, 0.16);
}

.lead-snooze-datetime-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.lead-snooze-datetime-grid input,
.lead-snooze-field select {
  min-height: 40px;
}

.lead-snooze-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff 0%, #f2f7ff 100%);
  border: 1px solid #e2ecfb;
  color: #324b70;
  font-size: 12px;
  line-height: 1.45;
}

.lead-snooze-note strong {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f1ff;
  color: #2b6ef3;
  font-size: 12px;
  font-weight: 800;
}

.lead-snooze-modal-foot {
  border-top: 1px solid #e8edf5;
  justify-content: flex-end;
}

.lead-snooze-modal-foot .ghost-btn,
.lead-snooze-modal-foot .small-btn {
  min-width: 104px;
}
.project-lead-detail-textarea textarea,
.lead-next-step-grid textarea,
.lead-next-step-grid input,
.lead-next-step-grid select {
  width: 100%;
}
.lead-next-step-grid textarea,
.lead-next-step-grid input,
.lead-next-step-grid select {
  min-height: 36px;
}
.lead-next-step-grid textarea {
  min-height: 72px;
}
.project-lead-history-list {
  display: grid;
  gap: 10px;
}
.project-lead-history-item {
  border: 1px solid #e4ece7;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fbfdfc;
}
.project-lead-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
@media (max-width: 1200px) {
  .lead-followup-queue-grid,
  .lead-followup-queue-focus-grid {
    grid-template-columns: 1fr;
  }
  .lead-followup-form-grid {
    grid-template-columns: 1fr;
  }}
.project-lead-history-item p {
  margin: 0 0 6px;
}
.project-lead-history-item small {
  color: #65736b;
}
.project-lead-dialog-card {
  --dialog-width: 900px;
}

#projectLeadEditorDialog.developer-editor-dialog {
  --dialog-width: 760px;
}

.project-lead-editor-card {
  background: #fff;
  border: 1px solid #e4ebf5;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  width: min(760px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 44px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-y: hidden;
}

.lead-convert-modal {
  width: min(980px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 28px);
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.lead-convert-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border: 1px solid #e6edf7;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.lead-convert-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 26px 14px;
  border-bottom: 1px solid #e6edf7;
}

.lead-convert-header-copy {
  min-width: 0;
}

.lead-convert-header-copy h2 {
  margin: 0 0 6px;
  color: #203962;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.lead-convert-header-copy p {
  margin: 0;
  color: #7a8798;
  font-size: 13px;
  line-height: 1.4;
}

.lead-convert-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 26px 16px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.lead-convert-summary-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #dbe6f3;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7ff 100%);
}

.lead-convert-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #2f4f86;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.lead-convert-summary-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.lead-convert-summary-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lead-convert-summary-title-row strong {
  color: #27416d;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
}

.lead-convert-summary-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  color: #5d6d84;
  font-size: 12px;
  min-width: 0;
}

.lead-convert-summary-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
}

.lead-convert-summary-divider {
  width: 1px;
  height: 16px;
  background: #d5deea;
}

.lead-convert-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.lead-convert-card {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  padding: 14px 14px 12px;
  border: 1px solid #e3ebf4;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.lead-convert-card h3 {
  margin: 0;
  color: #27416d;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
}

.lead-convert-fields,
.lead-convert-setup-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.lead-convert-fields label,
.lead-convert-setup-fields label {
  display: grid;
  gap: 4px;
  color: #74839a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lead-convert-fields label span,
.lead-convert-setup-fields label span {
  display: inline-flex;
  align-items: center;
}

.lead-convert-fields input,
.lead-convert-fields select,
.lead-convert-setup-fields input,
.lead-convert-setup-fields select {
  min-height: 42px;
  border: 1px solid #dce5f0;
  border-radius: 11px;
  background: #ffffff;
  color: #24344f;
  font-size: 14px;
}

.lead-convert-fields input:focus,
.lead-convert-fields select:focus,
.lead-convert-setup-fields input:focus,
.lead-convert-setup-fields select:focus {
  border-color: #aac3ee;
  box-shadow: 0 0 0 3px rgba(77, 122, 197, 0.08);
}

.lead-convert-fields input[readonly],
.lead-convert-setup-fields input[readonly] {
  background: #f8fafc;
  color: #344a68;
}

.lead-convert-toggle-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
}

.lead-convert-toggle-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.lead-convert-toggle-label {
  color: #27416d;
  font-size: 13px;
  font-weight: 800;
}

.lead-convert-toggle-helper {
  color: #7d8a9a;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 500;
}

.lead-convert-toggle-switch {
  position: relative;
  width: 50px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lead-convert-toggle-switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.lead-convert-toggle-track {
  position: relative;
  display: block;
  width: 50px;
  height: 28px;
  border-radius: 999px;
  background: #dde5ef;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.lead-convert-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  transition: transform 0.16s ease;
}

.lead-convert-toggle-switch input:checked + .lead-convert-toggle-track {
  background: #3b78d6;
}

.lead-convert-toggle-switch input:checked + .lead-convert-toggle-track::after {
  transform: translateX(22px);
}

.lead-convert-toggle-switch input:focus-visible + .lead-convert-toggle-track {
  box-shadow: 0 0 0 3px rgba(31, 115, 219, 0.16);
}

.lead-convert-unit-field,
.lead-convert-booking-field {
  grid-column: 1 / -1;
}

.lead-convert-booking-field[hidden] {
  display: none !important;
}

.lead-convert-confirm-box {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #d9e9dd;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fcf9 0%, #f2f9f4 100%);
  color: #34624a;
  font-size: 13px;
  line-height: 1.5;
}

.lead-convert-confirm-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #edf8f1;
  color: #3d8a5a;
}

.lead-convert-note {
  grid-column: 1 / -1;
  margin: 0;
  color: #7e8999;
  font-size: 11px;
  line-height: 1.45;
}

.lead-convert-status {
  grid-column: 1 / -1;
  min-height: 0;
}

.lead-convert-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 26px 16px;
  border-top: 1px solid #edf2f7;
  background: #ffffff;
}

.lead-convert-footer-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #3f5a82;
  font-size: 13px;
  font-weight: 700;
}

.lead-convert-footer-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3d8a5a;
}

.lead-convert-footer-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .lead-convert-header,
  .lead-convert-body,
  .lead-convert-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .lead-convert-grid,
  .lead-convert-fields,
  .lead-convert-setup-fields {
    grid-template-columns: 1fr;
  }

  .lead-convert-summary-strip {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .lead-convert-modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .lead-convert-header-copy h2 {
    font-size: 21px;
  }

  .lead-convert-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-convert-footer-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.project-lead-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #edf2f8;
  background: #fff;
}

.project-lead-editor-header h3 {
  margin: 0 0 4px;
}

.project-lead-editor-header p {
  margin: 0;
  color: #61738d;
  font-size: 13px;
}

.project-lead-editor-form {
  gap: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.project-lead-editor-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 14px;
  overflow-y: auto;
  min-height: 0;
  flex: 1 1 auto;
  align-content: start;
  width: 100%;
  box-sizing: border-box;
  align-self: stretch;
  border: 0;
  outline: none;
  box-shadow: none;
}

.project-lead-editor-body .developers-form-section.compact {
  gap: 8px;
  padding-bottom: 10px;
}

.project-lead-editor-body .developers-form-section.compact h4 {
  font-size: 14px;
}

.project-lead-editor-body .developers-form-grid.compact {
  gap: 10px 12px;
}

.project-lead-editor-body .developers-form-grid.compact label {
  gap: 4px;
}

.project-lead-editor-form .developers-form-grid.compact textarea {
  min-height: 74px;
}

.project-lead-editor-body .full-span {
  grid-column: 1 / -1;
}

.project-lead-editor-footer {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 20px 18px;
  border-top: 1px solid #edf2f8;
  background: #fff;
}

.project-lead-editor-form .full-span {
  grid-column: 1 / -1;
}
.project-leads-import-shell {
  display: grid;
  gap: 12px;
}

.project-vendors-main.project-materials-main {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-width: 0;
  gap: 16px;
}

.project-vendors-main.project-materials-main > .project-vendors-table-card {
  flex: 1 1 100%;
  width: 100%;
  max-width: none;
  min-width: 0;
}

.project-vendors-main.project-materials-main > .project-vendors-detail-card,
.project-vendors-main.project-materials-main > .project-materials-detail-card {
  display: none !important;
}

.project-vendors-main.project-materials-main .table-wrap,
.project-vendors-main.project-materials-main .project-materials-table,
.project-vendors-main.project-materials-main .project-leads-table-footer {
  width: 100%;
  max-width: none;
}

.project-materials-table .project-vendor-primary-cell.compact {
  gap: 2px;
}

.project-materials-table .project-vendor-primary-cell.compact strong {
  font-size: 13px;
  line-height: 1.25;
}

.project-materials-table .project-vendor-primary-cell.compact small {
  font-size: 11px;
  line-height: 1.2;
  color: #78879c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.material-row-menu-trigger {
  min-width: 36px;
  width: 36px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.procurement-actions-cell {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  text-align: center;
}

.procurement-row-menu-trigger {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  color: #0f2344;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.procurement-row-menu-trigger:hover,
.procurement-row-menu-trigger:focus-visible {
  background: #f5f8fd;
  border-color: #d3dfea;
  color: #0b3b8f;
  box-shadow: 0 0 0 3px rgba(36, 100, 232, 0.06);
  outline: none;
}

.procurement-action-trigger {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  color: #0f2344;
}

.procurement-row-action-menu-layer {
  position: fixed;
  z-index: 99999;
  min-width: 210px;
  max-width: min(240px, calc(100vw - 24px));
  display: none;
  padding: 6px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.procurement-row-action-menu-layer.open {
  display: grid;
}

.procurement-row-menu,
.procurement-row-action-menu-layer {
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.procurement-row-menu-item,
.procurement-row-action-menu-layer button {
  border: none;
  background: transparent;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  text-align: left;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #102347;
  font-size: 13px;
  font-weight: 500;
}

.procurement-row-menu-item:hover:not(:disabled),
.procurement-row-action-menu-layer button:hover:not(:disabled) {
  background: #f3f7ff;
  color: #0b3b8f;
}

.procurement-row-action-menu-layer button:disabled {
  cursor: not-allowed;
  color: #9aa8bf;
}

.procurement-row-menu-item.danger,
.procurement-row-action-menu-layer button.is-danger {
  color: #b94a48;
}

.procurement-row-menu-item.danger:hover:not(:disabled),
.procurement-row-action-menu-layer button.is-danger:hover:not(:disabled) {
  background: #fff1f1;
  color: #c62828;
}

.inline-link-btn {
  border: none;
  background: transparent;
  color: #1f7a54;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.material-movement-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.material-movement-type.in {
  background: rgba(26, 164, 97, 0.12);
  color: #188753;
}

.material-movement-type.out {
  background: rgba(219, 68, 55, 0.12);
  color: #cf3c2f;
}

.material-movement-type.adj {
  background: rgba(36, 100, 232, 0.12);
  color: #2464e8;
}

.material-details-dialog-card .project-vendor-mini-row.static strong,
.material-details-dialog-card .project-vendor-mini-row strong {
  color: var(--navy);
}

.material-details-dialog-card .project-vendor-mini-row small {
  color: #65736b;
}

.material-master-gst-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
}

/* Inventory Template keeps the shared dialog mechanics but owns its visual surface and controls. */
body.inventory-template-modal-open {
  overflow: hidden;
}

#projectInventoryTemplateDialog.developer-editor-dialog[open] {
  inset: 16px;
  width: min(940px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: min(760px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d9e3f0 !important;
  border-radius: 18px;
  background: #fff !important;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.3) !important;
}

#projectInventoryTemplateDialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
}

.inventory-template-dialog-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  color: #172b4d;
}

.inventory-template-dialog-header,
.inventory-template-dialog-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
}

.inventory-template-dialog-header {
  border-bottom: 1px solid #e5ebf3;
}

.inventory-template-dialog-header h2,
.inventory-template-dialog-header p,
.inventory-template-section-heading h3,
.inventory-template-section-heading p {
  margin: 0;
}

.inventory-template-dialog-header h2 { font-size: 20px; line-height: 1.25; color: #142f5c; }
.inventory-template-dialog-header p,
.inventory-template-section-heading p,
.inventory-template-model-section > p { margin-top: 4px; color: #60728d; font-size: 13px; line-height: 1.45; }

.inventory-template-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d8e3f1;
  border-radius: 10px;
  background: #fff;
  color: #173766;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.inventory-template-close:hover,
.inventory-template-close:focus-visible { color: #fff; background: #173766; border-color: #173766; outline: none; }

.inventory-template-dialog-body {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 20px;
  scrollbar-gutter: stable;
}

.inventory-template-dialog-footer {
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid #e5ebf3;
}

.inventory-template-save-help {
  margin-right: auto;
  color: #60728d;
  font-size: 12px;
}

.inventory-template-dialog-footer .primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
  transform: none;
}

.inventory-template-model-section .inline-error {
  margin: 10px 0 0;
}

.inventory-template-required-legend {
  margin: 8px 0 0;
  color: #60728d;
  font-size: 12px;
}

.inventory-template-required-legend span,
.inventory-template-field > span.is-required::after,
.inventory-template-category .panel-head label > span.is-required::after {
  color: #c9362b;
  font-weight: 800;
}

.inventory-template-required-legend span { margin-right: 3px; }
.inventory-template-field > span.is-required::after,
.inventory-template-category .panel-head label > span.is-required::after { content: " *"; }

.inventory-template-dialog-body:focus { outline: none; }

.inventory-template-section {
  min-width: 0;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  background: #fbfdff;
}

.inventory-template-section-heading { margin-bottom: 12px; }
.inventory-template-section-heading h3 { color: #173766; font-size: 15px; line-height: 1.3; }

.inventory-template-field { display: grid; min-width: 0; gap: 5px; }
.inventory-template-field > span { color: #334f75; font-size: 13px; font-weight: 700; }
.inventory-template-field input,
.inventory-template-field select,
.inventory-template-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cbd8e9;
  border-radius: 8px;
  background: #fff;
  color: #172b4d;
  font: inherit;
}
.inventory-template-field textarea { min-height: 78px; resize: vertical; }
.inventory-template-field input:disabled,
.inventory-template-field select:disabled,
.inventory-template-field textarea:disabled { background: #f1f4f8; color: #8593a6; cursor: not-allowed; }

.inventory-template-identity-grid,
.inventory-template-hierarchy-row,
.inventory-template-type-grid,
.inventory-template-pricing-grid {
  display: grid;
  min-width: 0;
  gap: 10px 12px;
  align-items: end;
}
.inventory-template-identity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inventory-template-hierarchy-row { grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.1fr) auto; padding: 10px; border: 1px solid #e5ebf3; border-radius: 10px; background: #fff; }
.inventory-template-hierarchy-row + .inventory-template-hierarchy-row { margin-top: 10px; }
.inventory-template-type-grid { grid-template-columns: auto minmax(220px, 1fr) auto; }
.inventory-template-field-wide { grid-column: 1 / -1; }
.inventory-template-pricing-grid { grid-template-columns: minmax(220px, 1fr) auto; }
.inventory-template-pricing-grid .inventory-template-section-heading { grid-column: 1 / -1; }

.inventory-template-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  color: #334f75;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.inventory-template-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: #173766;
  flex: 0 0 18px;
}
.inventory-template-checkbox input[type="checkbox"]:focus-visible { outline: 2px solid #4d83d6; outline-offset: 2px; }
.inventory-template-checkbox:has(input:disabled) { color: #8a98a9; cursor: not-allowed; }

.inventory-template-area-list { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.inventory-template-area-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid #e5ebf3; border-radius: 9px; background: #fff; }
.inventory-template-area-row .inventory-template-checkbox { min-height: 24px; }
.inventory-template-hierarchy-row.is-muted,
.inventory-template-type-grid.is-muted,
.inventory-template-area-row.is-muted { background: #f6f8fb; opacity: 0.72; }

.inventory-template-category { margin-top: 12px; padding: 14px; }
.inventory-template-category .panel-head { gap: 12px; align-items: end; }

@media (max-width: 720px) {
  #projectInventoryTemplateDialog.developer-editor-dialog[open] { inset: 8px; width: calc(100vw - 16px); max-width: calc(100vw - 16px); height: calc(100vh - 16px); max-height: calc(100vh - 16px); border-radius: 14px; }
  .inventory-template-dialog-header,
  .inventory-template-dialog-footer,
  .inventory-template-dialog-body { padding-left: 14px; padding-right: 14px; }
  .inventory-template-identity-grid,
  .inventory-template-hierarchy-row,
  .inventory-template-type-grid,
  .inventory-template-pricing-grid { grid-template-columns: 1fr; }
  .inventory-template-field-wide,
  .inventory-template-pricing-grid .inventory-template-section-heading { grid-column: auto; }
  .inventory-template-checkbox { min-height: 30px; }
  .inventory-template-area-row { grid-template-columns: 1fr; gap: 4px; }
  .inventory-template-dialog-footer { position: relative; }
}

.edit-material-modal .material-master-gst-grid {
  gap: 6px 16px;
}

.material-locked-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.material-adjustment-dialog-card {
  width: min(920px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  padding: 0;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.material-adjustment-dialog-card .dialog-title {
  padding: 18px 22px 14px;
  border-bottom: 1px solid #e7edf5;
  background: #fff;
  flex-shrink: 0;
}

.material-adjustment-dialog-card .dialog-title p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #5d6f88;
}

.material-adjustment-current-stock {
  color: #1a4ea1;
}

.material-adjustment-form-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  flex: 1 1 auto;
  padding: 0;
}

.material-adjustment-form-body {
  display: grid;
  gap: 12px;
  padding: 14px 22px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  flex: 1 1 auto;
}

.material-adjustment-section {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
}

.material-adjustment-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.material-adjustment-section-head h4 {
  margin: 0;
  color: #142c53;
  font-size: 16px;
}

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

.material-adjustment-quantity-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.material-adjustment-quantity-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.material-adjustment-impact-card {
  border: 1px solid #dce7ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #f9fcff 0%, #ffffff 100%);
  padding: 18px 18px;
  display: grid;
  gap: 8px;
}

.material-adjustment-impact-card[data-impact-type="in"] {
  background: linear-gradient(180deg, #f5fff8 0%, #ffffff 100%);
  border-color: #caebd6;
}

.material-adjustment-impact-card[data-impact-type="out"] {
  background: linear-gradient(180deg, #fff7f5 0%, #ffffff 100%);
  border-color: #f0d2cb;
}

.material-adjustment-impact-card[data-impact-type="adjustment"] {
  background: linear-gradient(180deg, #f7f9ff 0%, #ffffff 100%);
  border-color: #d6e1fb;
}

.material-adjustment-impact-label {
  font-size: 13px;
  font-weight: 700;
  color: #4e627d;
}

.material-adjustment-impact-card strong {
  font-size: 20px;
  line-height: 1.1;
  color: #16814f;
}

.material-adjustment-impact-card[data-impact-type="out"] strong {
  color: #b54b37;
}

.material-adjustment-impact-card[data-impact-type="adjustment"] strong {
  color: #295ea8;
}

.material-adjustment-impact-stock {
  font-size: 14px;
  font-weight: 700;
  color: #17345e;
}

.material-adjustment-remarks-wrap {
  display: grid;
  gap: 6px;
}

.material-adjustment-remarks-wrap textarea {
  min-height: 64px;
  resize: none;
}

.material-adjustment-char-count {
  justify-self: end;
  color: #718198;
  font-size: 12px;
}

.material-adjustment-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 2px 0 0;
}

.material-adjustment-summary-item {
  border: 1px solid #e4ebf5;
  border-radius: 14px;
  background: #fbfdff;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.material-adjustment-summary-item span {
  font-size: 12px;
  font-weight: 700;
  color: #687a90;
}

.material-adjustment-summary-item strong {
  color: #122743;
  font-size: 18px;
  line-height: 1.15;
}

.material-adjustment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px 16px;
  border-top: 1px solid #e7edf5;
  background: #fff;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.material-adjustment-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1024px) {
  .material-adjustment-details-grid,
  .material-adjustment-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .material-adjustment-quantity-grid {
    grid-template-columns: 1fr;
  }}

@media (max-width: 760px) {
  .material-adjustment-dialog-card {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 16px);
  }

  .material-adjustment-details-grid,
  .material-adjustment-quantity-fields,
  .material-adjustment-summary-strip {
    grid-template-columns: 1fr;
  }

  .material-adjustment-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .material-adjustment-footer-actions {
    justify-content: stretch;
  }}

@media (max-width: 1120px) {

  .project-vendors-main.project-materials-main {
    display: flex;
    flex-direction: column;
  }

  .material-master-basic-grid,
  .material-master-gst-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  }

@media (max-width: 780px) {

  .material-master-toolbar,
  .material-master-form-grid,
  .material-master-basic-grid,
  .material-master-gst-grid {
    grid-template-columns: 1fr;
  }}

.procurement-shell {
  display: grid;
  gap: 16px;
}

.procurement-shell-filters {
  padding: 14px 16px;
}

.procurement-filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.procurement-shell-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.procurement-shell-kpi {
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.procurement-shell-kpi span,
.procurement-shell-table-card .project-bookings-card-head p {
  color: var(--muted-text, #62748d);
}

.procurement-shell-kpi strong {
  font-size: 28px;
  line-height: 1.1;
}

.procurement-shell-kpi small {
  color: var(--muted-text, #62748d);
}

.procurement-shell-table-card {
  padding: 0;
  overflow: hidden;
}

.procurement-shell-table-card .project-bookings-card-head {
  padding: 18px 20px 0;
}

.procurement-shell-table td,
.procurement-shell-table th {
  white-space: nowrap;
}
.compact-start {
  justify-content: flex-start;
}
@media (max-width: 1160px) {
  .project-leads-kpis {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }}
@media (max-width: 1180px) {
  .project-leads-filter-row {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }}
@media (max-width: 900px) {
  .lead-details-summary-card,
  .lead-details-overview-grid,
  .lead-interaction-summary-card {
    grid-template-columns: 1fr;
  }
  .lead-converted-hero-grid,
  .lead-converted-details-grid,
  .lead-converted-details-grid.customer {
    grid-template-columns: 1fr 1fr;
  }
  .lead-details-summary-metrics,
  .lead-details-info-strip,
  .lead-next-step-grid,
  .lead-details-edit-strip,
  .project-lead-actions-grid-wide,
  .project-lead-detail-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }}
@media (max-width: 720px) {
  .lead-details-modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }
  .lead-details-modal-head,
  .lead-details-modal-body,
  .lead-details-modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  .lead-details-summary-metrics,
  .lead-details-info-strip,
  .lead-next-step-grid,
  .lead-details-edit-strip,
  .project-lead-actions-grid-wide,
  .project-lead-detail-form-grid,
  .project-lead-detail-grid,
  .lead-converted-hero-grid,
  .lead-converted-details-grid,
  .lead-converted-details-grid.customer {
    grid-template-columns: 1fr;
  }
  .lead-details-foot-left,
  .lead-details-modal-foot {
    flex-direction: column;
    align-items: stretch;
  }}
@media (max-width: 760px) {
  .project-leads-kpis,
  .project-leads-filter-row,
  .project-leads-detail-grid,
  .project-lead-actions-grid {
    grid-template-columns: 1fr;
  }
  .project-leads-head,
  .project-leads-head .members-page-actions,
  .project-leads-bulk-bar,
  .project-leads-table-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .project-leads-table-footer {
    align-items: flex-start;
  }}

.configure-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  overflow: hidden;
  padding: 12px 0;
  width: 100%;
}

.configure-grid section {
  border: 1px solid #dbe4df;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.configure-grid h3 {
  margin: 0;
  padding: 7px 9px;
  border-bottom: 1px solid #dbe4df;
  font-size: 12px;
}

.check-list {
  max-height: min(320px, calc(100vh - 210px));
  overflow: auto;
  padding: 6px;
  display: grid;
  gap: 2px;
}

.check-row {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 23px;
  font-size: 11px;
}

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

.configure-form .dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  border-top: 1px solid #dbe4df;
  padding-top: 8px;
}

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

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

@media (min-width: 1180px) {
  .workspace > .summary-grid,
  .workspace > .content-card,
  .header-filters {
    max-width: none;
  }}

.overview-sheet-wrap {
  display: grid;
  gap: 8px;
  padding: 8px 10px 10px;
}

.overview-modern-layout {
  display: grid;
  gap: 10px;
}

.overview-modern-section {
  display: grid;
  gap: 10px;
}

.overview-modern-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(360px, 1.05fr);
  gap: 10px;
}

.overview-modern-card {
  border: 1px solid #d9e5f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 18px rgba(16, 35, 63, 0.05);
  overflow: hidden;
}

.overview-modern-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 4px;
}

.overview-modern-head h3 {
  margin: 0;
  font-size: 14px;
  color: #0f2440;
}

.overview-modern-head.with-icon {
  padding-bottom: 8px;
}

.overview-head-icon,
.overview-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #edf4ff;
  color: #2f6de0;
  flex: 0 0 auto;
}

.overview-info-icon.small {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.overview-head-icon svg,
.overview-info-icon svg {
  width: 16px;
  height: 16px;
}

.overview-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #e5edf6;
}

.overview-info-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-right: 1px solid #e5edf6;
  border-bottom: 1px solid #e5edf6;
  min-height: 56px;
}

.overview-info-card:nth-child(3n) {
  border-right: 0;
}

.overview-info-copy span {
  display: block;
  margin-bottom: 1px;
  font-size: 10px;
  color: #5f7489;
}

.overview-info-copy strong {
  display: block;
  font-size: 14px;
  color: #0d2039;
  line-height: 1.12;
}

.overview-info-card.customer-highlight {
  background: linear-gradient(180deg, #fff7da 0%, #fff2c2 100%);
}

.charges-card {
  padding-bottom: 4px;
}

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

.overview-charge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px;
  border-top: 1px solid #e5edf6;
}

.overview-charge-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #20344e;
  font-weight: 600;
  font-size: 12px;
}

.overview-charge-item strong {
  color: #0f2440;
  font-size: 13px;
  text-align: right;
}

.overview-summary-wrap {
  padding: 0 10px 2px;
}

.overview-summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  overflow: hidden;
  border: 1px solid #d8e3ee;
  border-radius: 12px;
}

.overview-summary-table th,
.overview-summary-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e5edf6;
  color: #13253b;
}

.overview-summary-table thead th {
  background: #d8e9fa;
  font-weight: 800;
  text-align: left;
}

.overview-summary-table td.money,
.overview-summary-table th.money {
  text-align: right;
}

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

.overview-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.overview-badge.basic {
  background: #e8f0ff;
  color: #2f6de0;
}

.overview-badge.others {
  background: #efe9ff;
  color: #6d47d9;
}

.overview-badge.total {
  background: #ddf6e6;
  color: #1b7b46;
}

.grand-total-row td {
  background: #edf8f0;
  color: #176138;
  font-weight: 800;
}

.overview-summary-note {
  margin: 0;
  padding: 0 14px 10px;
  color: #4e6176;
  font-size: 11px;
}

.overview-remark-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  color: #13253b;
}

.overview-remark-modern strong {
  font-size: 13px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.overview-remark-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  line-height: 1.2;
  color: #22364f;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.overview-particular-cell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.overview-particular-copy strong {
  display: block;
  font-size: 12px;
  line-height: 1.2;
}

.overview-inline-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: #7688a0;
}

.overview-inline-icon svg {
  width: 16px;
  height: 16px;
}

.overview-secondary-stack {
  display: grid;
  gap: 10px;
}

.overview-sheet-panel,
.overview-remark-panel,
.receipt-panel {
  border-color: #9cb2c8;
}

.overview-sheet {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.overview-sheet th,
.overview-sheet td {
  border: 1px solid #7f93a7;
  padding: 8px 10px;
  vertical-align: middle;
}

.overview-sheet th {
  background: #c9ddf1;
  color: #13253b;
  font-weight: 800;
  text-align: left;
}

.overview-sheet td {
  background: #fff;
  color: #122035;
}

.overview-sheet .money {
  text-align: right;
  font-weight: 700;
}

.overview-sheet .highlight {
  background: #ffe8a9;
  font-weight: 800;
}

.overview-remark {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  font-size: 13px;
}

.overview-remark strong {
  font-size: 15px;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #cbd8e5;
  background: #fff;
  color: #294664;
  box-shadow: none;
}

.filter-pill:hover,
.filter-pill.active {
  background: #2f6fcc;
  border-color: #2f6fcc;
  color: #fff;
  transform: none;
}

.receipt-table th,
.receipt-table td {
  padding: 9px 10px;
  font-size: 13px;
}

.overview-footer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 12px;
}

.customer-panel .customer-fields {
  padding: 14px 16px;
  gap: 9px;
}

.customer-panel .customer-fields div {
  font-size: 13px;
}

.doc-stack {
  padding: 8px;
  gap: 6px;
}

.doc-item {
  padding: 7px 8px;
  gap: 4px;
}

.doc-item strong {
  font-size: 13px;
  line-height: 1.2;
}

.doc-item span,
.doc-item small {
  font-size: 10px;
  line-height: 1.2;
}

.doc-item em {
  padding: 2px 6px;
  font-size: 10px;
}

.doc-item select {
  min-height: 26px;
  max-width: 230px;
  font-size: 11px;
  padding: 4px 8px;
}

.doc-item .document-actions {
  gap: 4px;
}

.doc-item .document-actions button {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 10px;
}

.document-record .record-head {
  gap: 8px;
}

.document-record .record-head strong {
  font-size: 14px;
}

.document-record .record-head span {
  font-size: 11px;
}

.document-record select.template-select {
  min-height: 28px;
  font-size: 11px;
  padding: 4px 8px;
}

.document-record .document-actions button {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 11px;
}

#documentList.records,
#overviewDocuments.doc-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.template-folder-config {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.template-folder-label {
  display: grid;
  gap: 3px;
}

.template-folder-label strong {
  color: var(--text);
  font-size: 13px;
}

.template-folder-label span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.template-folder-preview {
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.doc-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: 156px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.doc-card-compact {
  min-height: 150px;
  padding: 11px;
}

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

.doc-card-title {
  min-width: 0;
  display: grid;
}

.doc-card-title strong {
  font-size: 15px;
  line-height: 1.3;
}

.doc-card-body {
  display: grid;
  gap: 6px;
  align-content: start;
}

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

.doc-template-input {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}

.doc-template-input[readonly] {
  background: #f7faf8;
  color: var(--text);
}

.doc-card-field {
  display: grid;
  gap: 2px;
}

.doc-card-field span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.doc-template-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.doc-file-name {
  min-height: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-card .document-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-self: end;
}

.doc-card .document-actions button {
  width: 100%;
  min-height: 30px;
  justify-content: center;
}

.doc-status-badge {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.doc-status-badge.good {
  border-color: #bfe1d2;
  background: #e6f6ef;
  color: #1d7757;
}

.doc-status-badge.bad {
  border-color: #f0c2bd;
  background: #fff0ee;
  color: #aa3d32;
}

.doc-status-badge.neutral {
  border-color: #bfd5f0;
  background: #eef5ff;
  color: #315f9a;
}

@media (max-width: 1100px) {
  #documentList.records,
  #overviewDocuments.doc-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }}

@media (max-width: 700px) {
  #documentList.records,
  #overviewDocuments.doc-stack {
    grid-template-columns: 1fr;
  }

  .template-folder-config,
  .template-folder-controls {
    grid-template-columns: 1fr;
  }

  .doc-template-editor {
    grid-template-columns: 1fr;
  }

  .doc-card .document-actions {
    grid-template-columns: 1fr;
  }}

@media (max-width: 980px) {
  .overview-footer-grid {
    grid-template-columns: 1fr;
  }

  .overview-remark {
    grid-template-columns: 1fr;
    gap: 4px;
  }}

#projectMembersDialog {
  width: min(1180px, calc(100vw - 32px)) !important;
  max-width: min(1180px, calc(100vw - 32px)) !important;
}

#projectMembersDialog .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
}

#projectMemberEditor,
#attachMemberDialog {
  width: min(760px, calc(100vw - 32px)) !important;
  max-width: min(760px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 32px) !important;
}

#projectMemberEditor .dialog-actions {
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  padding-bottom: 4px;
  background: linear-gradient(to top, #ffffff 78%, rgba(255, 255, 255, 0.92) 100%);
  border-top: 1px solid #eef3f8;
}

.hidden {
  display: none !important;
}

.inventory-table-card {
  margin-bottom: 10px;
}

.inventory-table tbody tr {
  cursor: pointer;
}

.inventory-table tbody tr:hover td {
  background: #f4f8ff;
}

.booking-warning {
  border: 1px solid #f0c36a;
  background: #fff8e6;
  color: #7a5200;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}

.booking-validation-summary {
  margin-bottom: 12px;
}

.lifecycle-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.booking-snapshot-grid div {
  border: 1px solid #dbe4df;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfb;
}

.booking-snapshot-grid span,
.ledger-meta {
  display: block;
  color: #5f7285;
  font-size: 12px;
}

.booking-snapshot-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  color: #08142a;
}

.booking-timeline {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.timeline-item {
  border-left: 3px solid #357f91;
  padding: 4px 0 4px 12px;
}

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

.timeline-item span {
  color: #627487;
  font-size: 12px;
  margin-top: 3px;
}

.timeline-cancelled {
  border-left-color: #c85642;
}

.timeline-refund {
  border-left-color: #a88224;
}

.timeline-active {
  border-left-color: #2d8b68;
}

.booking-cycle-row td {
  vertical-align: middle;
}

.cycle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.cycle-badge-active {
  background: #e6f6ee;
  color: #1e7a4f;
}

.cycle-badge-cancelled {
  background: #fdecea;
  color: #b63a2b;
}

.cycle-badge-refund {
  background: #fff1dc;
  color: #9a5b00;
}

.cycle-badge-current {
  background: #e8f0ff;
  color: #275ec7;
}

.cycle-badge-neutral {
  background: #f2f5f8;
  color: #556472;
}

.cycle-muted {
  color: #7b8794;
  font-size: 12px;
}

.cycle-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

.booking-cycle-row.expanded td {
  background: #f9fcfa;
}

.booking-cycle-detail-row td {
  padding: 0;
  background: #fbfcfd;
}

.booking-cycle-detail {
  padding: 12px 14px 14px;
}

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

.booking-cycle-detail-meta div {
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.booking-cycle-detail-meta span {
  display: block;
  font-size: 11px;
  color: #6a7d89;
  margin-bottom: 4px;
}

.booking-cycle-detail-meta strong {
  display: block;
  font-size: 13px;
  color: #10233f;
}

.compact-table-wrap {
  margin-top: 0;
}

.compact-ledger-table th,
.compact-ledger-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.muted-note {
  color: #667784;
  font-size: 11px;
  margin-top: 4px;
}

@media (max-width: 980px) {
  .booking-snapshot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .booking-cycle-detail-meta {
    grid-template-columns: 1fr 1fr;
  }

  .overview-modern-top,
  .overview-snapshot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .booking-transaction-summary-grid {
    grid-template-columns: 1fr 1fr;
  }}

@media (max-width: 680px) {
  .booking-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .booking-cycle-detail-meta {
    grid-template-columns: 1fr;
  }

  .overview-modern-top,
  .overview-snapshot-grid,
  .overview-charge-grid {
    grid-template-columns: 1fr;
  }

  .overview-info-card {
    border-right: 0;
  }

  .overview-remark-modern {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .overview-remark-modern strong {
    grid-column: 2;
  }

  .overview-remark-text {
    grid-column: 2;
    white-space: normal;
  }

  .overview-remark-text {
    white-space: normal;
  }

  .booking-transaction-summary-grid {
    grid-template-columns: 1fr;
  }}

.project-type-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: #f7faf8;
}

.project-type-banner.subtle {
  margin: 0 16px 12px;
  background: #fbfcfb;
}

.project-type-banner strong {
  font-size: 14px;
}

.project-type-banner span {
  color: #5f6f67;
  font-size: 13px;
  text-align: right;
}

.segment-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}

.segment-chip {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid #cfe0d8;
  border-radius: 999px;
  background: #ffffff;
  color: #355a4f;
}

.segment-chip.active {
  border-color: #2f9369;
  background: #e7f5ef;
  color: #177553;
}

.dialog-copy {
  margin: -4px 0 8px;
  color: #66756d;
  font-size: 13px;
}

.booking-transaction-config,
.booking-transaction-summary-grid {
  grid-column: 1 / -1;
}

.booking-transaction-config label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #66756d;
  font-weight: 700;
}

.booking-transaction-config select {
  width: 100%;
}

.booking-transaction-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: -4px;
}

.booking-transaction-summary-grid div {
  border: 1px solid #dbe4df;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 8px 10px;
}

.booking-transaction-summary-grid span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: #66756d;
}

.booking-transaction-summary-grid strong {
  display: block;
  font-size: 13px;
  color: #10233f;
}

/* Add/Edit payment receipt: presentation only; field IDs and submit contract stay unchanged. */
#bookingTransactionDialog:not(.booking-transaction-refund-dialog) { --dialog-width: 860px; }

#bookingTransactionDialog:not(.booking-transaction-refund-dialog) .dialog-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 22px 24px 18px;
  border: 1px solid #dce5f0;
  border-radius: 18px;
  box-shadow: 0 28px 72px rgba(15, 34, 64, 0.2);
}

#bookingTransactionDialog:not(.booking-transaction-refund-dialog) h2 {
  margin: 0;
  color: #0b1f3a;
  font-size: 22px;
  line-height: 1.25;
}

#bookingTransactionDialog:not(.booking-transaction-refund-dialog) .dialog-copy {
  margin: 7px 0 16px;
  color: #68788c;
  font-size: 13px;
}

#bookingTransactionDialog:not(.booking-transaction-refund-dialog) .booking-transaction-summary-grid { gap: 10px; margin: 0 0 16px; }
#bookingTransactionDialog:not(.booking-transaction-refund-dialog) .booking-transaction-summary-grid div { min-width: 0; padding: 10px 12px; border-color: #dce5f0; border-radius: 10px; background: #f8fafc; }
#bookingTransactionDialog:not(.booking-transaction-refund-dialog) .booking-transaction-summary-grid strong { overflow: hidden; color: #0b1f3a; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }

#bookingTransactionDialog:not(.booking-transaction-refund-dialog) .booking-transaction-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px 14px;
  padding: 16px 0;
  border-top: 1px solid #edf1f6;
}

#bookingTransactionDialog .booking-transaction-field { display: grid; min-width: 0; gap: 6px; margin: 0; color: #344f70; font-size: 12px; font-weight: 700; }
#bookingTransactionDialog .booking-transaction-field:has(> .hidden) { display: none; }
#bookingTransactionDialog .booking-transaction-field input,
#bookingTransactionDialog .booking-transaction-field select { width: 100%; min-width: 0; min-height: 42px; margin: 0; border-color: #d5dfeb; border-radius: 9px; background-color: #fff; }
#bookingTransactionDialog:not(.booking-transaction-refund-dialog) .booking-transaction-remark-field { grid-column: span 2; }
#bookingTransactionDialog:not(.booking-transaction-refund-dialog) #bookingTransactionRefundAccountWrap { grid-column: 1 / -1; }
#bookingTransactionDialog:not(.booking-transaction-refund-dialog) #bookingTransactionRefundAccountHelp { color: #6b7d93; font-size: 11px; font-weight: 500; }

#bookingTransactionDialog:not(.booking-transaction-refund-dialog) .dialog-actions {
  position: sticky;
  bottom: -18px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 0;
  padding: 14px 0 0;
  border-top: 1px solid #edf1f6;
  background: #fff;
}

#bookingTransactionDialog:not(.booking-transaction-refund-dialog) .dialog-actions button { min-height: 40px; padding: 8px 16px; }

@media (max-width: 720px) {
  #bookingTransactionDialog:not(.booking-transaction-refund-dialog) { --dialog-width: calc(100vw - 20px); }
  #bookingTransactionDialog:not(.booking-transaction-refund-dialog) .dialog-form { max-height: calc(100vh - 20px); padding: 18px 16px 14px; }
  #bookingTransactionDialog:not(.booking-transaction-refund-dialog) .booking-transaction-summary-grid,
  #bookingTransactionDialog:not(.booking-transaction-refund-dialog) .booking-transaction-form-grid { grid-template-columns: 1fr; }
  #bookingTransactionDialog:not(.booking-transaction-refund-dialog) .booking-transaction-remark-field { grid-column: auto; }
  #bookingTransactionDialog:not(.booking-transaction-refund-dialog) .dialog-actions { bottom: -14px; }
}

.unit-section-table {
  margin-bottom: 12px;
}

.project-setup-panel.hidden {
  display: none;
}

.project-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
}

.project-info-card,
.project-cards {
  display: grid;
  gap: 12px;
}

.project-cards {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.project-info-card {
  border: 1px solid #dbe4df;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfb;
}

.project-info-card strong,
.project-card strong {
  display: block;
  font-size: 18px;
}

.project-info-card span,
.project-card span {
  display: block;
  color: #66756d;
  margin-top: 4px;
}

.project-setup-actions {
  display: grid;
  align-content: start;
  gap: 10px;
}

.project-card {
  border: 1px solid #dbe4df;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
  cursor: pointer;
  color: #122033;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.project-card:hover,
.project-card:focus-visible {
  background: #f6fbf8;
  border-color: #c7ddd1;
  box-shadow: 0 8px 20px rgba(18, 32, 51, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.project-card:active {
  background: #edf6f1;
  transform: translateY(0);
}

.project-card.is-current {
  background: #eef8f2;
  border-color: #b7d7c5;
  box-shadow: 0 0 0 1px rgba(45, 139, 104, 0.14);
}

.project-card.is-current strong {
  color: #122033;
}

.project-card.is-current span {
  color: #496273;
}

.project-card.is-current small {
  background: #ffffff;
  color: #4f6b5f;
}

.project-card strong,
.project-card span,
.project-card small {
  color: inherit;
}

.project-card strong {
  color: #122033;
}

.project-card span {
  color: #55697c;
}

.project-card small {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f6f4;
  color: #5f6f67;
}

@media (max-width: 980px) {
  .project-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }}

@media (max-width: 640px) {
  .project-cards {
    grid-template-columns: 1fr;
  }}

/* Compact Documents Manager */
.documents-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.unit-documents-shell {
  display: grid;
  gap: 16px;
}

.unit-documents-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.unit-document-summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.unit-documents-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.unit-documents-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}

.unit-documents-filters select,
.unit-documents-search input {
  min-height: 42px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  padding: 0 14px;
  color: #10284f;
}

.unit-documents-search {
  margin-left: auto;
  flex: 1 1 280px;
}

.unit-documents-search input {
  min-width: 0;
  width: 100%;
}

.unit-documents-helper-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fbff;
  color: #4f6484;
  font-size: 13px;
}

.unit-documents-table-wrap {
  border: 1px solid #e4ebf5;
  border-radius: 12px;
  overflow: auto;
  background: #fff;
}

.unit-documents-table thead th {
  position: sticky;
  top: 0;
  background: #f8fbff;
  z-index: 1;
}

.unit-documents-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.unit-documents-warning-btn {
  color: #a46a00;
  border-color: #f2d39a;
  background: #fff8eb;
}

.unit-documents-warning-btn:hover {
  background: #fff2d9;
}

.unit-documents-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f8fbff;
}

.unit-documents-footer-note {
  color: #4f6484;
  font-size: 13px;
}

#tab-documents .documents-panel-head {
  align-items: flex-start;
  padding-bottom: 6px;
}

#tab-documents .documents-head-copy {
  display: grid;
  gap: 4px;
}

#tab-documents .documents-head-copy h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.05;
  color: #14345f;
}

#tab-documents .documents-head-copy p {
  margin: 0;
  color: #5f7285;
  font-size: 0.92rem;
}

#tab-documents .documents-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

#tab-documents .unit-documents-refresh-btn {
  min-height: 42px;
  padding-inline: 14px;
  gap: 8px;
  border-radius: 12px;
}

#tab-documents .unit-documents-refresh-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#tab-documents .unit-documents-refresh-icon svg,
#tab-documents .unit-documents-kpi-icon svg {
  width: 16px;
  height: 16px;
}

#tab-documents .unit-documents-shell {
  display: grid;
  gap: 12px;
}

#tab-documents .unit-documents-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

#tab-documents .unit-documents-kpi-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15, 35, 63, 0.04);
  background: #fff;
}

#tab-documents .unit-documents-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f5eff;
  background: #eaf2ff;
  flex: 0 0 42px;
}

#tab-documents .unit-documents-kpi-card.member .unit-documents-kpi-icon {
  color: #2563eb;
  background: #eaf2ff;
}

#tab-documents .unit-documents-kpi-card.drafts .unit-documents-kpi-icon {
  color: #8b5cf6;
  background: #f3e8ff;
}

#tab-documents .unit-documents-kpi-card.completed .unit-documents-kpi-icon {
  color: #1a9c68;
  background: #e6f8ef;
}

#tab-documents .unit-documents-kpi-card > div {
  display: grid;
  gap: 2px;
}

#tab-documents .unit-documents-kpi-card span {
  font-size: 0.88rem;
  color: #506a91;
  font-weight: 600;
}

#tab-documents .unit-documents-kpi-card strong {
  font-size: 1.6rem;
  line-height: 1;
  color: #14345f;
}

#tab-documents .unit-documents-kpi-card small {
  font-size: 0.78rem;
  color: #60748e;
}

#tab-documents .unit-documents-toolbar.modern {
  display: block;
}

#tab-documents .unit-documents-filters {
  display: grid;
  grid-template-columns: 340px 280px minmax(260px, 1fr);
  gap: 14px;
}

#tab-documents .unit-documents-filters select,
#tab-documents .unit-documents-search input {
  min-height: 46px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  padding: 0 14px;
  color: #10284f;
  font-size: 0.97rem;
}

#tab-documents .unit-documents-search {
  min-width: 0;
}

#tab-documents .unit-documents-category-tabs {
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid #e6edf6;
  padding: 2px 6px 0 6px;
}

#tab-documents .unit-documents-category-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 2px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #4f6484;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

#tab-documents .unit-documents-category-tabs button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #edf2f9;
  color: #6d7f96;
  font-size: 0.8rem;
  font-weight: 800;
}

#tab-documents .unit-documents-category-tabs button.active {
  color: #1d5fff;
  border-bottom-color: #2d63ff;
}

#tab-documents .unit-documents-category-tabs button.active span {
  background: #e8f0ff;
  color: #1d5fff;
}

#tab-activity .unit-activity-head p {
  margin: 4px 0 0;
  color: #60748e;
}

#tab-activity .unit-activity-shell {
  display: grid;
  gap: 14px;
}

#tab-activity .unit-activity-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(140px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

#tab-activity .unit-activity-filter-row label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#tab-activity .unit-activity-filter-row label span {
  color: #506a91;
  font-size: 0.78rem;
  font-weight: 700;
}

#tab-activity .unit-activity-filter-row input,
#tab-activity .unit-activity-filter-row select {
  min-height: 42px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: #10284f;
}

#tab-activity .unit-activity-table-wrap {
  overflow-x: auto;
}

#tab-activity .unit-activity-table {
  width: 100%;
  min-width: 980px;
}

#tab-activity .unit-activity-date {
  display: grid;
  gap: 3px;
}

#tab-activity .unit-activity-date strong {
  color: #10284f;
}

#tab-activity .unit-activity-date small {
  color: #6b7f99;
}

#tab-activity .unit-activity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

#tab-activity .unit-activity-badge.booking {
  color: #10284f;
  background: #e6eefb;
}

#tab-activity .unit-activity-badge.payment {
  color: #187a4b;
  background: #e7f8ee;
}

#tab-activity .unit-activity-badge.refund {
  color: #b26200;
  background: #fff2df;
}

#tab-activity .unit-activity-badge.document {
  color: #7b3fe4;
  background: #f2eaff;
}

#tab-activity .unit-activity-badge.member {
  color: #1d5ed8;
  background: #e8f0ff;
}

#tab-activity .unit-activity-badge.unit {
  color: #0f8a83;
  background: #e6fbf8;
}

#tab-activity .unit-activity-badge.system {
  color: #4b5563;
  background: #eef2f7;
}

#tab-activity .unit-activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #60748e;
  font-size: 0.9rem;
}

#tab-activity .unit-activity-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

#tab-activity .unit-activity-pagination select {
  min-height: 38px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  padding: 0 10px;
}

@media (max-width: 1300px) {
  #tab-activity .unit-activity-filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }}

@media (max-width: 860px) {
  #tab-activity .unit-activity-filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tab-activity .unit-activity-footer {
    align-items: flex-start;
    flex-direction: column;
  }}

@media (max-width: 620px) {
  #tab-activity .unit-activity-filter-row {
    grid-template-columns: 1fr;
  }}

#tab-documents .unit-documents-member-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

#tab-documents .unit-documents-members-card,
#tab-documents .unit-documents-table-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(15, 35, 63, 0.04);
  background: #fff;
}

#tab-documents .unit-documents-members-card {
  padding: 14px;
  display: grid;
  gap: 14px;
}

#tab-documents .unit-documents-members-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#tab-documents .unit-documents-members-head h3,
#tab-documents .unit-documents-table-head h3 {
  margin: 0;
  font-size: 1rem;
  color: #14345f;
}

#tab-documents .unit-documents-members-list {
  display: grid;
  gap: 10px;
}

#tab-documents .unit-documents-member-row {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 0 rgba(15, 35, 63, 0.04);
}

#tab-documents .unit-documents-member-row:hover {
  background: #f8fbff;
  border-color: #dbe7fb;
}

#tab-documents .unit-documents-member-row.active {
  background: #eef5ff;
  border-color: #cfe0ff;
}

#tab-documents .unit-documents-member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25aa75, #168a5c);
  color: #fff;
  font-weight: 800;
}

#tab-documents .unit-documents-member-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#tab-documents .unit-documents-member-copy strong {
  color: #14345f;
  font-size: 0.93rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#tab-documents .unit-documents-member-copy small,
#tab-documents .unit-documents-members-foot {
  color: #62758f;
  font-size: 0.82rem;
}

#tab-documents .unit-documents-member-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #edf2f9;
  color: #60748e;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#tab-documents .unit-documents-table-card {
  display: grid;
  gap: 0;
}

#tab-documents .unit-documents-table-head {
  padding: 12px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#tab-documents .unit-documents-table-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

#tab-documents .modern-documents-table th,
#tab-documents .modern-documents-table td {
  white-space: nowrap;
  font-size: 0.88rem;
  padding-top: 12px;
  padding-bottom: 12px;
}

#tab-documents .modern-documents-table td:first-child,
#tab-documents .modern-documents-table th:first-child {
  white-space: normal;
}

#tab-documents .unit-documents-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8rem;
  font-weight: 800;
}

#tab-documents .unit-documents-status-badge.success {
  background: #e7f8ef;
  border-color: #caead8;
  color: #1c8d61;
}

#tab-documents .unit-documents-status-badge.draft {
  background: #f2e9ff;
  border-color: #dfcdfd;
  color: #7d42df;
}

#tab-documents .unit-documents-status-badge.danger {
  background: #fff0ee;
  border-color: #f4c9c4;
  color: #bc4a3f;
}

#tab-documents .unit-documents-status-badge.neutral {
  background: #eef4ff;
  border-color: #d4e1fb;
  color: #3564b2;
}

#tab-documents .unit-documents-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

#tab-documents .unit-documents-empty-state {
  display: grid;
  justify-items: start;
  gap: 4px;
  padding: 18px 0;
}

#tab-documents .unit-documents-empty-state.compact {
  padding: 10px 4px 2px;
}

#tab-documents .unit-documents-empty-state strong {
  color: #16345d;
}

#tab-documents .unit-documents-empty-state span {
  color: #647890;
}

#tab-documents .unit-documents-table-inline-action {
  display: flex;
  justify-content: flex-end;
  padding: 0 18px 16px;
}

#tab-documents .unit-documents-add-wrap {
  position: relative;
}

#tab-documents .unit-documents-add-btn {
  min-width: 162px;
  min-height: 42px;
  justify-content: center;
}

#tab-documents .unit-documents-add-btn .caret {
  font-size: 0.7rem;
  opacity: 0.85;
}

#tab-documents .unit-documents-add-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  padding: 8px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 35, 63, 0.12);
  display: none;
  z-index: 35;
}

#tab-documents .unit-documents-add-wrap.open .unit-documents-add-menu {
  display: grid;
}

#tab-documents .unit-documents-add-menu button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #14345f;
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
}

#tab-documents .unit-documents-add-menu button:hover {
  background: #f5f9ff;
}

.unit-documents-dialog {
  width: min(720px, calc(100vw - 40px));
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  padding: 0;
}

.unit-documents-dialog-card {
  padding: 18px;
  border: 0;
  box-shadow: none;
}

.unit-documents-dialog-form {
  display: grid;
  gap: 16px;
}

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

.unit-documents-dialog-grid label {
  display: grid;
  gap: 7px;
}

.unit-documents-dialog-grid label span {
  font-size: 0.85rem;
  font-weight: 700;
  color: #405975;
}

.unit-documents-dialog-grid input,
.unit-documents-dialog-grid select {
  min-height: 44px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 0 13px;
  color: #14345f;
  background: #fff;
}

.unit-documents-dialog-file-field {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  #tab-documents .unit-documents-filters,
  #tab-documents .unit-documents-member-layout,
  #tab-documents .unit-documents-kpi-row {
    grid-template-columns: 1fr;
  }

  #tab-documents .unit-documents-table-head {
    align-items: flex-start;
    flex-direction: column;
  }}

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

.documents-folder-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe4df;
  border-radius: 14px;
  background: #fbfdff;
  box-shadow: 0 4px 12px rgba(16, 35, 63, 0.04);
}

.documents-folder-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.template-folder-label {
  display: grid;
  gap: 2px;
}

.template-folder-label strong {
  font-size: 13px;
  color: #122033;
}

.template-folder-label span,
.template-folder-preview {
  font-size: 11px;
  color: #5f7285;
}

.template-folder-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#documentList.records,
#overviewDocuments.doc-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 12px 12px;
  align-items: stretch;
}

.doc-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: 292px;
  padding: 12px;
  border: 1px solid #dbe4df;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(16, 35, 63, 0.04);
}

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

.doc-card-title strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
  color: #122033;
}

.doc-card-body {
  display: grid;
  gap: 8px;
  align-content: start;
}

.doc-card-section {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  background: #fbfdff;
}

.doc-card-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.doc-card-section-head span {
  font-size: 10px;
  font-weight: 700;
  color: #42556d;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.doc-card-section-head small {
  font-size: 10px;
  color: #70839a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.tag-config-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.doc-card-field {
  display: grid;
  gap: 4px;
}

.doc-template-input {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #d5dde7;
  border-radius: 10px;
  background: #f9fbfd;
  color: #122033;
  font-size: 12px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-output-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doc-output-meta div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.doc-output-meta span,
.doc-card-field span,
.doc-template-note {
  font-size: 11px;
  color: #5f7285;
}

.doc-output-meta strong,
.doc-file-name {
  display: block;
  font-size: 12px;
  color: #122033;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-card .document-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  align-self: end;
  padding-top: 2px;
}

.doc-card .document-actions button {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 11px;
  width: 100%;
  justify-content: center;
}

.doc-card .document-actions button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.doc-status-badge {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  white-space: nowrap;
}

.doc-status-badge.good {
  color: #1d7757;
  background: #e6f6ef;
  border-color: #bfe1d2;
}

.doc-status-badge.neutral {
  color: #245ec7;
  background: #eaf2ff;
  border-color: #c5d9fb;
}

.doc-status-badge.bad {
  color: #b14032;
  background: #fff0ee;
  border-color: #f3c5c0;
}

.doc-template-file-name-input {
  width: 100%;
}

.tag-viewer-form {
  width: min(1120px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  padding: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.tag-viewer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 0;
}

.tag-viewer-panel {
  border: 1px solid #dbe4df;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.tag-viewer-panel h3 {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #e5edf6;
  font-size: 13px;
}

.tag-viewer-raw {
  grid-column: 1 / -1;
}

.tag-viewer-raw pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  font-size: 11px;
  line-height: 1.45;
  background: #fbfdff;
}

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

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

  .unit-documents-toolbar,
  .unit-documents-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .unit-documents-search {
    margin-left: 0;
  }

  .unit-documents-search input {
    min-width: 0;
    width: 100%;
  }

  #documentList.records,
  #overviewDocuments.doc-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-output-meta,
  .doc-card .document-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }}

@media (max-width: 760px) {
  .documents-panel-head,
  .documents-head-actions {
    flex-wrap: wrap;
  }

  .unit-documents-summary {
    grid-template-columns: 1fr;
  }

  .documents-folder-controls,
  .doc-template-editor,
  .doc-output-meta,
  .tag-config-row,
  .tag-viewer-grid,
  #documentList.records,
  #overviewDocuments.doc-stack,
  .doc-card .document-actions {
    grid-template-columns: 1fr;
  }

  .documents-folder-controls input {
    grid-column: 1 / -1;
  }}

/* Compact inventory summary and members layout */
.project-type-banner {
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  min-height: 0;
}

.project-type-banner strong {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.project-type-banner span {
  font-size: 12px;
  line-height: 1.3;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: none;
  margin-bottom: 12px;
}

.compact-summary-card {
  min-height: 78px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(16, 35, 63, 0.05);
}

.summary-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #15803d;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}

.summary-card-icon svg {
  width: 18px;
  height: 18px;
}

.summary-card-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.summary-card-copy span {
  font-size: 12px;
  color: #607485;
  margin: 0;
}

.summary-card-copy strong {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  color: #122033;
}

.summary-status-card {
  justify-content: space-between;
  gap: 14px;
}

.summary-status-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-status-divider {
  width: 1px;
  align-self: stretch;
  background: #dfe7e2;
  flex: 0 0 auto;
}

.summary-status-action {
  border: 0;
  background: transparent;
  color: #15803d;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 4px;
  min-width: 118px;
  cursor: pointer;
  font: inherit;
  text-align: center;
}

.summary-status-action:hover {
  color: #166534;
}

.summary-status-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.summary-card-icon-action {
  background: #ecfdf3;
  color: #16a34a;
}

.summary-status-action span:last-child {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
}

.status-dialog-form {
  --dialog-width: 620px;
}

.status-dialog-inline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
}

.status-dialog-inline-grid .field-block {
  margin: 0;
}

.sold-only-grid {
  margin-top: 10px;
}

.sold-members-block {
  grid-column: 1 / -1;
}

@media (max-width: 780px) {
  .status-dialog-inline-grid {
    grid-template-columns: 1fr;
  }}

.members-panel-head {
  padding: 10px 14px;
}

.members-head-copy {
  display: grid;
  gap: 2px;
}

.members-head-copy h2 {
  margin: 0;
  font-size: 17px;
}

.members-head-copy p {
  margin: 0;
  font-size: 12px;
  color: #667b8f;
}

.members-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

#memberSearchBox {
  min-height: 36px;
  width: 240px;
  padding: 0 12px;
  border: 1px solid #d9e2eb;
  border-radius: 12px;
  background: #fff;
  font-size: 12px;
}

.members-records {
  padding: 10px 12px 12px;
  gap: 12px;
}

.member-card {
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid #dbe4df;
  border-radius: 14px;
  background: #fcfefd;
  box-shadow: 0 8px 18px rgba(16, 35, 63, 0.035);
}

.member-card-head,
.member-card-head-main,
.member-title,
.member-head-actions {
  display: flex;
  align-items: center;
}

.member-card-head {
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e9efeb;
}

.member-card-head-main {
  gap: 12px;
  min-width: 0;
}

.member-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #eef8f2;
  color: #1f7a5a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 42px;
}

.member-title {
  gap: 8px;
  flex-wrap: wrap;
}

.member-title strong {
  font-size: 14px;
  line-height: 1.15;
  color: #122033;
}

.member-primary-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e8f7ef;
  color: #1f7a5a;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
}

.member-head-actions {
  gap: 6px;
  justify-content: flex-end;
}

.compact-action-btn {
  min-height: 30px;
  padding: 4px 12px;
  font-size: 11px;
  border-radius: 10px;
}

.member-info-row {
  display: grid;
  border-top: 1px solid #edf2ef;
  padding: 0 16px;
}

.member-info-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.member-info-row-6 {
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1.35fr;
}

.member-info-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-right: 1px solid #edf2ef;
}

.member-info-row .member-info-cell:last-child {
  border-right: 0;
}

.member-info-icon {
  width: 18px;
  height: 18px;
  color: #1f7a5a;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.member-info-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.member-info-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.member-info-copy span {
  font-size: 11px;
  color: #6b7c8f;
}

.member-info-copy strong {
  font-size: 12px;
  line-height: 1.3;
  color: #122033;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1180px) {
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-info-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .member-info-row-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }}

@media (max-width: 760px) {
  .members-panel-head,
  .members-head-actions,
  .summary-grid,
  .member-card-head {
    grid-template-columns: 1fr;
  }

  .members-panel-head,
  .members-head-actions {
    display: grid;
  }

  #memberSearchBox {
    width: 100%;
  }

  .member-info-row-4,
  .member-info-row-6,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .member-info-cell {
    border-right: 0;
    border-bottom: 1px solid #edf2ef;
  }

  .member-info-row .member-info-cell:last-child {
    border-bottom: 0;
  }}

/* Overview generated documents summary */
#overviewDocuments.doc-stack {
  display: block;
  padding: 10px 12px 12px;
}

#tab-overview .overview-sheet-wrap {
  gap: 12px;
  padding: 12px 14px 14px;
}

#tab-overview .overview-secondary-stack {
  gap: 14px;
}

#tab-overview .overview-sheet-panel,
#tab-overview .overview-remark-panel,
#tab-overview .receipt-panel,
#tab-overview .lifecycle-actions-panel,
#tab-overview .overview-footer-grid > .panel,
#tab-overview .overview-secondary-stack > .panel {
  border-color: #d9e5f0;
}

#tab-overview .panel-head h2,
#tab-overview .panel-head.in-panel h2 {
  font-size: 16px;
  line-height: 1.3;
}

#tab-overview .overview-remark {
  gap: 12px;
  padding: 12px 16px;
  font-size: 13px;
}

#tab-overview .overview-remark strong {
  font-size: 15px;
  line-height: 1.35;
}

#tab-overview .receipt-table th,
#tab-overview .receipt-table td {
  padding: 11px 12px;
  font-size: 13px;
}

#tab-overview .overview-footer-grid {
  gap: 14px;
}

#tab-overview #overviewDocuments.doc-stack {
  padding: 14px 16px 16px;
}

#tab-overview .overview-generated-docs {
  gap: 12px;
}

#tab-overview .overview-generated-docs-title strong {
  font-size: 15px;
}

#tab-overview .overview-generated-doc-row {
  gap: 12px;
  padding: 12px 14px;
}

#tab-overview .overview-generated-doc-copy strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: #122033;
}

#tab-overview .overview-generated-doc-copy span,
#tab-overview .overview-generated-doc-meta span {
  font-size: 12px;
  line-height: 1.35;
}

#tab-overview .booking-snapshot-grid {
  gap: 12px;
  padding: 16px;
}

#tab-overview .booking-snapshot-grid div {
  padding: 12px 14px;
  min-height: 76px;
}

#tab-overview .booking-snapshot-grid span {
  font-size: 12px;
}

#tab-overview .booking-snapshot-grid strong {
  margin-top: 7px;
  font-size: 16px;
  line-height: 1.25;
}

#tab-overview .booking-timeline {
  gap: 10px;
  padding: 16px;
}

#tab-overview .timeline-item {
  padding: 6px 0 6px 12px;
}

#tab-overview .timeline-item strong {
  font-size: 13px;
  line-height: 1.35;
  color: #10233f;
}

#tab-overview .timeline-item span {
  font-size: 12px;
  line-height: 1.4;
}

#tab-overview .customer-panel .customer-fields {
  padding: 16px;
  gap: 10px;
}

#tab-overview .customer-panel .customer-fields div {
  font-size: 13px;
  line-height: 1.4;
}

.overview-generated-docs {
  display: grid;
  gap: 10px;
}

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

.overview-generated-docs-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-generated-docs-title strong {
  font-size: 14px;
  color: #122033;
}

.overview-generated-docs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #245ec7;
  font-size: 11px;
  font-weight: 700;
}

.overview-generated-docs-list {
  display: grid;
  gap: 8px;
}

.overview-generated-doc-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4df;
  border-radius: 12px;
  background: #fff;
}

.overview-generated-doc-row.missing {
  border-color: #efc7c1;
  background: #fffaf9;
}

/* Canonical unit current-state dashboard */
.unit-status-banner-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 2.2fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #d9e5f0;
  border-radius: 18px;
  background: #fff;
  padding: 14px 18px;
  box-shadow: 0 8px 22px rgba(16, 35, 63, 0.05);
}

.unit-status-banner-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.unit-status-banner-mark {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e9f7ef;
  color: #168153;
  flex: 0 0 58px;
}

.unit-status-banner-card.status-hold .unit-status-banner-mark {
  background: #fff5de;
  color: #b7791f;
}

.unit-status-banner-card.status-unsold .unit-status-banner-mark {
  background: #eef3fb;
  color: #21406a;
}

.unit-status-banner-mark svg {
  width: 24px;
  height: 24px;
}

.unit-status-banner-copy strong {
  display: block;
  font-size: 18px;
  line-height: 1;
  color: var(--green);
}

.unit-status-banner-card.status-hold .unit-status-banner-copy strong {
  color: #b7791f;
}

.unit-status-banner-card.status-unsold .unit-status-banner-copy strong {
  color: var(--navy);
}

.unit-status-banner-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.unit-status-banner-info-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px 12px;
  min-width: 0;
}

.unit-status-banner-info-grid div span,
.unit-current-snapshot-grid div span,
.unit-current-payment-grid div span,
.unit-current-charge-list div span,
.unit-current-date-list div span,
.unit-current-history-docs span {
  display: block;
  color: #5f7285;
  font-size: 11px;
  font-weight: 700;
}

.unit-status-banner-info-grid div strong,
.unit-current-snapshot-grid div strong,
.unit-current-payment-grid div strong,
.unit-current-charge-list div strong,
.unit-current-date-list div strong,
.unit-current-history-docs strong {
  display: block;
  margin-top: 4px;
  color: #10233f;
  font-size: 14px;
}

.unit-current-shell {
  display: grid;
  gap: 10px;
}

.unit-current-row {
  display: grid;
  gap: 10px;
}

.unit-current-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.unit-current-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.unit-current-card {
  border: 1px solid #dbe4df;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 35, 63, 0.05);
  overflow: hidden;
  min-width: 0;
}

.unit-current-card-head {
  padding: 10px 12px;
  border-bottom: 1px solid #e9eef5;
}

.unit-current-card-head h3 {
  margin: 0;
  font-size: 13px;
  color: #122033;
}

.unit-current-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.unit-current-snapshot-grid div {
  padding: 10px 12px;
  border-right: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
}

.unit-current-snapshot-grid div:nth-child(2n) {
  border-right: 0;
}

.unit-current-customer-card {
  display: flex;
  gap: 12px;
  padding: 12px 12px 10px;
}

.unit-current-customer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d9ebff 0%, #bfd8fb 100%);
  color: #21406a;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  flex: 0 0 48px;
}

.unit-current-customer-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.unit-current-customer-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.unit-current-customer-title strong {
  font-size: 17px;
  color: #122033;
}

.unit-current-customer-lines {
  display: grid;
  gap: 4px;
}

.unit-current-customer-lines span {
  color: #42566e;
  font-size: 12px;
  line-height: 1.35;
}

.unit-current-inline-btn {
  margin: 0 12px 12px;
}

.unit-current-payment-grid,
.unit-current-date-list,
.unit-current-charge-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

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

.unit-current-payment-grid .good,
.unit-current-charge-list .good {
  color: var(--green);
}

.unit-current-payment-grid .bad {
  color: #cf3d32;
}

.unit-current-charge-list div,
.unit-current-date-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.unit-current-charge-list .total-row {
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
}

.unit-current-lifecycle {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.unit-lifecycle-step {
  position: relative;
  padding-top: 34px;
  text-align: center;
}

.unit-lifecycle-step::before {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(-50% + 18px);
  right: calc(50% + 18px);
  height: 2px;
  background: #d8e2ef;
}

.unit-lifecycle-step:first-child::before {
  display: none;
}

.unit-lifecycle-marker {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #d8e2ef;
  color: #42566e;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
}

.unit-lifecycle-step.done .unit-lifecycle-marker,
.unit-lifecycle-step.active .unit-lifecycle-marker {
  background: linear-gradient(180deg, #1f8b63 0%, #17684b 100%);
  color: #fff;
}

.unit-lifecycle-step strong {
  display: block;
  color: #10233f;
  font-size: 12px;
}

.unit-lifecycle-step span,
.unit-lifecycle-step small {
  display: block;
  margin-top: 3px;
  color: #5f7285;
  font-size: 10px;
}

.unit-current-timeline,
.unit-current-alerts {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.unit-current-timeline {
  max-height: 320px;
  overflow-y: auto;
  align-content: start;
  padding-right: 8px;
}

.compact-timeline .timeline-item {
  padding: 7px 0;
}

.timeline-item.timeline-document-summary {
  border-left-style: dashed;
  border-left-color: #9ab8ff;
  background: #f6f9ff;
  border-radius: 10px;
  padding: 8px 12px;
}

.unit-current-alert {
  border: 1px solid #e4e9f2;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  color: #42566e;
  background: #f8fbff;
}

.unit-current-alert.success {
  border-color: #cae9dc;
  background: #eff9f4;
  color: #1d7757;
}

.unit-current-alert.warning {
  border-color: #f2d094;
  background: #fff8ea;
  color: #875300;
}

.unit-current-alert.error {
  border-color: #f1c0bb;
  background: #fff1ef;
  color: #b63a2b;
}

.unit-current-history-card .table-wrap {
  padding: 0 0 6px;
}

.compact-history-card .table-wrap {
  max-height: 300px;
}

.unit-current-history-table th,
.unit-current-history-table td {
  font-size: 12px;
}

.current-booking-row {
  background: #f3f8ff;
}

.unit-current-history-docs {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #e9eef5;
  border-radius: 10px;
  background: #fbfcfe;
}

.unit-current-sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0 0;
  background: linear-gradient(180deg, rgba(247,249,252,0) 0%, rgba(247,249,252,0.9) 40%, rgba(247,249,252,1) 100%);
}

.unit-current-sticky-actions > button,
.unit-current-more-actions > summary {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  border: 1px solid #dbe4df;
  box-shadow: none;
  list-style: none;
}

.unit-current-more-actions {
  position: relative;
}

.unit-current-more-actions > summary {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.unit-current-more-actions[open] .unit-current-more-menu {
  display: grid;
}

.unit-current-more-menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: 180px;
  gap: 4px;
  padding: 8px;
  border: 1px solid #dbe4df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(16, 35, 63, 0.12);
}

.unit-current-more-menu button {
  min-height: 34px;
  background: transparent;
  color: var(--navy);
  border: 0;
  box-shadow: none;
  text-align: left;
}

.unit-current-more-menu button:hover {
  background: #f5f8fd;
  transform: none;
  box-shadow: none;
}

.unit-current-subnote {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.unit-lifecycle-strip {
  display: grid;
  gap: 12px 18px;
  grid-template-columns: minmax(220px, 0.95fr) minmax(190px, 0.7fr) minmax(0, 2.35fr);
  align-items: center;
  padding: 14px 18px;
  border: 1px solid #dbe4df;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 35, 63, 0.05);
}

.summary-grid.unit-summary-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.unit-hero-strip {
  display: grid;
  grid-template-columns: minmax(440px, 1.65fr) minmax(310px, 0.9fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0a2a59 0%, #082248 48%, #0b2d63 100%);
  border: 1px solid rgba(134, 169, 229, 0.28);
  box-shadow: 0 20px 38px rgba(8, 34, 72, 0.18);
  color: #fff;
  overflow: hidden;
}

.unit-hero-main {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.unit-hero-icon {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 149, 232, 0.18);
  border: 1px solid rgba(186, 209, 255, 0.26);
  color: #fff;
}

.unit-hero-icon svg {
  width: 30px;
  height: 30px;
}

.unit-hero-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.unit-hero-kicker {
  font-size: 10px;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: rgba(235, 243, 255, 0.78);
}

.unit-hero-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.unit-hero-title-row h2 {
  margin: 0;
  font-size: 34px;
  line-height: 0.95;
  color: #f8fbff !important;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.14);
}

.unit-hero-copy p {
  margin: 0;
  font-size: 11px;
  color: rgba(235, 243, 255, 0.92);
}

.unit-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  min-width: 0;
  gap: 2px;
}

.unit-hero-metric {
  display: grid;
  gap: 4px;
  padding: 2px 10px;
  min-width: 0;
  border-left: 1px solid rgba(187, 212, 255, 0.22);
}

.unit-hero-metric span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(235, 243, 255, 0.76);
}

.unit-hero-metric strong {
  font-size: 14px;
  line-height: 1.2;
  color: #fff;
  word-break: normal;
  overflow-wrap: anywhere;
}

.unit-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.unit-hero-actions .light-btn {
  min-width: 114px;
  min-height: 38px;
  padding: 0 12px;
  background: #fff;
  color: #0c2653;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 24px rgba(4, 14, 32, 0.16);
}

.unit-hero-actions .icon-btn {
  min-width: 38px;
  width: 38px;
  padding: 0;
}

.unit-hero-actions .icon-btn svg {
  width: 15px;
  height: 15px;
}

.unit-hero-menu {
  position: relative;
}

.unit-hero-menu-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 18;
  min-width: 190px;
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(189, 209, 243, 0.92);
  background: #fff;
  box-shadow: 0 18px 40px rgba(7, 21, 42, 0.2);
}

.unit-hero-menu-popover button {
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #15315c;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.unit-hero-menu-popover button:hover {
  background: #eef4ff;
}

.unit-overview-reference-shell {
  display: grid;
  gap: 10px;
}

#main-inventory .content-card > .tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 12px;
  margin: 2px 12px 14px;
  border: 1px solid #e3ebf7;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(241, 246, 255, 0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 24px rgba(15, 34, 58, 0.045);
}

#main-inventory .content-card > .tabs .tab {
  position: relative;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.72);
  color: #4d607c;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: inset 0 -1px 0 rgba(226, 236, 248, 0.9);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

#main-inventory .content-card > .tabs .tab:hover {
  background: #ffffff;
  color: #15345f;
  border-color: rgba(47, 101, 194, 0.16);
  box-shadow:
    0 8px 18px rgba(39, 73, 133, 0.08),
    inset 0 -1px 0 rgba(226, 236, 248, 0.95);
  transform: translateY(-1px);
}

#main-inventory .content-card > .tabs .tab.active {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%) !important;
  color: #10305c !important;
  border-color: rgba(34, 90, 188, 0.2) !important;
  box-shadow:
    0 10px 22px rgba(36, 86, 162, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8) !important;
}

#main-inventory .content-card > .tabs .tab.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f57db 0%, #4e9cff 100%);
}

.unit-overview-reference-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, 0.92fr);
  gap: 10px;
  align-items: start;
}

.unit-overview-reference-main,
.unit-overview-reference-side {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.unit-overview-reference-card {
  border: 1px solid #dfe8f4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 34, 58, 0.05);
  padding: 10px 12px;
  min-width: 0;
}

.unit-overview-reference-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.unit-overview-reference-head h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  color: #10284f;
  text-transform: uppercase;
}

.unit-overview-info-tag {
  font-size: 10px;
  color: #667892;
  font-weight: 600;
}

.unit-overview-booking-top {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.6fr);
  gap: 14px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #edf2f8;
}

.unit-overview-customer-block {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.unit-overview-customer-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #5c7cf5 0%, #4b67d9 100%);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.18);
}

.unit-overview-customer-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.unit-overview-customer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.unit-overview-customer-title strong {
  font-size: 13px;
  color: #10284f;
}

.unit-overview-customer-copy > span {
  font-size: 12px;
  color: #465a76;
}

.unit-overview-inline-link {
  padding: 0;
  background: none;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  color: #2258df;
}

.unit-overview-booking-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
  padding-left: 12px;
  border-left: 1px solid #edf2f8;
}

.unit-overview-booking-meta-item,
.unit-overview-profile-item,
.unit-overview-side-list-item,
.unit-overview-base-metric {
  display: grid;
  gap: 4px;
}

.unit-overview-booking-meta-item span,
.unit-overview-profile-item span,
.unit-overview-side-list-item span,
.unit-overview-base-metric span,
.unit-overview-other-card span {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.unit-overview-booking-meta-item strong,
.unit-overview-profile-item strong,
.unit-overview-side-list-item strong {
  font-size: 13px;
  color: #10284f;
}

.unit-overview-journey-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  align-items: start;
}

.unit-overview-journey-step {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
  position: relative;
}

.unit-overview-journey-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  border-radius: 999px;
  background: #d7e3f6;
}

.unit-overview-journey-step.is-done:not(:last-child)::after,
.unit-overview-journey-step.is-active:not(:last-child)::after {
  background: linear-gradient(90deg, #20a45f 0%, #2b71da 100%);
}

.unit-overview-journey-marker {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef3fb;
  color: #435978;
  border: 2px solid #cfdcf2;
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 800;
}

.unit-overview-journey-step.is-done .unit-overview-journey-marker {
  background: #20a45f;
  border-color: #20a45f;
  color: #fff;
}

.unit-overview-journey-step.is-done .unit-overview-journey-marker svg {
  width: 14px;
  height: 14px;
}

.unit-overview-journey-step.is-active .unit-overview-journey-marker {
  background: #0f5fd2;
  border-color: #0f5fd2;
  color: #fff;
}

.unit-overview-journey-step strong {
  font-size: 12px;
  color: #10284f;
}

.unit-overview-journey-step span {
  font-size: 11px;
  color: #4f7e49;
}

.unit-overview-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #edf2f8;
  border-radius: 14px;
  overflow: hidden;
}

.unit-overview-profile-item {
  padding: 10px 12px;
  border-right: 1px solid #edf2f8;
  border-bottom: 1px solid #edf2f8;
}

.unit-overview-profile-item:nth-child(3n) {
  border-right: 0;
}

.unit-overview-profile-item:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.unit-overview-profile-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #63748a;
  font-style: italic;
}

.unit-overview-activity-list {
  display: grid;
  gap: 8px;
}

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

.unit-overview-activity-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f8ff;
  color: #1d5cd8;
}

.unit-overview-activity-icon svg {
  width: 14px;
  height: 14px;
}

.unit-overview-activity-copy {
  display: grid;
  gap: 2px;
}

.unit-overview-activity-copy strong {
  font-size: 12px;
  color: #10284f;
}

.unit-overview-activity-copy span,
.unit-overview-activity-empty,
.unit-overview-base-progress p,
.unit-overview-previous-copy span,
.unit-overview-health-card span,
.unit-overview-milestone-card span {
  font-size: 11px;
  color: #64748b;
}

.unit-overview-base-card {
  background: radial-gradient(circle at top right, rgba(46, 150, 255, 0.08), transparent 38%), linear-gradient(180deg, #f6fffb 0%, #fbfffd 100%);
}

.unit-overview-base-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(170px, 0.7fr);
  gap: 12px;
  align-items: stretch;
}

.unit-overview-base-metric strong {
  font-size: 16px;
  line-height: 1.1;
}

.unit-overview-base-metric strong.good { color: #0b8f4d; }
.unit-overview-base-metric strong.bad { color: #dc2626; }

.unit-overview-base-metric small,
.unit-overview-other-card small {
  font-size: 10px;
  color: #5c6d83;
}

.unit-overview-other-card {
  padding: 14px;
  border: 1px solid #dbe4f2;
  border-radius: 14px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.unit-overview-other-card strong {
  font-size: 15px;
  color: #10284f;
}

.unit-overview-base-progress {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.unit-overview-base-progress-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.unit-overview-base-progress-meta strong {
  font-size: 13px;
  color: #0c8a4f;
}

.unit-overview-base-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #d5eae0;
  overflow: hidden;
}

.unit-overview-base-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1ba158 0%, #0a7a43 100%);
}

.unit-overview-base-overdue {
  font-size: 11px;
  color: #8b2f2f;
}

.unit-overview-base-overdue strong {
  margin-left: 6px;
  font-size: 14px;
  color: #dc2626;
}

.unit-overview-base-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.unit-overview-base-actions .ghost-btn {
  min-height: 36px;
  font-size: 12px;
}

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

.unit-overview-milestone-card {
  background: linear-gradient(180deg, #fffaf2 0%, #fffdfa 100%);
  border-color: #f4d7b7;
}

.unit-overview-health-card {
  background: linear-gradient(180deg, #f7fffb 0%, #fbfffd 100%);
}

.unit-overview-milestone-card strong,
.unit-overview-health-card strong,
.unit-overview-previous-copy strong {
  font-size: 14px;
  color: #10284f;
}

.unit-overview-side-status {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.unit-overview-side-status.warning {
  background: #fff0df;
  color: #df6d14;
}

.unit-overview-side-status.neutral {
  background: #f1f5fb;
  color: #51647d;
}

.unit-overview-side-list {
  display: grid;
  gap: 8px;
}

.unit-overview-side-list-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
}

.unit-overview-previous-card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.unit-overview-actions-row-card {
  padding-top: 10px;
}

.unit-overview-actions-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.unit-overview-action-btn {
  min-height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.unit-overview-action-btn svg {
  width: 16px;
  height: 16px;
}

.unit-overview-action-btn.primary {
  background: linear-gradient(180deg, #113985 0%, #09265b 100%);
  border-color: #0d2e69;
  color: #fff;
}

.unit-overview-action-btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #174397 0%, #0b2c69 100%);
}

.unit-lifecycle-strip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.unit-lifecycle-strip-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.unit-lifecycle-strip-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #eef5ff;
  color: #2f6de0;
}

.unit-lifecycle-strip-icon svg {
  width: 16px;
  height: 16px;
}

.unit-lifecycle-strip-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.unit-lifecycle-strip-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.unit-lifecycle-strip-customer {
  display: grid;
  gap: 4px;
  align-content: center;
  min-width: 0;
  padding: 4px 0 4px 14px;
  border-left: 1px solid #e4eaf2;
}

.unit-lifecycle-strip-customer span,
.unit-lifecycle-strip-grid span {
  font-size: 11px;
  font-weight: 700;
  color: #5f7285;
}

.unit-lifecycle-strip-customer strong,
.unit-lifecycle-strip-grid strong {
  font-size: 14px;
  color: #10233f;
  line-height: 1.3;
}

.unit-lifecycle-strip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 10px 14px;
  align-items: start;
}

.unit-lifecycle-strip-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.unit-lifecycle-strip-meta strong,
.unit-lifecycle-strip-customer strong {
  word-break: break-word;
}

.unit-lifecycle-workspace {
  gap: 12px;
}

.unit-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-areas:
    "snapshot customer"
    "lifecycle financial"
    "history alerts"
    "actions actions";
  gap: 14px;
  align-items: start;
}

.unit-overview-grid-card {
  min-width: 0;
}

.unit-overview-grid-snapshot { grid-area: snapshot; }
.unit-overview-grid-customer { grid-area: customer; }
.unit-overview-grid-lifecycle { grid-area: lifecycle; }
.unit-overview-grid-financial { grid-area: financial; }
.unit-overview-grid-history { grid-area: history; }
.unit-overview-grid-alerts { grid-area: alerts; }
.unit-overview-grid-actions { grid-area: actions; }

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

.unit-lifecycle-main,
.unit-lifecycle-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.unit-workspace-card {
  min-width: 0;
}

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

.unit-workspace-financial-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.unit-workspace-financial-grid div {
  padding: 10px 12px;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  background: #fbfcfe;
}

.unit-lifecycle-subsection {
  padding: 0 12px 12px;
  display: grid;
  gap: 10px;
}

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

.unit-lifecycle-subsection-head h4 {
  margin: 0;
  font-size: 12px;
  color: #22364f;
}

.unit-workspace-charge-list {
  padding: 0;
}

.unit-lifecycle-progress-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.unit-workspace-timeline {
  padding: 0 6px 0 0;
  max-height: 320px;
  overflow-y: auto;
}

.unit-workspace-history-table {
  table-layout: fixed;
}

.unit-workspace-history-table th:nth-child(1) { width: 12%; }
.unit-workspace-history-table th:nth-child(2) { width: 18%; }
.unit-workspace-history-table th:nth-child(3) { width: 12%; }
.unit-workspace-history-table th:nth-child(4) { width: 14%; }
.unit-workspace-history-table th:nth-child(5) { width: 14%; }
.unit-workspace-history-table th:nth-child(6) { width: 10%; }
.unit-workspace-history-table th:nth-child(7) { width: 10%; }
.unit-workspace-history-table th:nth-child(8) { width: 10%; }

.unit-workspace-history-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-lifecycle-side {
  position: sticky;
  top: 88px;
}

.unit-workspace-sticky-card {
  position: sticky;
  top: 88px;
}

.unit-workspace-dates-list {
  padding-bottom: 4px;
}

.unit-workspace-alerts {
  padding-top: 0;
}

.unit-workspace-docs-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.unit-workspace-docs-summary div {
  padding: 10px 12px;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  background: #fbfcfe;
}

.unit-workspace-side-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.unit-workspace-side-actions .ghost-btn {
  min-height: 38px;
  justify-content: center;
  padding: 0 10px;
}

.unit-overview-grid-actions {
  padding-bottom: 10px;
}

.unit-overview-grid-actions .unit-current-card-head {
  padding-bottom: 6px;
}

.quick-actions-grid,
.unit-overview-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 8px;
  padding: 0 12px 0;
}

.quick-action-btn,
.unit-overview-quick-actions .unit-overview-action-tile {
  min-width: 0;
  height: 60px;
  min-height: 60px;
  padding: 7px 4px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #dbe5f1;
  color: #10284f;
  box-shadow: none;
}

.quick-action-btn:hover:not(:disabled),
.unit-overview-quick-actions .unit-overview-action-tile:hover:not(:disabled) {
  background: #f8fbff;
  border-color: #c9d8ec;
}

.unit-overview-quick-actions .unit-overview-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: #f2f7ff;
  color: #163b72;
  font-size: 0;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  border: 1px solid #d6e3f7;
  position: relative;
}

.unit-overview-quick-actions .unit-overview-action-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.9;
}

.unit-overview-quick-actions .unit-overview-action-label {
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.unit-overview-quick-actions .unit-overview-action-icon::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #d4a641;
}

.quick-action-btn:disabled,
.unit-overview-quick-actions .unit-overview-action-tile:disabled {
  opacity: 0.65;
}

.quick-action-btn:disabled .unit-overview-action-icon,
.unit-overview-quick-actions .unit-overview-action-tile:disabled .unit-overview-action-icon {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}

.quick-action-btn:disabled .unit-overview-action-icon::after,
.unit-overview-quick-actions .unit-overview-action-tile:disabled .unit-overview-action-icon::after {
  background: #d8dee8;
}

.compact-warning {
  margin: 0 12px 10px;
  padding: 8px 10px;
  font-size: 11px;
}

.unit-selector-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  min-height: 0;
}

#main-inventory-toolbar .unit-selector-status {
  width: 340px;
  min-width: 280px;
  max-width: 340px;
}

.unit-selector-status:empty {
  display: none;
  margin-top: 0;
  min-height: 0;
}

#main-inventory-toolbar .header-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-start;
  gap: 12px;
  width: auto;
  max-width: none;
  margin-top: 0;
}

#bookingWizardSharedUnitSelector .header-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: none;
  margin-top: 0;
  align-items: end;
}

#main-inventory-toolbar .header-filters label {
  display: grid;
  gap: 5px;
  width: 340px;
  min-width: 280px;
  max-width: 340px;
}

#bookingWizardSharedUnitSelector .header-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

#main-inventory-toolbar .header-filters label:first-child,
#bookingWizardSharedUnitSelector .header-filters label:first-child {
  display: grid;
}

#main-inventory-toolbar .header-filters span,
#bookingWizardSharedUnitSelector .header-filters span {
  display: block;
}

#main-inventory-toolbar .project-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-start;
  gap: 12px;
  width: auto;
  max-width: none;
  margin-top: 6px;
}

#bookingWizardSharedUnitSelector .project-toolbar-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  width: 100%;
  max-width: none;
  margin-top: 6px;
}

#main-inventory-toolbar .project-toolbar-filters.hidden,
#bookingWizardSharedUnitSelector .project-toolbar-filters.hidden {
  display: none;
}

#main-inventory-toolbar .project-toolbar-filters label {
  width: 340px;
  min-width: 280px;
  max-width: 340px;
}

#bookingWizardSharedUnitSelector .project-toolbar-filters label {
  min-width: 0;
}

#main-inventory-toolbar .header-filters select,
#main-inventory-toolbar .project-toolbar-filters select,
#bookingWizardSharedUnitSelector .header-filters select,
#bookingWizardSharedUnitSelector .project-toolbar-filters select {
  width: 100%;
}

.selector-note {
  color: #64748b;
  font-size: 12px;
}

.selector-note.error {
  color: #b63a2b;
}

#main-inventory-toolbar {
  position: relative;
}

#main-inventory-toolbar .unit-picker-toolbar {
  position: relative;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
}

#main-inventory-toolbar .unit-picker-anchor {
  position: relative;
  flex: 0 1 clamp(430px, 36vw, 520px);
  width: clamp(430px, 36vw, 520px);
  min-width: 360px;
  max-width: 520px;
}

#main-inventory-toolbar .unit-picker-trigger-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#main-inventory-toolbar .unit-picker-trigger-label {
  flex: 0 0 auto;
  color: #243b63;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

#main-inventory-toolbar .unit-picker-trigger {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid #d8e1ef;
  background: #fff;
  color: #0f2447;
  font: inherit;
  text-align: left;
  box-shadow: 0 10px 30px rgba(15, 36, 71, 0.08);
}

#main-inventory-toolbar .manage-units-trigger {
  flex: 0 0 auto;
  min-height: 38px;
  white-space: nowrap;
}

#main-inventory-toolbar .unit-selector-status {
  width: auto;
  min-width: 0;
  max-width: none;
  margin-top: 0;
}

#main-inventory-toolbar .unit-picker-trigger:hover {
  border-color: #c1d0e8;
}

#main-inventory-toolbar .unit-picker-trigger:focus-visible {
  outline: 2px solid #173b78;
  outline-offset: 2px;
}

#main-inventory-toolbar .unit-picker-trigger-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#main-inventory-toolbar .unit-picker-trigger-icon {
  color: #49658e;
  font-size: 12px;
  flex: 0 0 auto;
}

#main-inventory-toolbar .unit-picker-popover {
  --unit-picker-shift-x: 0px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  width: min(468px, calc(100vw - 24px));
  transform: translateX(var(--unit-picker-shift-x));
}

#main-inventory-toolbar .unit-picker-popover[data-placement="top"] {
  top: auto;
  bottom: calc(100% + 8px);
}

#main-inventory-toolbar .unit-picker-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: 400px;
  overflow: hidden;
  border: 1px solid #d7e1ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 36, 71, 0.14);
}

#main-inventory-toolbar .unit-picker-sticky {
  display: grid;
  gap: 8px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid #e5edf7;
  background: #fff;
}

#main-inventory-toolbar .unit-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#main-inventory-toolbar .unit-picker-head h3 {
  margin: 0;
  color: #0f2447;
  font-size: 15px;
  font-weight: 800;
}

#main-inventory-toolbar .unit-picker-head-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #49658e;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

#main-inventory-toolbar .unit-picker-close {
  border: 0;
  background: transparent;
  color: #173b78;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

#main-inventory-toolbar .unit-picker-search-row input {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  background: #fdfefe;
  color: #0f2447;
  font: inherit;
}

#main-inventory-toolbar .unit-picker-search-row input:focus-visible {
  outline: 2px solid #173b78;
  outline-offset: 2px;
}

#main-inventory-toolbar .unit-picker-chip-groups {
  display: grid;
  gap: 6px;
}

#main-inventory-toolbar .unit-picker-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#main-inventory-toolbar .unit-picker-chip {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid #d7e1ee;
  background: #fff;
  color: #35527d;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
}

#main-inventory-toolbar .unit-picker-chip:hover {
  transform: translateY(-1px);
}

#main-inventory-toolbar .unit-picker-chip.is-active {
  border-color: #173b78;
  background: #173b78;
  color: #fff;
}

#main-inventory-toolbar .unit-picker-chip.is-disabled,
#main-inventory-toolbar .unit-picker-chip:disabled {
  border-color: #d7dce5;
  background: #f1f4f8;
  color: #8a95a5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

#main-inventory-toolbar .unit-picker-chip.is-disabled:hover,
#main-inventory-toolbar .unit-picker-chip:disabled:hover {
  transform: none;
}

#main-inventory-toolbar .unit-picker-chip-disabled-wrap {
  display: inline-flex;
}

#main-inventory-toolbar .unit-picker-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  color: #49658e;
  font-size: 11px;
}

#main-inventory-toolbar .unit-picker-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#main-inventory-toolbar .unit-picker-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

#main-inventory-toolbar .unit-picker-legend i.available {
  background: #22a55d;
}

#main-inventory-toolbar .unit-picker-legend i.sold {
  background: #ff4d4f;
}

#main-inventory-toolbar .unit-picker-legend i.hold {
  background: #f2ae2e;
}

#main-inventory-toolbar .unit-picker-grid-scroll {
  min-height: 180px;
  max-height: 222px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 14px 8px;
  scrollbar-width: thin;
  scrollbar-color: #aabbd5 transparent;
}

#main-inventory-toolbar .unit-picker-group + .unit-picker-group {
  margin-top: 10px;
}

#main-inventory-toolbar .unit-picker-group h4 {
  margin: 0 0 6px;
  color: #0f2447;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

#main-inventory-toolbar .unit-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

#main-inventory-toolbar .unit-picker-tile {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 42px;
  padding: 5px 4px;
  border-radius: 9px;
  border: 1px solid #bfd9c8;
  background: #f5fff7;
  color: #176a38;
  font: inherit;
  text-align: center;
}

#main-inventory-toolbar .unit-picker-tile:hover {
  transform: translateY(-1px);
}

#main-inventory-toolbar .unit-picker-tile:focus-visible {
  outline: 2px solid #173b78;
  outline-offset: 1px;
}

#main-inventory-toolbar .unit-picker-tile-main {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

#main-inventory-toolbar .unit-picker-tile-meta {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.1;
}

#main-inventory-toolbar .unit-picker-status-sold {
  border-color: #ffb2b0;
  background: #fff5f5;
  color: #d43636;
}

#main-inventory-toolbar .unit-picker-status-hold {
  border-color: #f4c779;
  background: #fff8ed;
  color: #bd7a00;
}

#main-inventory-toolbar .unit-picker-status-available {
  border-color: #b8dfc3;
  background: #f4fff7;
  color: #176a38;
}

#main-inventory-toolbar .unit-picker-tile.is-current {
  border-color: #173b78;
  background: #173b78;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

#main-inventory-toolbar .unit-picker-tile-check {
  position: absolute;
  right: 7px;
  bottom: 6px;
  font-size: 11px;
  line-height: 1;
}

#main-inventory-toolbar .unit-picker-empty {
  padding: 24px 10px;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

#main-inventory-toolbar .unit-picker-empty .unit-picker-clear-btn {
  margin-top: 10px;
}

#main-inventory-toolbar .unit-picker-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 14px 10px;
  border-top: 1px solid #e5edf7;
  color: #49658e;
  font-size: 11px;
}

#main-inventory-toolbar .unit-picker-foot span {
  flex: 1 1 220px;
  min-width: 0;
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .unit-hero-strip {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .unit-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .unit-overview-reference-layout {
    grid-template-columns: 1fr;
  }

  .unit-overview-side-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unit-overview-actions-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #bookingWizardSharedUnitSelector .header-filters {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .unit-lifecycle-columns {
    grid-template-columns: 1fr;
  }

  .unit-lifecycle-side,
  .unit-workspace-sticky-card {
    position: static;
  }

  .unit-lifecycle-strip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-actions-grid,
  .unit-overview-quick-actions {
    grid-template-columns: repeat(4, minmax(72px, 1fr));
  }

  .unit-current-row-3,
  .unit-current-row-4,
  .unit-status-banner-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unit-status-banner-main {
    grid-column: 1 / -1;
  }

  .unit-status-banner-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #main-inventory-toolbar .unit-picker-popover {
    width: min(500px, calc(100vw - 32px));
  }

  #main-inventory-toolbar .unit-picker-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1320px) {
  .unit-hero-strip {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr) auto;
    gap: 18px;
    padding: 20px 18px;
  }

  .unit-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .unit-overview-reference-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 14px;
  }

  .unit-overview-reference-main,
  .unit-overview-reference-side {
    gap: 14px;
  }

  .unit-overview-actions-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .unit-hero-main {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .unit-hero-icon {
    width: 68px;
    height: 68px;
  }

  .unit-hero-title-row h2 {
    font-size: 28px;
  }

  .unit-hero-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .unit-hero-metric {
    padding: 0;
    border-left: 0;
  }

  .unit-overview-booking-top,
  .unit-overview-base-grid,
  .unit-overview-side-split {
    grid-template-columns: 1fr;
  }

  .unit-overview-booking-meta {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid #edf2f8;
    padding-top: 14px;
  }

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

  .unit-overview-profile-item:nth-child(3n) {
    border-right: 1px solid #edf2f8;
  }

  .unit-overview-profile-item:nth-child(2n) {
    border-right: 0;
  }

  .unit-overview-profile-item:nth-last-child(-n + 3) {
    border-bottom: 1px solid #edf2f8;
  }

  .unit-overview-profile-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .unit-overview-journey-strip,
  .unit-overview-actions-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unit-overview-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "snapshot"
      "customer"
      "lifecycle"
      "financial"
      "history"
      "alerts"
      "actions";
  }

  .quick-actions-grid,
  .unit-overview-quick-actions {
    grid-template-columns: repeat(4, minmax(72px, 1fr));
  }}

@media (max-width: 900px) {
  .unit-hero-strip {
    grid-template-columns: 1fr;
  }

  .unit-hero-actions {
    justify-content: flex-start;
  }

  .unit-lifecycle-strip {
    grid-template-columns: 1fr;
  }

  .unit-lifecycle-strip-head {
    display: grid;
  }

  .unit-lifecycle-strip-actions {
    margin-left: 0;
    justify-content: flex-start;
  }

  .unit-lifecycle-strip-customer {
    border-left: 0;
    border-top: 1px solid #e4eaf2;
    padding: 10px 0 0;
  }

  .unit-lifecycle-strip-grid,
  .unit-workspace-financial-grid,
  .unit-workspace-docs-summary {
    grid-template-columns: 1fr;
  }

  .quick-actions-grid,
  .unit-overview-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unit-overview-actions-row {
    grid-template-columns: 1fr;
  }

  .quick-action-btn,
  .unit-overview-quick-actions .unit-overview-action-tile {
    height: 58px;
    min-height: 58px;
  }

  .unit-current-row-3,
  .unit-current-row-4,
  .unit-current-payment-grid,
  .unit-current-lifecycle,
  .unit-status-banner-info-grid,
  .unit-status-banner-card {
    grid-template-columns: 1fr;
  }

  .unit-current-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .unit-current-snapshot-grid div {
    border-right: 0;
  }}

@media (max-width: 720px) {
  .unit-hero-strip {
    padding: 16px;
  }

  .unit-hero-main {
    grid-template-columns: 1fr;
  }

  .unit-hero-icon {
    width: 56px;
    height: 56px;
  }

  .unit-hero-title-row h2 {
    font-size: 24px;
  }

  .unit-hero-actions .light-btn,
  .unit-hero-menu {
    width: 100%;
  }

  .unit-hero-actions .icon-btn {
    width: 100%;
  }

  .unit-hero-menu-popover {
    left: 0;
    right: auto;
    width: 100%;
  }

  .unit-overview-profile-grid,
  .unit-overview-journey-strip,
  .unit-overview-actions-row {
    grid-template-columns: 1fr;
  }

  .unit-overview-profile-item,
  .unit-overview-profile-item:nth-child(3n) {
    border-right: 0;
  }

  .unit-overview-profile-item:nth-last-child(-n + 2),
  .unit-overview-profile-item:nth-last-child(-n + 3) {
    border-bottom: 1px solid #edf2f8;
  }

  .unit-overview-profile-item:last-child {
    border-bottom: 0;
  }

  .unit-overview-base-actions {
    grid-template-columns: 1fr;
  }
}

.overview-generated-doc-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.overview-generated-doc-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef5ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
}

.overview-generated-doc-icon svg {
  width: 16px;
  height: 16px;
}

.overview-generated-doc-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.overview-generated-doc-copy strong {
  font-size: 13px;
  color: #122033;
}

.overview-generated-doc-copy span,
.overview-generated-doc-meta span {
  font-size: 11px;
  color: #667b8f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.overview-generated-doc-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.overview-generated-doc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.overview-generated-doc-actions button {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11px;
}

.overview-docs-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px dashed #d7e3dc;
  border-radius: 12px;
  background: #fbfcfb;
}

.overview-docs-empty div {
  display: grid;
  gap: 3px;
}

.overview-docs-empty strong {
  font-size: 13px;
  color: #122033;
}

.overview-docs-empty span {
  font-size: 11px;
  color: #667b8f;
}

@media (max-width: 980px) {
  .overview-generated-doc-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .overview-generated-doc-meta,
  .overview-generated-doc-actions {
    justify-items: start;
    justify-content: flex-start;
  }

  .overview-docs-empty,
  .overview-generated-docs-head {
    display: grid;
    justify-content: stretch;
  }}

/* Developer-first header flow */
.project-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.project-switch-inline-btn {
  min-height: 32px;
  min-width: 32px;
  width: 32px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.project-switch-inline-btn.is-hidden {
  display: none;
}

.project-switch-inline-btn .btn-icon {
  margin: 0;
}

.developer-card.active {
  border-color: #2d8b68;
  box-shadow: 0 0 0 1px rgba(45, 139, 104, 0.18);
  background: #f6fbf8;
}

/* Partners workspace */
#main-partners {
  display: none;
  gap: 14px;
}

#main-partners.active {
  display: grid;
}

.partners-hero,
.partners-metric-grid,
.partners-overview-grid,
.partners-lower-card {
  max-width: 1224px;
}

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

.partners-hero h2 {
  margin: 0;
  font-size: 20px;
  color: #122033;
}

.partners-hero p {
  margin: 4px 0 0;
  color: #667b8f;
  font-size: 13px;
}

#partnersInlineError {
  max-width: 1224px;
  margin-bottom: 12px;
}

.partner-share-helper {
  display: grid;
  gap: 4px;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  border: 1px solid #eadfb3;
  background: #fff8e8;
  color: #8a6712;
}

.partner-share-helper strong,
.partner-share-helper span {
  display: block;
}

.partner-share-helper small {
  color: inherit;
}

.partner-share-helper.good {
  background: #ecfbf3;
  border-color: #b9e7cb;
  color: #0f7a45;
}

.partner-share-helper.bad {
  background: #fff1f1;
  border-color: #f2c5c5;
  color: #b42318;
}

#partnerLedgerDialog.developer-editor-dialog {
  --dialog-width: 920px;
}

.partner-ledger-dialog-card {
  width: min(920px, calc(100vw - 36px));
  max-height: min(420px, calc(100vh - 44px));
  overflow: hidden;
}

.partner-ledger-dialog {
  width: 100%;
  max-width: none;
  background: #ffffff;
  padding: 18px 20px 20px;
  gap: 12px;
}

.partner-ledger-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(250px, auto);
  gap: 10px;
  align-items: end;
  width: 100%;
}

.partner-ledger-dialog label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.partner-ledger-dialog label span {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.partner-ledger-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: end;
  width: 100%;
  min-width: 0;
  justify-self: end;
}

.partner-ledger-dialog select,
.partner-ledger-actions-row button {
  min-height: 40px;
}

.partner-ledger-actions-row .ghost-btn,
.partner-ledger-actions-row button {
  white-space: nowrap;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .partner-ledger-dialog {
    width: min(96vw, 680px);
  }

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

  .partner-ledger-actions-row {
    grid-column: 1 / -1;
    justify-content: stretch;
    flex-wrap: wrap;
  }}

@media (max-width: 640px) {
  .partner-ledger-row {
    grid-template-columns: 1fr;
  }

  .partner-ledger-actions-row {
    flex-direction: column;
  }

  .partner-ledger-actions-row .ghost-btn,
  .partner-ledger-actions-row button {
    width: 100%;
  }}

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

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

.partner-kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
}

.partner-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #eef5ff;
  color: #2f6de0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
}

.partner-kpi-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.partner-kpi-copy {
  display: grid;
  gap: 4px;
}

.partner-kpi-copy span {
  font-size: 13px;
  color: #607485;
}

.partner-kpi-copy strong {
  font-size: 18px;
  color: #122033;
}

.partner-kpi-copy strong.good,
.partners-table .good,
.partner-detail-kpis .good,
.partner-mini-table .good,
.data-table .good {
  color: #118a57;
}

.partner-kpi-copy strong.bad,
.partners-table .bad,
.partner-detail-kpis .bad,
.partner-mini-table .bad,
.data-table .bad {
  color: #d13d3d;
}

.partners-summary-card,
.partners-history-card {
  overflow: hidden;
}

.partners-entry-grid {
  max-width: 1224px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.partners-entry-card .panel-head p,
.partners-history-card .panel-head p,
.partners-summary-card .panel-head p {
  margin: 4px 0 0;
  color: #667b8f;
  font-size: 12px;
}

.compact-toolbar {
  gap: 8px;
  flex-wrap: wrap;
}

.partners-entry-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 12px;
}

.partners-capital-call-form {
  grid-template-columns: minmax(140px, 0.9fr) minmax(160px, 1fr) minmax(0, 1.65fr);
}

.partners-deposit-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.partners-deposit-form .partners-entry-wide {
  grid-column: span 2;
}

.partners-entry-form label {
  display: grid;
  gap: 4px;
}

.partners-entry-form label span {
  color: #667b8f;
  font-size: 11px;
  font-weight: 700;
}

.amount-input {
  text-align: right;
}

.display-settings-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dbe7f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.display-settings-card h3 {
  margin: 0;
  font-size: 18px;
  color: #0f172a;
}

.display-settings-card p {
  margin: 6px 0 0;
  color: #667b8f;
  font-size: 13px;
}

.display-settings-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.display-settings-form label {
  display: grid;
  gap: 4px;
}

.display-settings-form label span {
  color: #667b8f;
  font-size: 11px;
  font-weight: 700;
}

.display-settings-actions {
  display: flex;
  justify-content: flex-start;
}

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

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

.tally-settings-head .status-chip {
  margin-top: 2px;
}

.tally-toggle-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tally-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
}

.tally-settings-card .display-settings-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tally-settings-card .display-settings-actions {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tally-preview-shell {
  width: 100%;
}

.tally-preview-shell .members-page-head,
.tally-preview-shell .display-settings-card,
.tally-preview-shell .members-table-card,
.tally-preview-shell .table-wrap,
.tally-preview-shell .tally-preview-table-wrap {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.tally-preview-head-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.tally-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(280px, 340px);
  gap: 12px;
  align-items: end;
}

.tally-filter-grid label {
  display: grid;
  gap: 4px;
  align-self: end;
  margin: 0;
}

.tally-filter-grid label span {
  color: #667b8f;
  font-size: 11px;
  font-weight: 700;
}

.tally-filter-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  align-self: end;
  padding-top: 0;
}

.tally-filter-checks {
  display: grid;
  gap: 8px;
  align-content: start;
}

.tally-filter-buttons {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 112px;
}

.tally-filter-buttons .small-btn {
  width: 100%;
}

.tally-filter-grid .inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.tally-filter-grid .inline-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
}

.tally-preview-table-wrap {
  overflow-x: auto;
}

.tally-preview-table {
  width: 100%;
  table-layout: fixed;
}

.tally-preview-table th,
.tally-preview-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 12px;
  padding: 8px 6px;
  vertical-align: middle;
}

.tally-preview-table thead th {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.tally-flow-cell {
  font-weight: 600;
  color: #10284f;
}

.tally-preview-table th:nth-child(9),
.tally-preview-table td:nth-child(9),
.tally-preview-table th:nth-child(10),
.tally-preview-table td:nth-child(10) {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: center;
}

.tally-preview-table td:nth-child(9) .status-badge {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  padding: 5px 8px;
  min-width: 110px;
}

.tally-preview-table th:nth-child(10),
.tally-preview-table td:nth-child(10) {
  min-width: 128px;
  max-width: 180px;
}

.tally-error-cell {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.tally-mapping-table-wrap {
  overflow-x: auto;
}

.tally-mapping-table {
  width: 100%;
  table-layout: fixed;
}

.tally-map-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 8px;
}

.tally-map-edit-row input,
.tally-map-edit-row select {
  min-height: 34px;
  font-size: 12px;
}

.tally-map-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-subtext {
  margin-top: 3px;
  color: #7386a0;
  font-size: 11px;
}

.inline-success {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #b8e1c7;
  background: #eefbf3;
  color: #146c43;
  font-size: 13px;
}

.inline-error {
  margin-top: 6px;
  color: #c43d36;
  font-size: 12px;
  line-height: 1.4;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.partners-entry-wide {
  grid-column: span 2;
}

.partners-entry-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 16px 16px;
}

.partners-entry-actions .booking-warning {
  margin: 0;
  flex: 1;
}

.partners-entry-actions .inline-success {
  margin: 0;
  flex: 1;
}

.partners-table .text-link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: #122033;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.partners-table .active-row {
  background: #f7fbf9;
}

.table-total-row td {
  font-weight: 700;
  background: #fbfcfd;
}

.table-warning-row td {
  background: #fff8e8;
}

.partner-detail-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.partner-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(180deg, #2d8b68 0%, #247256 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}

.partner-detail-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.partner-detail-copy strong {
  font-size: 18px;
  color: #122033;
}

.partner-detail-copy span {
  color: #627587;
  font-size: 12px;
}

.partner-detail-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.partner-detail-kpis article,
.partner-year-end-kpis article {
  border: 1px solid #e4ebf3;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fbfdff;
  display: grid;
  gap: 4px;
}

.partner-detail-kpis span,
.partner-year-end-kpis span {
  font-size: 11px;
  color: #667b8f;
}

.partner-detail-kpis strong,
.partner-year-end-kpis strong {
  font-size: 15px;
  color: #122033;
}

.partner-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .partners-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .partners-entry-grid,
  .partners-entry-form {
    grid-template-columns: 1fr;
  }

  .partners-entry-wide {
    grid-column: auto;
  }}

@media (max-width: 760px) {
  .partners-hero,
  .partners-toolbar,
  .partners-entry-actions {
    display: grid;
  }

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

.profile-logout-btn {
  border: 1px solid #d6e0db;
  background: #fff;
  color: #24423c;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
}

.users-admin-tabs {
  margin: 0 0 12px;
}

.users-admin-panels {
  display: grid;
  gap: 12px;
}

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

.auth-tab-panel.active {
  display: block;
}

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

.table-action-btn {
  border: 1px solid #d6e0db;
  background: #fff;
  color: #1f3f38;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}

.table-action-btn.danger {
  color: #b42318;
  border-color: #f3c7c3;
}

.empty-cell {
  text-align: center;
  color: #64748b;
  padding: 20px 12px;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d9e4df;
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
}

.user-mgmt-shell {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
  max-width: none;
}

#main-users,
#userManagementRoot,
#userManagementRoot > .users-shell,
#userManagementRoot > .user-mgmt-shell,
.users-page,
.user-management,
.table-card,
.table-wrapper,
.data-table-container {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.user-mgmt-header {
  align-items: start;
}

.user-mgmt-header .user-mgmt-head-badges {
  display: none;
}

.user-mgmt-head-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #10284f;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #d9e5f6;
}

.user-mgmt-head-badge.subtle {
  background: #fffdf4;
  color: #8a6116;
  border-color: #f3e3b4;
}

.user-mgmt-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.user-mgmt-kpi-card {
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.user-mgmt-kpi-card span {
  color: #6a7d92;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.user-mgmt-kpi-card strong {
  color: #10284f;
  font-size: 22px;
  line-height: 1;
}

.user-mgmt-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) 220px 180px auto;
  gap: 12px;
  align-items: center;
}

.user-mgmt-toolbar > * {
  margin: 0;
}

.user-mgmt-search input {
  width: 100%;
}

.user-mgmt-toolbar-actions {
  display: flex;
  justify-content: flex-end;
}

.user-mgmt-tabbar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.user-mgmt-tab-btn {
  border: 1px solid #d8e1ec;
  background: #fff;
  color: #415a77;
  border-radius: 999px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.user-mgmt-tab-btn.active {
  background: #10284f;
  color: #fff;
  border-color: #10284f;
}

.user-mgmt-tab-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.user-mgmt-panel-card {
  padding: 14px 16px;
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: none;
  overflow: hidden;
}

.user-mgmt-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.user-mgmt-panel-head h3 {
  margin: 0;
}

.user-mgmt-panel-head p {
  margin: 4px 0 0;
  color: #667b8f;
  font-size: 12px;
}

.user-mgmt-table-wrap {
  overflow-x: auto;
  width: 100%;
  min-width: 0;
  max-width: none;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #b8c6d9 #eef3f8;
}

.user-mgmt-table-wrap::-webkit-scrollbar {
  height: 9px;
}

.user-mgmt-table-wrap::-webkit-scrollbar-track {
  background: #eef3f8;
  border-radius: 999px;
}

.user-mgmt-table-wrap::-webkit-scrollbar-thumb {
  background: #b8c6d9;
  border-radius: 999px;
}

.user-mgmt-table {
  width: 100%;
  min-width: 100%;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
}

.user-mgmt-users-table {
  table-layout: fixed;
}

.user-mgmt-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f7f9fc;
  white-space: nowrap;
}

.user-mgmt-table th,
.user-mgmt-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.user-mgmt-users-table .user-mgmt-col-name { width: 18%; }
.user-mgmt-users-table .user-mgmt-col-email { width: 24%; }
.user-mgmt-users-table .user-mgmt-col-role { width: 13%; }
.user-mgmt-users-table .user-mgmt-col-status { width: 8%; }
.user-mgmt-users-table .user-mgmt-col-developer { width: 11%; }
.user-mgmt-users-table .user-mgmt-col-project { width: 11%; }
.user-mgmt-users-table .user-mgmt-col-login { width: 8%; }
.user-mgmt-users-table .user-mgmt-col-actions { width: 60px; }

.user-mgmt-users-table th,
.user-mgmt-users-table td {
  min-width: 0;
  width: auto;
}

.user-mgmt-users-table th:nth-child(1),
.user-mgmt-users-table td:nth-child(1) { width: 18%; }

.user-mgmt-users-table th:nth-child(2),
.user-mgmt-users-table td:nth-child(2) { width: 24%; }

.user-mgmt-users-table th:nth-child(3),
.user-mgmt-users-table td:nth-child(3) { width: 13%; }

.user-mgmt-users-table th:nth-child(4),
.user-mgmt-users-table td:nth-child(4) { width: 8%; }

.user-mgmt-users-table th:nth-child(5),
.user-mgmt-users-table td:nth-child(5) { width: 11%; }

.user-mgmt-users-table th:nth-child(6),
.user-mgmt-users-table td:nth-child(6) { width: 11%; }

.user-mgmt-users-table th:nth-child(7),
.user-mgmt-users-table td:nth-child(7) { width: 8%; }

.user-mgmt-users-table th:nth-child(8),
.user-mgmt-users-table td:nth-child(8) {
  width: 60px;
  max-width: 64px;
  min-width: 56px;
  white-space: nowrap;
}

.user-mgmt-table th:first-child,
.user-mgmt-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 10px 0 14px -14px rgba(16, 40, 79, 0.2);
}

.user-mgmt-table thead th:first-child {
  z-index: 4;
  background: #f7f9fc;
}

.user-mgmt-table td:nth-child(2) {
  overflow-wrap: anywhere;
}

.user-mgmt-users-table td:nth-child(2) {
  overflow-wrap: normal;
}

.user-mgmt-table th:nth-child(4),
.user-mgmt-table td:nth-child(4),
.user-mgmt-table th:nth-child(5),
.user-mgmt-table td:nth-child(5),
.user-mgmt-table th:nth-child(6),
.user-mgmt-table td:nth-child(6),
.user-mgmt-table th:nth-child(7),
.user-mgmt-table td:nth-child(7) {
  text-align: center;
}

.user-mgmt-users-table th:nth-child(8),
.user-mgmt-users-table td:nth-child(8) {
  text-align: center;
}

.user-mgmt-table .status-badge,
.user-mgmt-table .user-mgmt-scope-pill {
  vertical-align: middle;
}

.user-mgmt-users-table th:nth-child(8) {
  padding-left: 6px;
  padding-right: 6px;
}

.user-mgmt-users-table td:nth-child(8) {
  padding-left: 4px;
  padding-right: 4px;
}

.user-mgmt-users-table .table-actions.compact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
  min-height: 34px;
}

.user-mgmt-table .table-action-btn {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 12px;
}

.user-mgmt-table tbody tr:hover td {
  background: #f8fbff;
}

.user-mgmt-table tbody tr:hover td:first-child,
.user-mgmt-table .active-row td,
.user-mgmt-table .active-row td:first-child {
  background: #f4f8ff;
}

.user-mgmt-last-login {
  display: grid;
  gap: 2px;
  justify-items: center;
}

.user-mgmt-last-login strong,
.user-mgmt-last-login span {
  display: block;
  white-space: nowrap;
}

.user-mgmt-last-login strong {
  font-size: 12px;
  color: #10284f;
}

.user-mgmt-last-login span {
  font-size: 11px;
  color: #6e8097;
}

.user-mgmt-primary-text,
.user-mgmt-cell-ellipsis {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-mgmt-primary-text {
  font-size: 13px;
}

.user-mgmt-cell-ellipsis.is-email,
.user-mgmt-cell-ellipsis.is-role {
  width: 100%;
}

.user-mgmt-table .table-action-btn.icon-only,
.user-mgmt-row-menu-toggle {
  min-width: 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  margin: 0 auto;
  background: #fff;
}

.user-mgmt-row-menu-portal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
}

.user-mgmt-row-menu-list {
  position: fixed;
  min-width: 160px;
  max-width: min(220px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dce5f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 32px rgba(16, 40, 79, 0.16);
  display: grid;
  gap: 4px;
  z-index: 9999;
}

.user-mgmt-users-table .table-subtext {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-mgmt-users-table .status-badge,
.user-mgmt-users-table .user-mgmt-scope-pill {
  margin-inline: auto;
}

.user-mgmt-row-menu-item {
  border: 0;
  background: transparent;
  color: #183153;
  border-radius: 8px;
  min-height: 34px;
  padding: 0 10px;
  text-align: left;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.user-mgmt-row-menu-item:hover {
  background: #f5f8fc;
  color: #183153;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.user-mgmt-row-menu-item.danger {
  color: #b42318;
}

.user-mgmt-row-menu-item.danger:hover {
  background: #fff1ef;
  color: #b42318;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.user-mgmt-scope-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: #f6f9fc;
  color: #27405f;
  border: 1px solid #dde7f1;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.user-mgmt-scope-pill.is-all {
  background: #eef4ff;
  color: #10284f;
  border-color: #d9e5f6;
}

.user-mgmt-row {
  cursor: pointer;
}

.user-mgmt-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #627587;
  font-size: 12px;
}

.user-mgmt-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-mgmt-page-indicator {
  min-width: 52px;
  text-align: center;
  color: #10284f;
  font-weight: 700;
}

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

.user-mgmt-json-preview {
  max-width: 420px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #55687c;
  font-size: 12px;
}

.user-management-drawer-dialog {
  --dialog-width: 1100px;
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  min-width: 0;
  height: 100vh;
  max-height: none;
  border: 0;
  margin: 0;
  padding: 24px;
  box-sizing: border-box;
  background: transparent;
  outline: none;
  box-shadow: none;
  overflow: hidden;
  display: none;
  justify-content: center;
  align-items: center;
  align-content: center;
  justify-items: center;
}

.user-management-drawer-dialog[open] {
  display: flex;
}

.user-management-drawer-dialog:focus,
.user-management-drawer-dialog:focus-visible {
  outline: none;
  box-shadow: none;
}

.user-management-drawer-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
}

.user-mgmt-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid #e4ebf3;
}

.user-mgmt-drawer-head h3 {
  margin: 0;
}

.user-mgmt-drawer-head p {
  margin: 4px 0 0;
  color: #667b8f;
  font-size: 11px;
}

.user-mgmt-drawer-close {
  position: static;
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.user-mgmt-drawer-body {
  overflow: auto;
  padding: 10px 16px 12px;
  display: grid;
  gap: 8px;
}

.user-mgmt-tab-panel {
  display: none;
}

.user-mgmt-tab-panel.active {
  display: grid;
  gap: 8px;
}

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

.user-mgmt-form-grid-compact-create {
  align-items: start;
}

.user-mgmt-form-section {
  display: grid;
  gap: 6px;
}

.user-mgmt-form-section-head h4 {
  margin: 0;
  color: #10284f;
  font-size: 12px;
}

.user-mgmt-form-grid .field-block {
  margin: 0;
}

.user-mgmt-drawer-body .field-block > span {
  font-size: 10px;
  margin-bottom: 3px;
}

.user-mgmt-drawer-body .field-block input,
.user-mgmt-drawer-body .field-block select,
.user-mgmt-drawer-body .field-block textarea {
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 13px;
}

.user-mgmt-form-grid .field-block.has-error input,
.user-mgmt-form-grid .field-block.has-error select,
.user-mgmt-access-card.has-error {
  border-color: #e97b75;
  box-shadow: 0 0 0 1px rgba(201, 70, 61, 0.12);
}

.user-mgmt-drawer-meta-grid,
.user-mgmt-permission-scope-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.user-mgmt-drawer-meta-grid article,
.user-mgmt-preview-card {
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fbfdff;
  display: grid;
  gap: 6px;
}

.user-mgmt-drawer-meta-grid span,
.user-mgmt-preview-card span {
  font-size: 11px;
  color: #6a7d92;
  font-weight: 700;
}

.user-mgmt-drawer-meta-grid strong {
  font-size: 14px;
  color: #10284f;
}

.user-mgmt-inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.user-mgmt-access-grid,
.user-mgmt-permission-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.user-mgmt-access-card {
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
}

.user-mgmt-access-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.user-mgmt-access-card-head h4,
.user-mgmt-preview-card h4 {
  margin: 0;
}

.user-mgmt-access-card-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #667b8f;
}

.user-mgmt-access-card-head input {
  width: 220px;
  min-width: 180px;
}

.user-mgmt-choice-grid,
.user-mgmt-permission-chip-grid,
.user-mgmt-chip-stack {
  display: grid;
  gap: 8px;
}

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

.user-mgmt-permission-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.user-mgmt-choice-card {
  display: flex;
  align-items: start;
  gap: 10px;
  border: 1px solid #dfe8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.user-mgmt-choice-card.disabled {
  background: #f7f9fc;
  border-color: #dbe5ef;
  cursor: not-allowed;
}

.user-mgmt-choice-card input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
}

.user-mgmt-choice-card.disabled input {
  pointer-events: none;
}

.user-mgmt-choice-card strong {
  display: block;
  color: #10284f;
}

.user-mgmt-choice-card span {
  display: block;
  margin-top: 3px;
  color: #667b8f;
  font-size: 12px;
}

.user-mgmt-choice-lock-note {
  color: #315b8d;
  font-weight: 700;
}

.user-mgmt-preview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-mgmt-permission-group {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #eef3f7;
}

.user-mgmt-permission-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.user-mgmt-permission-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.user-mgmt-permission-group-head strong {
  color: #10284f;
}

.user-mgmt-permission-chip-grid,
.user-mgmt-chip-stack {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.user-mgmt-permission-chip,
.user-mgmt-scope-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #10284f;
  border: 1px solid #dce6f2;
  font-size: 12px;
  font-weight: 700;
}

.user-mgmt-session-table-wrap {
  overflow-x: auto;
}

.user-mgmt-session-table th:nth-child(1) { min-width: 140px; }
.user-mgmt-session-table th:nth-child(2) { min-width: 140px; }
.user-mgmt-session-table th:nth-child(3) { min-width: 260px; }
.user-mgmt-session-table th:nth-child(4) { min-width: 120px; }
.user-mgmt-session-table th:nth-child(5) { min-width: 90px; }
.user-mgmt-session-table th:nth-child(6) { min-width: 110px; }

.user-mgmt-empty-state {
  border: 1px dashed #d9e5f3;
  border-radius: 14px;
  padding: 22px 16px;
  background: #fbfdff;
  display: grid;
  gap: 6px;
  text-align: center;
  color: #667b8f;
}

.user-mgmt-empty-state strong {
  color: #10284f;
}

.user-mgmt-empty-state.compact {
  padding: 14px 12px;
}

.user-mgmt-drawer-actions {
  padding: 8px 16px 10px;
  border-top: 1px solid #e4ebf3;
}

.user-mgmt-role-toolbar {
  margin-bottom: 14px;
}

.user-mgmt-table td.table-actions.compact-actions {
  justify-content: center;
}

.user-mgmt-role-action-btn {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 11px;
}

.user-mgmt-role-action-btn.is-navy {
  border-color: #c9d8ee;
  color: #10284f;
  background: #f8fbff;
}

.user-mgmt-role-action-btn.is-danger {
  border-color: #f0c8c4;
  color: #b42318;
  background: #fff6f5;
}

.user-mgmt-role-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(16, 40, 79, 0.08);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.user-mgmt-role-action-btn.is-danger .user-mgmt-role-action-icon {
  background: rgba(180, 35, 24, 0.08);
}

.user-mgmt-role-delete-dialog {
  max-width: 520px;
}

.user-mgmt-role-delete-summary {
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  padding: 16px;
  background: #fbfdff;
  display: grid;
  gap: 8px;
}

.user-mgmt-role-delete-summary span {
  color: #6a7d92;
  font-size: 12px;
  font-weight: 700;
}

.user-mgmt-role-delete-summary strong {
  color: #10284f;
  font-size: 18px;
}

.user-mgmt-role-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.user-mgmt-role-step {
  border: 1px solid #dfe8f0;
  border-radius: 16px;
  background: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #3c516b;
}

.user-mgmt-role-step:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.user-mgmt-role-step.active {
  border-color: #cadbf3;
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px #eef4ff;
}

.user-mgmt-role-step.completed {
  border-color: #d7e9de;
  background: #fbfffd;
}

.user-mgmt-role-step-index {
  min-width: 42px;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid #d6e1ed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #10284f;
  background: #fff;
}

.user-mgmt-role-step.active .user-mgmt-role-step-index {
  background: #10284f;
  border-color: #10284f;
  color: #fff;
}

.user-mgmt-role-step.completed .user-mgmt-role-step-index {
  background: #e7f5ec;
  border-color: #9ed1b1;
  color: #1f7a4a;
}

.user-mgmt-role-step-copy {
  display: grid;
  gap: 2px;
}

.user-mgmt-role-step-copy strong {
  color: #10284f;
  font-size: 15px;
}

.user-mgmt-role-step-copy small {
  color: #667b8f;
  font-size: 12px;
}

.user-mgmt-role-stage-card {
  border: 1px solid #e4ebf3;
  border-radius: 18px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 16px;
}

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

.user-mgmt-role-info-grid {
  align-items: start;
}

.user-mgmt-role-description {
  grid-column: span 1;
}

.user-mgmt-role-description textarea {
  min-height: 74px;
  resize: vertical;
}

.user-mgmt-help-text {
  color: #667b8f;
  font-size: 12px;
}

.user-mgmt-role-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.user-mgmt-role-summary-card,
.user-mgmt-role-review-card {
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 14px 16px;
  display: grid;
  gap: 5px;
}

.user-mgmt-role-summary-card span,
.user-mgmt-role-review-card span {
  color: #667b8f;
  font-size: 12px;
  font-weight: 700;
}

.user-mgmt-role-summary-card strong,
.user-mgmt-role-review-card strong {
  color: #10284f;
  font-size: 18px;
}

.user-mgmt-role-summary-card small {
  color: #7b8ea2;
  font-size: 12px;
}

.user-mgmt-role-status-line {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.user-mgmt-role-builder {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 16px;
  min-height: 430px;
}

.user-mgmt-role-builder-left,
.user-mgmt-role-builder-right {
  min-width: 0;
}

.user-mgmt-role-builder-left-head {
  display: grid;
  gap: 10px;
}

.user-mgmt-role-builder-left-head h4 {
  margin: 0;
  color: #10284f;
}

.user-mgmt-role-builder-left-head input,
.user-mgmt-role-module-panel-actions input {
  min-height: 40px;
}

.user-mgmt-role-module-list {
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: #fbfdff;
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.user-mgmt-role-module-btn {
  border: 1px solid #dfe8f0;
  border-radius: 12px;
  background: #fff;
  min-height: 48px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #30455f;
  font-weight: 700;
  text-align: left;
}

.user-mgmt-role-module-btn strong {
  color: #10284f;
}

.user-mgmt-role-module-btn span {
  color: #6a7d92;
  font-size: 12px;
  white-space: nowrap;
}

.user-mgmt-role-module-btn.active {
  background: #eef4ff;
  border-color: #cadbf3;
  box-shadow: inset 3px 0 0 #10284f;
}

.user-mgmt-role-module-panel {
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 100%;
}

.user-mgmt-role-module-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.user-mgmt-role-module-panel-head h5 {
  margin: 0;
  color: #10284f;
  font-size: 16px;
}

.user-mgmt-role-module-panel-head h5 small {
  color: #667b8f;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}

.user-mgmt-role-module-panel-head p {
  margin: 4px 0 0;
  color: #667b8f;
  font-size: 12px;
}

.user-mgmt-role-module-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.user-mgmt-role-permission-grid-wrap {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

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

.user-mgmt-role-permission-card {
  display: flex;
  align-items: start;
  gap: 10px;
  border: 1px solid #dfe8f0;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
}

.user-mgmt-role-permission-card.selected {
  background: #f8fbff;
  border-color: #cadbf3;
}

.user-mgmt-role-permission-card.disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.user-mgmt-role-permission-card input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
}

.user-mgmt-role-permission-card strong {
  display: block;
  color: #10284f;
}

.user-mgmt-role-permission-card span {
  display: block;
  margin-top: 4px;
  color: #667b8f;
  font-size: 12px;
  word-break: break-word;
}

.user-mgmt-role-dependency-note {
  border: 1px solid #dce7fa;
  border-radius: 14px;
  background: #f5f9ff;
  color: #46617f;
  padding: 12px 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

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

.user-mgmt-role-review-panel {
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: #fbfdff;
  padding: 16px;
}

.user-mgmt-role-review-panel h4 {
  margin: 0 0 10px;
  color: #10284f;
}

.user-mgmt-role-review-panel p {
  margin: 0;
  color: #46617f;
}

.user-mgmt-role-review-groups {
  display: grid;
  gap: 10px;
}

.user-mgmt-role-review-group {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid #e4ebf3;
}

.user-mgmt-role-review-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.user-mgmt-role-review-group strong {
  color: #10284f;
}

.user-mgmt-role-review-group span {
  color: #667b8f;
  font-size: 13px;
}

.user-mgmt-role-view-block {
  display: grid;
  gap: 18px;
}

.user-mgmt-role-view-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.user-mgmt-role-view-field {
  display: grid;
  gap: 8px;
  padding: 4px 0;
}

.user-mgmt-role-view-field span,
.user-mgmt-role-view-description-card span,
.user-mgmt-role-view-review-card span,
.user-mgmt-role-view-metric-card span {
  font-size: 12px;
  font-weight: 700;
  color: #6b7f96;
}

.user-mgmt-role-view-field strong,
.user-mgmt-role-view-review-card strong,
.user-mgmt-role-view-metric-card strong {
  color: #10284f;
  font-size: 15px;
}

.user-mgmt-role-view-field p,
.user-mgmt-role-view-description-card p {
  margin: 0;
  color: #304a67;
  line-height: 1.5;
}

.user-mgmt-role-view-field-wide {
  border: 1px solid #e4ebf3;
  border-radius: 14px;
  background: #f9fbff;
  padding: 12px 14px;
}

.user-mgmt-role-view-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.user-mgmt-role-view-metric-card {
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: #fff;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.user-mgmt-role-view-metric-card small {
  display: block;
  margin-top: 4px;
  color: #6f8297;
  font-size: 12px;
}

.user-mgmt-role-view-metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef4ff;
  color: #1e56d6;
  font-size: 13px;
  font-weight: 800;
}

.user-mgmt-role-view-inline-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1e56d6;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.user-mgmt-role-view-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-mgmt-role-view-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-mgmt-role-view-table-head h4 {
  margin: 0;
  color: #10284f;
}

.user-mgmt-role-view-table-head p {
  margin: 4px 0 0;
  color: #667b8f;
  font-size: 12px;
}

.user-mgmt-role-view-table-wrap {
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  overflow: hidden;
}

.user-mgmt-role-view-table {
  width: 100%;
  border-collapse: collapse;
}

.user-mgmt-role-view-table th,
.user-mgmt-role-view-table td {
  padding: 12px 14px;
  vertical-align: top;
}

.user-mgmt-role-view-table th {
  background: #f7f9fc;
  color: #60748c;
  font-size: 12px;
}

.user-mgmt-role-view-action-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.user-mgmt-role-view-action-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 8px;
  background: #f4f7fb;
  color: #38506b;
  font-size: 11px;
  font-weight: 700;
}

.user-mgmt-role-view-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.user-mgmt-role-view-review-card {
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: #fff;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.user-mgmt-role-view-description-card {
  border: 1px solid #e4ebf3;
  border-radius: 16px;
  background: #fbfdff;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.user-mgmt-role-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 2;
}

.user-mgmt-role-actions-right {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.user-mgmt-matrix-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
}

.user-mgmt-matrix-checkbox.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.user-mgmt-matrix-empty {
  color: var(--muted);
}

.user-mgmt-audit-toolbar {
  grid-template-columns: repeat(4, minmax(0, 220px));
}

.user-mgmt-activity-table th:nth-child(1) { min-width: 150px; }
.user-mgmt-activity-table th:nth-child(2) { min-width: 140px; }
.user-mgmt-activity-table th:nth-child(3) { min-width: 180px; }
.user-mgmt-activity-table th:nth-child(4) { min-width: 120px; }
.user-mgmt-activity-table th:nth-child(5) { min-width: 120px; }
.user-mgmt-activity-table th:nth-child(6) { min-width: 100px; }
.user-mgmt-approval-composer {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #d9e2ef;
  border-radius: 16px;
  background: #f9fbff;
}
.user-mgmt-approval-grid,
.user-mgmt-approval-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.user-mgmt-approval-grid label,
.user-mgmt-approval-field {
  display: grid;
  gap: 6px;
}
.user-mgmt-approval-grid label span,
.user-mgmt-approval-field span {
  font-size: 12px;
  font-weight: 700;
  color: #5f738f;
}
.user-mgmt-approval-field {
  margin-top: 12px;
}
.user-mgmt-approval-field textarea,
.user-mgmt-approval-grid input,
.user-mgmt-approval-grid select {
  width: 100%;
}
.user-mgmt-approval-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.user-mgmt-approval-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.user-mgmt-approval-table-wrap {
  max-height: 560px;
}
.user-mgmt-approval-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.user-mgmt-approval-detail-head h4 {
  margin: 0;
  font-size: 20px;
  color: #11284f;
}
.user-mgmt-approval-detail-head p {
  margin: 6px 0 0;
  color: #5f738f;
}
.user-mgmt-approval-detail-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: #5f738f;
  font-size: 12px;
  font-weight: 700;
}
.user-mgmt-approval-summary-grid article,
.user-mgmt-approval-step {
  border: 1px solid #d9e2ef;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fdfefe;
}
.user-mgmt-approval-summary-grid article {
  display: grid;
  gap: 5px;
}
.user-mgmt-approval-summary-grid article span {
  font-size: 12px;
  color: #5f738f;
  font-weight: 700;
}
.user-mgmt-approval-summary-grid article strong {
  color: #11284f;
}
.user-mgmt-approval-step-list {
  display: grid;
  gap: 10px;
}
.user-mgmt-approval-step {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.user-mgmt-approval-step div {
  display: grid;
  gap: 4px;
}
.user-mgmt-approval-step span {
  font-size: 12px;
  color: #5f738f;
}
.user-mgmt-approval-timeline {
  display: grid;
  gap: 12px;
}
.user-mgmt-approval-timeline-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.user-mgmt-approval-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #16315c;
  margin-top: 6px;
}
.user-mgmt-approval-timeline-item strong {
  display: block;
  color: #11284f;
}
.user-mgmt-approval-timeline-item span {
  display: block;
  font-size: 12px;
  color: #5f738f;
  margin-top: 3px;
}
.user-mgmt-approval-timeline-item p {
  margin: 6px 0 0;
  color: #32496f;
}

.drawer-nav-btn[data-nav-target="users"].active {
  background: #f2f7fd;
  color: #133c67;
  box-shadow: inset 3px 0 0 #133c67;
}

@media (max-width: 1180px) {
  .user-mgmt-kpi-row,
  .user-mgmt-toolbar,
  .user-mgmt-two-panel-grid,
  .user-mgmt-access-grid,
  .user-mgmt-permission-preview-grid,
  .user-mgmt-permission-scope-grid,
  .user-mgmt-drawer-meta-grid,
  .user-mgmt-form-grid,
  .user-mgmt-role-form-grid,
  .user-mgmt-role-stepper,
  .user-mgmt-role-summary-cards,
  .user-mgmt-role-review-grid,
  .user-mgmt-choice-grid,
  .user-mgmt-permission-choice-grid,
  .user-mgmt-role-builder,
  .user-mgmt-role-permission-grid,
  .user-mgmt-audit-toolbar,
  .user-mgmt-approval-grid,
  .user-mgmt-approval-summary-grid,
  .user-mgmt-approval-layout {
    grid-template-columns: 1fr;
  }

  .user-mgmt-access-card-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .user-mgmt-access-card-head input {
    width: 100%;
    min-width: 0;
  }

  .user-mgmt-toolbar-actions {
    justify-content: flex-start;
  }

  .user-mgmt-role-module-panel-head,
  .user-mgmt-role-module-panel-actions,
  .user-mgmt-role-actions-right {
    justify-content: flex-start;
  }

  .user-mgmt-role-description {
    grid-column: 1 / -1;
  }}

.sidebar {
  background: rgba(255, 255, 255, 0.98);
}

.topbar,
.portal-header,
.header-shell,
.page-toolbar,
.workspace-toolbar {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line);
}

.brand strong,
.topbar h1,
.section-head h2,
.pane-title strong,
.page-title,
.dashboard-title,
.card-title,
.summary-title,
.workspace h2,
.workspace h3,
.workspace h4,
.developer-manage-shell h2,
.developer-manage-shell h3 {
  color: var(--navy);
}

.eyebrow,
.accent-text,
.gold-text,
.highlight-text,
.money-highlight,
.summary-gold,
.primary-accent {
  color: var(--gold) !important;
}

.tab.active,
.nav-item.active,
.sidebar-nav button.active,
.rail-nav button.active,
.menu-item.active,
.section-tab.active,
.auth-subtab.active,
.pill-tab.active {
  background: var(--navy-wash) !important;
  color: var(--navy) !important;
  border-color: rgba(20, 35, 61, 0.12) !important;
  box-shadow: inset 3px 0 0 var(--navy);
}

.tab:hover,
.nav-item:hover,
.sidebar-nav button:hover,
.rail-nav button:hover,
.menu-item:hover,
.section-tab:hover,
.auth-subtab:hover,
.pill-tab:hover {
  background: #f8fbff;
  color: var(--navy);
}

.section-label,
.nav-group-label,
.menu-group-title,
.drawer-group-title {
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stat-tile,
.summary-box,
.metric-card,
.kpi-card,
.top-stat-card,
.status-summary-card,
.payment-summary-card,
.partner-metric-card,
.document-summary-row,
.member-compact-card {
  background: #fff;
  border-color: var(--line);
}

.stat-tile strong,
.summary-box strong,
.metric-value,
.amount-value,
.kpi-value,
.money-value,
.top-stat-card strong,
.payment-summary-card strong,
.partner-metric-value {
  color: var(--navy);
}

.summary-box,
.summary-box:nth-child(1),
.summary-box:nth-child(2),
.summary-box:nth-child(3),
.summary-box:nth-child(4) {
  border-top-color: var(--gold);
}

.status-card-action,
.status-card-action button,
.mini-action,
.icon-action {
  color: var(--navy);
}

.project-doc-config-top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 16px;
  margin-bottom: 16px;
}

.project-doc-config-card {
  padding: 18px;
  border: 1px solid #e3e9f2;
  box-shadow: 0 10px 28px rgba(14, 30, 64, 0.05);
}

.project-doc-config-card-head,
.project-doc-config-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.booking-wizard-modal {
  width: min(1320px, calc(100vw - 48px));
  max-width: 1320px;
  border: 0;
  padding: 0;
  background: transparent;
}

.booking-wizard-modal::backdrop {
  background: rgba(20, 35, 61, 0.46);
  backdrop-filter: blur(4px);
}

.booking-wizard-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  max-height: min(92vh, calc(100vh - 32px));
  min-height: min(82vh, 900px);
  background: #fff;
  border: 1px solid #dde6f2;
  border-radius: 24px;
  box-shadow: 0 34px 76px rgba(17, 30, 64, 0.18);
  overflow: hidden;
}

.booking-wizard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #e8eef7;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.booking-wizard-head h2,
.booking-wizard-head p,
.booking-wizard-section h3,
.booking-wizard-section p,
.booking-review-card h4,
.booking-member-preview-card h4 {
  margin: 0;
}

.booking-wizard-head h2 {
  font-size: 18px;
  line-height: 1.2;
}

.booking-wizard-head p,
.booking-wizard-section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.booking-wizard-close {
  flex: 0 0 auto;
}

.booking-wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 24px;
  border-bottom: 1px solid #edf2f8;
  background: #fff;
}

.booking-summary-step {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 6px;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #d9e2ef;
  background: #f4f7fb;
  color: #0b2245;
  text-align: left;
  cursor: default;
  opacity: 1;
}

.booking-summary-step span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #d9e2ef;
  color: #0b2245;
  font-size: 12px;
  font-weight: 700;
}

.booking-summary-step strong {
  font-size: 12.5px;
  line-height: 1.25;
  color: inherit;
}

.booking-summary-step.complete {
  background: #eef6f2;
  border-color: #cfe3d8;
  color: #0d5a43;
}

.booking-summary-step.complete span {
  border-color: #b9d7c9;
  background: #fff;
  color: #0d5a43;
}

.booking-summary-step.active {
  background: #0b2245;
  border-color: #0b2245;
  color: #fff;
}

.booking-summary-step.active span {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.cancel-booking-selected-strip,
.cancel-booking-selected-empty {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.cancel-booking-selected-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cfe3d8;
  background: #f3fbf6;
  color: #0b2245;
}

.cancel-booking-selected-strip strong {
  color: #0d5a43;
}

.cancel-booking-selected-empty {
  border: 1px dashed #d9e2ef;
  background: #fafcff;
  color: #708199;
}

.cancel-booking-table tbody tr.cancel-booking-selected-row {
  background: rgba(35, 111, 214, 0.06);
  box-shadow: inset 4px 0 0 #236fd6;
}

.cancel-booking-table tbody tr.cancel-booking-selected-row td {
  background: transparent;
}

.cancel-booking-details-step {
  display: grid;
  gap: 16px;
}

.cancel-booking-step-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 2px;
}

.cancel-booking-step-head h3 {
  font-size: 16px;
  color: #10284f;
}

.cancel-booking-step-head p {
  margin-top: 4px;
  color: #697a92;
  font-size: 13px;
}

.cancel-booking-step-head-compact {
  gap: 6px;
  padding-bottom: 0;
}

.cancel-booking-step-head-compact h3 {
  font-size: 20px;
  font-weight: 700;
}

.cancel-booking-step-head-compact p {
  margin-top: 4px;
  font-size: 13px;
}

.cancel-booking-selected-strip-compact {
  min-height: 34px;
  margin-bottom: 0;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.25;
}

.cancel-booking-step-records {
  display: grid;
  gap: 16px;
}

.cancel-booking-records-warning {
  margin: 0;
}

.cancel-booking-record-summary-card,
.cancel-booking-records-card,
.cancel-booking-records-total-card {
  padding: 16px 18px;
}

.cancel-booking-record-summary-card h4,
.cancel-booking-records-card h4 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #10284f;
}

.cancel-booking-record-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.cancel-booking-record-summary-grid div {
  min-width: 0;
  padding-right: 12px;
  border-right: 1px solid #e2e8f0;
}

.cancel-booking-record-summary-grid div:last-child {
  border-right: 0;
  padding-right: 0;
}

.cancel-booking-record-summary-grid span,
.cancel-booking-records-total-card span,
.cancel-booking-records-card-head p {
  display: block;
  font-size: 12px;
  color: #6b7a90;
}

.cancel-booking-record-summary-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: #10284f;
}

.cancel-booking-record-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.cancel-booking-record-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #d9e2ef;
  border-radius: 14px;
  background: #fff;
  color: #4a5b75;
  font-weight: 600;
}

.cancel-booking-record-tab span {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eef4ff;
  color: #236fd6;
  font-size: 12px;
}

.cancel-booking-record-tab.active {
  border-color: #236fd6;
  background: #eef4ff;
  color: #10284f;
}

.cancel-booking-records-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cancel-booking-records-card-head p {
  margin: 4px 0 0;
}

.cancel-booking-records-table th,
.cancel-booking-records-table td {
  white-space: nowrap;
}

.cancel-booking-records-table td strong {
  color: #10284f;
}

.cancel-booking-records-endnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
  color: #7b8ba3;
}

.cancel-booking-records-endnote-icon svg {
  width: 18px;
  height: 18px;
}

.cancel-booking-records-total-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cancel-booking-records-total-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  color: #10284f;
}

.cancel-booking-records-total-value {
  font-size: 22px;
  font-weight: 700;
  color: #0d7a4b;
  white-space: nowrap;
}

.cancel-booking-records-total-value small {
  font-size: 12px;
  font-weight: 600;
  color: #4a5b75;
}

.cancel-booking-step-review {
  display: grid;
  gap: 16px;
}

.cancel-booking-review-warning {
  margin: 0;
}

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

.cancel-booking-review-card-head h4 {
  margin: 0;
  font-size: 16px;
  color: #10284f;
}

.cancel-booking-review-summary-card,
.cancel-booking-review-financial-card,
.cancel-booking-review-details-card,
.cancel-booking-review-preserved-card {
  padding: 16px 18px;
}

.cancel-booking-review-summary-grid,
.cancel-booking-review-financial-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.cancel-booking-review-summary-grid > div,
.cancel-booking-review-financial-grid > div {
  min-width: 0;
  padding-right: 12px;
  border-right: 1px solid #e2e8f0;
}

.cancel-booking-review-summary-grid > div:last-child,
.cancel-booking-review-financial-grid > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.cancel-booking-review-summary-grid span,
.cancel-booking-review-financial-grid span,
.cancel-booking-review-detail-grid span,
.cancel-booking-review-preserved-list span {
  display: block;
  color: #6b7a90;
  font-size: 12px;
  font-weight: 700;
}

.cancel-booking-review-summary-grid strong,
.cancel-booking-review-financial-grid strong,
.cancel-booking-review-detail-grid strong,
.cancel-booking-review-preserved-list strong {
  display: block;
  margin-top: 4px;
  color: #10284f;
  font-size: 15px;
  font-weight: 700;
}

.cancel-booking-review-financial-grid strong.is-positive {
  color: #0d7a4b;
}

.cancel-booking-review-financial-grid strong.is-negative {
  color: #dc2626;
}

.cancel-booking-review-financial-grid strong.is-warning {
  color: #c97402;
}

.cancel-booking-review-financial-grid strong.is-neutral {
  color: #2563eb;
}

.cancel-booking-review-dual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
  gap: 16px;
}

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

.cancel-booking-review-detail-grid > div,
.cancel-booking-review-preserved-list > div {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fbfdff;
}

.cancel-booking-review-detail-grid strong.is-positive {
  color: #0d7a4b;
}

.cancel-booking-review-preserved-list {
  display: grid;
  gap: 10px;
}

.cancel-booking-review-preserved-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cancel-booking-review-preserved-list > div.is-total {
  background: #f3fbf6;
  border-color: #cfe3d8;
}

.cancel-booking-review-preserved-list > div.is-total strong {
  color: #0d7a4b;
}

.cancel-booking-review-confirm {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #dbe5f1;
  border-radius: 16px;
  background: #f8fbff;
}

.cancel-booking-review-confirm input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: #0b2245;
}

.cancel-booking-review-confirm span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cancel-booking-review-confirm strong {
  color: #10284f;
  font-size: 14px;
}

.cancel-booking-review-confirm small {
  color: #6b7a90;
  font-size: 12px;
}

@media (max-width: 1200px) {
  .cancel-booking-record-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cancel-booking-review-summary-grid,
  .cancel-booking-review-financial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cancel-booking-review-summary-grid > div,
  .cancel-booking-review-financial-grid > div {
    padding-right: 0;
    border-right: 0;
  }

  .cancel-booking-review-dual-grid {
    grid-template-columns: 1fr;
  }}

@media (max-width: 720px) {
  .cancel-booking-record-summary-grid {
    grid-template-columns: 1fr;
  }

  .cancel-booking-record-summary-grid div {
    border-right: 0;
    padding-right: 0;
  }

  .cancel-booking-records-card-head,
  .cancel-booking-records-total-card {
    flex-direction: column;
    align-items: stretch;
  }

  .cancel-booking-review-summary-grid,
  .cancel-booking-review-financial-grid,
  .cancel-booking-review-detail-grid {
    grid-template-columns: 1fr;
  }

  .cancel-booking-review-preserved-list > div {
    flex-direction: column;
    align-items: flex-start;
  }}

.cancel-booking-step-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: end;
}

.cancel-booking-step-form-grid .booking-wizard-field {
  margin: 0;
}

.cancel-booking-field-full,
.cancel-booking-remarks-field {
  grid-column: 1 / -1;
}

.cancel-booking-step-form-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.cancel-booking-choice-card {
  position: relative;
  display: flex;
  align-items: stretch;
  margin: 0;
  min-height: 56px;
  min-width: 220px;
  padding: 0;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.cancel-booking-choice-card.selected,
.cancel-booking-choice-card:has(input:checked) {
  background: #10284f;
  border-color: #1e3a8a;
  box-shadow: 0 10px 20px rgba(16, 40, 79, 0.16);
}

.cancel-booking-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cancel-booking-choice-card:focus-within {
  outline: 2px solid #1e3a8a;
  outline-offset: 2px;
}

.cancel-booking-choice-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
}

.cancel-booking-choice-indicator {
  width: 18px;
  height: 18px;
  border: 2px solid #9aa9be;
  border-radius: 50%;
  background: #fff;
  box-sizing: border-box;
  flex: 0 0 auto;
}

.cancel-booking-choice-card.selected .cancel-booking-choice-indicator,
.cancel-booking-choice-card:has(input:checked) .cancel-booking-choice-indicator {
  border-color: #fff;
  background:
    radial-gradient(circle at center, #10284f 0 4px, transparent 4px 100%),
    #fff;
}

.cancel-booking-choice-label {
  color: #10284f;
  font-weight: 700;
  line-height: 1.2;
}

.cancel-booking-choice-card.selected .cancel-booking-choice-label,
.cancel-booking-choice-card:has(input:checked) .cancel-booking-choice-label {
  color: #fff;
}

@media (max-width: 1100px) {
  .cancel-booking-step-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }}

@media (max-width: 720px) {
  .cancel-booking-step-form-grid {
    grid-template-columns: 1fr;
  }}

.cancel-booking-note-strip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #efd59a;
  border-radius: 14px;
  background: #fff8ea;
  color: #8a5a00;
  font-size: 13px;
  line-height: 1.5;
}

.cancel-booking-note-strip strong {
  flex: 0 0 auto;
  color: #7a4f00;
}

.required-mark {
  color: #dc2626;
  margin-left: 2px;
}

.cancel-booking-error-text {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
}

.cancel-booking-wizard-card .booking-wizard-field > span,
.cancel-booking-wizard-card .booking-wizard-filters-grid label span,
.cancel-booking-wizard-card .booking-wizard-summary-strip span,
.cancel-booking-wizard-card .booking-review-card h4,
.cancel-booking-wizard-card .booking-review-card > span,
.cancel-booking-wizard-card .booking-review-list span {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.booking-wizard-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #66758f;
  transition: color 0.18s ease;
}

.booking-wizard-step::after {
  content: "";
  flex: 1 1 auto;
  min-width: 16px;
  height: 1px;
  background: #e4ebf5;
}

.booking-wizard-step:last-child::after {
  display: none;
}

.booking-wizard-step-index {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #cfd9ea;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
  color: #405374;
  flex: 0 0 auto;
}

.booking-wizard-step-label {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.booking-wizard-step.active .booking-wizard-step-index,
.booking-wizard-step.done .booking-wizard-step-index {
  border-color: #18895f;
  background: #18895f;
  color: #fff;
}

.booking-wizard-step.active {
  color: #103d75;
}

.booking-wizard-step.done {
  color: #14233d;
}

.booking-wizard-step.active .booking-wizard-step-index {
  border-color: #103d75;
  background: linear-gradient(135deg, #103d75 0%, #18895f 100%);
  box-shadow: 0 8px 18px rgba(16, 61, 117, 0.18);
}

.booking-wizard-step.active .booking-wizard-step-label {
  color: #103d75;
}

.booking-wizard-step.active::after {
  background: linear-gradient(90deg, rgba(16, 61, 117, 0.22) 0%, rgba(24, 137, 95, 0.18) 100%);
}

.booking-wizard-step.done::after {
  background: #d7eadf;
}

.booking-wizard-body {
  min-height: 0;
  overflow: auto;
  padding: 14px 24px 24px;
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 84px);
}

.booking-wizard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e8eef7;
  background: #fff;
}

.booking-wizard-foot-left,
.booking-wizard-foot-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.booking-wizard-loading,
.booking-wizard-error {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed #d7e0ec;
  border-radius: 18px;
  color: #526277;
  background: rgba(255, 255, 255, 0.94);
  text-align: center;
}

.booking-wizard-error {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.2);
  background: #fff5f4;
}

.booking-wizard-submit-error {
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #f0aaa1;
  border-radius: 8px;
  color: #a4271c;
  background: #fff5f4;
  font-size: 13px;
  line-height: 1.4;
}

.booking-wizard-section,
.booking-member-list-card,
.booking-member-preview-card,
.booking-review-card {
  border: 1px solid #e0e8f3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(14, 30, 64, 0.04);
}

.booking-wizard-section {
  padding: 14px 16px;
}

.booking-wizard-filters-grid,
.booking-member-form-grid,
.booking-review-grid,
.booking-member-preview-grid {
  display: grid;
  gap: 14px;
}

.booking-wizard-filters-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
}

.booking-wizard-filters-grid label,
.booking-member-form-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.booking-wizard-search {
  grid-column: span 2;
}

.booking-wizard-project-field {
  margin-bottom: 14px;
}

.booking-wizard-project-field label {
  display: grid;
  gap: 7px;
  max-width: 320px;
}

.booking-wizard-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  margin: 16px 0 12px;
  border: 1px solid #e4ebf5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.booking-wizard-summary-strip strong.success {
  color: #18895f;
}

.booking-wizard-table-wrap {
  border: 1px solid #e4ebf5;
  border-radius: 16px;
  overflow: auto;
}

#bookingWizardSharedUnitSelector {
  display: grid;
  gap: 10px;
  justify-content: start;
}

#bookingWizardSharedUnitSelector .header-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-start;
  width: auto;
  max-width: none;
  margin-top: 0;
  gap: 12px;
}

#bookingWizardSharedUnitSelector .header-filters label,
#bookingWizardSharedUnitSelector .project-toolbar-filters label,
#bookingWizardSharedUnitSelector .unit-selector-status {
  width: 340px;
  min-width: 280px;
  max-width: 360px;
}

#bookingWizardSharedUnitSelector .header-filters label {
  display: grid;
  gap: 5px;
}

#bookingWizardSharedUnitSelector .header-filters label:first-child,
#bookingWizardSharedUnitSelector .header-filters span {
  display: block;
}

#bookingWizardSharedUnitSelector .project-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-start;
  width: auto;
  margin-top: 0;
  gap: 12px;
}

#bookingWizardSharedUnitSelector .selector-note {
  display: inline-flex;
}

.booking-wizard-units-table {
  min-width: 760px;
}

.booking-wizard-units-table tr.selected td {
  background: #eef7ff;
}

.booking-wizard-units-table td:last-child,
.booking-wizard-units-table th:last-child {
  text-align: right;
}

.booking-unit-assignment-stack,
.booking-unit-deal-stack,
.booking-review-unit-stack {
  display: grid;
  gap: 12px;
}

.booking-unit-assignment-card,
.booking-unit-deal-card {
  border: 1px solid #e0e8f3;
  border-radius: 16px;
  background: #fbfdff;
  padding: 14px;
}

.booking-unit-assignment-card.invalid {
  border-color: #e78174;
  box-shadow: 0 0 0 1px rgba(215, 67, 48, 0.08);
  background: #fff9f8;
}

.booking-field-invalid input,
.booking-field-invalid select,
.booking-field-invalid textarea,
.booking-payment-allocation.booking-field-invalid {
  border-color: #d74330 !important;
  box-shadow: 0 0 0 1px rgba(215, 67, 48, 0.12);
  background: #fffafb;
}

.booking-field-error {
  display: block;
  margin-top: 2px;
  color: #c43222;
  font-size: 11.5px;
  line-height: 1.35;
}

.booking-unit-assignment-head,
.booking-payment-allocation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.booking-unit-assignment-list,
.booking-review-member-list {
  display: grid;
  gap: 8px;
}

.booking-assigned-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e4ebf5;
  border-radius: 12px;
  background: #fff;
}

.booking-assigned-member-main,
.booking-assigned-member-actions,
.booking-unit-assignment-add {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.booking-unit-assignment-add {
  margin-top: 12px;
}

.booking-unit-assignment-add label {
  display: grid;
  gap: 6px;
  min-width: 240px;
  flex: 1 1 260px;
}

.booking-unit-assignment-add label span,
.booking-unit-deal-grid label span,
.booking-payment-allocation-row span {
  color: #6a7a95;
  font-size: 12px;
  font-weight: 700;
}

.booking-unit-new-member {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e4ebf5;
}

.booking-unit-new-member-grid,
.booking-unit-deal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.booking-unit-new-member-grid label,
.booking-unit-deal-grid label {
  display: grid;
  gap: 6px;
}

.booking-unit-new-member-grid .booking-member-address,
.booking-unit-deal-grid .booking-member-address {
  grid-column: 1 / -1;
}

.booking-wizard-inline-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  background: #f8fbff;
  color: #52657a;
  font-size: 13px;
}

.booking-payment-allocation {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e0e8f3;
  border-radius: 16px;
  background: #fbfdff;
}

.booking-payment-info-banner {
  margin-top: 10px;
}

.booking-payment-mode-grid {
  margin-top: 14px;
}

.booking-payment-upload-box {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px dashed #d4deec;
  border-radius: 14px;
  background: #f9fbff;
}

.booking-payment-upload-box small {
  color: #6a7a95;
  font-size: 11.5px;
}

.booking-payment-upload-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.booking-payment-upload-meta span {
  color: #17325c;
  font-size: 12px;
  font-weight: 600;
}

.booking-payment-allocation-list {
  display: grid;
  gap: 10px;
}

.booking-payment-allocation-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px);
  gap: 12px;
  align-items: center;
}

.booking-unit-validation-error {
  margin-top: 10px;
  color: #c2412d;
  font-size: 13px;
  font-weight: 600;
}

.booking-wizard-warning {
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid #f0d18b;
  border-radius: 14px;
  background: var(--gold-soft);
  color: #9a6700;
  font-size: 13px;
  line-height: 1.5;
}

.booking-wizard-mode-switch {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid #e4ebf5;
  border-radius: 999px;
  background: #f8fbff;
}

.booking-wizard-mode-switch .ghost-btn.small-btn {
  min-height: 36px;
  border-radius: 999px;
  padding-inline: 16px;
}

.booking-wizard-mode-switch .ghost-btn.small-btn.active {
  --btn-bg: #14233d;
  --btn-color: #fff;
  --btn-border: #14233d;
  --btn-hover-bg: #1f3459;
  --btn-hover-color: #fff;
  --btn-hover-border: #1f3459;
}

.booking-member-step-grid,
.booking-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 16px;
}

.booking-member-list-card,
.booking-member-preview-card {
  padding: 16px;
}

.booking-member-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 2px;
}

.booking-member-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dfe7f2;
  border-radius: 14px;
  background: #fff;
  text-align: left;
  box-shadow: none;
  color: inherit;
}

.booking-member-row:hover {
  transform: none;
  box-shadow: 0 8px 18px rgba(20, 35, 61, 0.08);
}

.booking-member-row.selected {
  border-color: rgba(36, 100, 232, 0.32);
  background: #eef5ff;
}

.booking-member-row strong,
.booking-member-preview-grid strong {
  display: block;
  color: #14233d;
}

.booking-member-row small {
  display: block;
  color: #66758f;
  margin-top: 4px;
  line-height: 1.45;
}

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

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

.booking-member-address {
  grid-column: 1 / -1;
}

.booking-member-form-grid textarea {
  min-height: 100px;
  resize: vertical;
}

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

.booking-success-state {
  display: grid;
  justify-items: center;
  gap: 16px;
  min-height: 420px;
  padding: 18px 12px 8px;
  text-align: center;
}

.booking-success-hero {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.booking-success-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #24b07a 0%, #0e8a5c 70%, #0b6d49 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 36px rgba(24, 137, 95, 0.22);
}

.booking-success-icon svg,
.booking-success-icon img {
  width: 34px;
  height: 34px;
}

.booking-success-hero h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  color: #10284f;
}

.booking-success-hero p {
  margin: 0;
  color: #607287;
  font-size: 14px;
}

.booking-success-highlight-card {
  min-width: 280px;
  padding: 16px 18px;
  border: 1px solid #e0e8f3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(14, 30, 64, 0.05);
}

.booking-success-highlight-card span {
  display: block;
  color: #8a98ac;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.booking-success-highlight-card strong {
  display: block;
  color: #10284f;
  font-size: 28px;
  font-weight: 800;
}

.booking-success-meta {
  width: min(100%, 620px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.booking-success-meta div {
  border: 1px solid #e4ebf5;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fbfdff;
  text-align: left;
}

.booking-success-meta span {
  display: block;
  color: #6d7d92;
  font-size: 11.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.booking-success-meta strong {
  color: #10284f;
  font-size: 15px;
}

.booking-success-ref-list {
  width: min(100%, 620px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.booking-success-ref-list span {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef5ff;
  color: #17325c;
  font-size: 12px;
  font-weight: 700;
}

.booking-success-actions {
  width: min(100%, 420px);
  display: grid;
  gap: 10px;
}

.booking-success-actions .small-btn,
.booking-success-actions .ghost-btn {
  width: 100%;
  justify-content: center;
}

.booking-review-card {
  padding: 16px;
}

.empty-inline-note {
  padding: 18px;
  border: 1px dashed #d9e3ef;
  border-radius: 14px;
  color: #66758f;
  background: #fbfdff;
}

@media (max-width: 1180px) {
  .booking-wizard-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .booking-wizard-search {
    grid-column: span 3;
  }

  .booking-review-grid {
    grid-template-columns: 1fr;
  }

  .booking-success-highlight-card,
  .booking-success-actions {
    width: 100%;
    min-width: 0;
  }}

@media (max-width: 920px) {
  .booking-wizard-modal {
    width: calc(100vw - 24px);
  }

  .booking-wizard-card {
    min-height: auto;
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }

  .booking-wizard-head,
  .booking-wizard-steps,
  .booking-wizard-body,
  .booking-wizard-foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .booking-wizard-steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .booking-wizard-step::after {
    display: none;
  }

  .booking-wizard-filters-grid,
  .booking-member-form-grid,
  .booking-member-step-grid,
  .booking-details-grid,
  .booking-member-preview-grid {
    grid-template-columns: 1fr;
  }

  .booking-unit-new-member-grid,
  .booking-unit-deal-grid,
  .booking-payment-allocation-row {
    grid-template-columns: 1fr;
  }

  #bookingWizardSharedUnitSelector .header-filters label,
  #bookingWizardSharedUnitSelector .project-toolbar-filters label,
  #bookingWizardSharedUnitSelector .unit-selector-status {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .booking-wizard-search {
    grid-column: auto;
  }

  .booking-wizard-foot {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .booking-wizard-foot-left,
  .booking-wizard-foot-right {
    width: 100%;
    justify-content: stretch;
  }

  .booking-wizard-foot-right > button,
  .booking-wizard-foot-left > button {
    flex: 1 1 auto;
  }}

.project-doc-config-card h3,
.project-doc-config-table-card h3 {
  margin: 0;
  color: #10284f;
  font-size: 24px;
}

.project-doc-folder-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.project-doc-folder-field {
  display: grid;
  gap: 6px;
}

.project-doc-folder-field > span {
  font-size: 13px;
  font-weight: 700;
  color: #264166;
}

.project-doc-folder-field em {
  color: #c03632;
  font-style: normal;
}

.project-doc-folder-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.project-doc-folder-helper {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #d7e2f2;
  background: #f7fbff;
  border-radius: 8px;
  color: #4f6486;
  font-size: 12px;
}

.project-doc-folder-helper svg {
  width: 16px;
  height: 16px;
  color: #356ac3;
  flex: 0 0 auto;
}

.project-doc-tag-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-doc-tag-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.project-doc-tag-stat {
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.project-doc-tag-stat span {
  display: block;
  font-size: 12px;
  color: #61738e;
  margin-bottom: 8px;
}

.project-doc-tag-stat strong {
  font-size: 34px;
  line-height: 1;
  color: #204a96;
}

.project-doc-config-table-card {
  padding: 0;
  overflow: hidden;
}

.project-doc-config-table-card .project-doc-config-table-head {
  padding: 16px 18px 12px;
}

.project-doc-config-table-wrap {
  max-height: 560px;
  overflow: auto;
  border-top: 1px solid #e8eef6;
}

.project-doc-config-table {
  min-width: 1180px;
}

.project-doc-config-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fbff;
}

.project-doc-config-table th,
.project-doc-config-table td {
  padding-top: 10px;
  padding-bottom: 10px;
  vertical-align: top;
}

.project-doc-row-handle {
  width: 24px;
  text-align: center;
  color: #8ca0bb;
  cursor: grab;
  user-select: none;
}

.project-doc-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-doc-dynamic-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #2f60b3;
  font-size: 11px;
  font-weight: 700;
}

.project-doc-system-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef3f9;
  color: #50637f;
  font-size: 11px;
  font-weight: 700;
}

.project-doc-mapping-field {
  min-width: 260px;
}

.project-doc-mapping-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid #d7e0ee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.project-doc-mapping-input {
  border: 0;
  min-height: 36px;
  padding: 8px 10px;
  background: transparent;
}

.project-doc-mapping-input:focus {
  outline: none;
}

.project-doc-mapping-suffix {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-left: 1px solid #e1e7f0;
  background: #f8fafc;
  font-size: 12px;
  color: #63748d;
}

.project-doc-mapping-error {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #c03632;
}

.project-doc-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.project-doc-status-badge.good {
  background: #edf8f2;
  color: #18794e;
  border-color: #cdebd9;
}

.project-doc-status-badge.bad {
  background: #fff0ee;
  color: #b14032;
  border-color: #f3c5c0;
}

.project-doc-status-badge.muted {
  background: #f2f5f8;
  color: #5e7088;
  border-color: #d9e0e8;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  inset: 0;
  background: #d7e0ee;
  border-radius: 999px;
  transition: all 0.18s ease;
}

.switch .slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.switch input:checked + .slider {
  background: #245ec7;
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.switch input:disabled + .slider {
  opacity: 0.65;
}

.project-doc-action-menu {
  position: relative;
}

.project-doc-action-menu summary {
  list-style: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #d7dfeb;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #243b63;
}

.project-doc-action-menu summary::-webkit-details-marker {
  display: none;
}

.project-doc-action-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 168px;
  background: #fff;
  border: 1px solid #d9e3f0;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 20;
}

.project-doc-action-list button {
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 8px 10px;
  color: #233a60;
  font-size: 12px;
}

.project-doc-action-list button:hover {
  background: #f4f8fd;
}

.project-doc-action-list button.disabled-action,
.project-doc-action-list button.disabled-action:hover {
  background: #f8fafc;
  color: #98a6ba;
  cursor: not-allowed;
}

.project-doc-config-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid #e8eef6;
}

.tally-diagnostics-table th:nth-child(1),
.tally-diagnostics-table td:nth-child(1) {
  min-width: 180px;
}

.tally-diagnostics-table th:nth-child(2),
.tally-diagnostics-table td:nth-child(2),
.tally-diagnostics-table th:nth-child(3),
.tally-diagnostics-table td:nth-child(3),
.tally-diagnostics-table th:nth-child(4),
.tally-diagnostics-table td:nth-child(4),
.tally-diagnostics-table th:nth-child(5),
.tally-diagnostics-table td:nth-child(5) {
  white-space: nowrap;
}

.tally-diagnostics-table th:last-child,
.tally-diagnostics-table td:last-child {
  min-width: 260px;
}

.tally-source-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #29508c;
  font-size: 11px;
  font-weight: 700;
  margin: 2px 6px 2px 0;
}

.tally-expand-btn {
  min-width: 28px;
  height: 28px;
  padding: 0;
  margin-right: 8px;
}

.tally-date-text {
  vertical-align: middle;
}

.tally-preview-detail-row td {
  background: #fbfdff;
  padding: 0;
}

.tally-voucher-detail {
  padding: 10px 12px 12px;
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.tally-voucher-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  font-size: 11px;
  line-height: 1.25;
}

.tally-voucher-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: #4e6078;
}

.tally-voucher-meta strong {
  color: #5f7088;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.tally-voucher-meta em {
  color: #10284f;
  font-size: 11px;
  font-style: normal;
}

.tally-voucher-narration {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
  align-items: center;
  color: #10284f;
  font-size: 12px;
  min-width: 0;
}

.tally-voucher-narration span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tally-accounting-helper {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid #d9e4f2;
  border-radius: 10px;
  background: #f7faff;
  color: #53657f;
  font-size: 11px;
}

.tally-accounting-helper strong {
  color: #10284f;
  font-size: 11px;
}

.tally-voucher-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #dbe7f7;
  background: #f7fbff;
  color: #24507d;
  font-size: 11px;
  font-weight: 600;
}

.tally-voucher-empty {
  font-size: 12px;
  padding: 4px 0 0;
}

.tally-voucher-entry-wrap {
  overflow-x: auto;
}

.tally-voucher-entry-table th,
.tally-voucher-entry-table td {
  font-size: 11px;
  padding: 5px 6px;
}

.tally-entry-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tally-entry-type.is-debit {
  background: #edf8f0;
  color: #1f7a45;
}

.tally-entry-type.is-credit {
  background: #fff3eb;
  color: #b45d19;
}

.tally-entry-row.is-debit td {
  background: #fbfffc;
}

.tally-entry-row.is-credit td {
  background: #fffdfa;
}

.tally-entry-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.tally-entry-mapping-required td {
  background: #fff7e8;
}

@media (max-width: 980px) {
  .tally-voucher-narration {
    grid-template-columns: 1fr;
  }}

.members-workspace-shell {
  display: grid;
  gap: 16px;
  width: 100%;
}

.members-workspace-shell > .members-page-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.members-workspace-shell > .members-page-summary .members-summary-card {
  min-height: 0;
  gap: 10px;
  padding: 14px 16px;
  align-items: center;
}

.members-workspace-shell > .members-page-summary .members-summary-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.members-workspace-shell > .members-page-summary .members-summary-icon svg {
  width: 18px;
  height: 18px;
}

.members-workspace-shell > .members-page-summary .members-summary-copy {
  display: grid;
  align-content: center;
  min-width: 0;
}

.members-workspace-shell > .members-page-summary .members-summary-copy span {
  margin-bottom: 3px;
  font-size: 12px;
  line-height: 1.25;
}

.members-workspace-shell > .members-page-summary .members-summary-copy strong {
  font-size: 28px;
  line-height: 1.05;
}

.members-workspace-shell > .members-page-summary .members-summary-copy small {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.3;
}

.developer-projects-shell {
  display: grid;
  gap: 12px;
}

.developer-projects-shell .members-page-head {
  margin-bottom: 0;
}

.developer-projects-shell .members-page-head p {
  margin-top: 4px;
}

.developer-projects-shell .members-page-summary {
  gap: 12px;
}

.developer-projects-shell .members-page-summary .developer-projects-kpi-card {
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 84px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
  padding: 12px 14px;
  gap: 10px;
  align-items: center;
}

.developer-projects-shell .members-page-summary .developer-projects-kpi-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 11px;
}

.developer-projects-shell .members-page-summary .developer-projects-kpi-icon svg {
  width: 17px;
  height: 17px;
}

.developer-projects-kpi-icon.tone-total {
  background: #eaf3ff;
  color: #2563eb;
}

.developer-projects-kpi-icon.tone-active {
  background: #eaf8ef;
  color: #1f8a4c;
}

.developer-projects-kpi-icon.tone-upcoming {
  background: #f3edff;
  color: #7c3aed;
}

.developer-projects-kpi-icon.tone-completed {
  background: #fff3e6;
  color: #d97706;
}

.developer-projects-shell .members-page-summary .developer-projects-kpi-copy {
  display: grid;
  align-content: center;
  min-width: 0;
  align-self: center;
}

.developer-projects-shell .members-page-summary .developer-projects-kpi-copy span {
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 600;
  color: #61748d;
  line-height: 1.2;
}

.developer-projects-shell .members-page-summary .developer-projects-kpi-copy strong {
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
  color: #0f2c55;
}

.developer-projects-kpi-copy small {
  display: none;
}

.developer-reports-shell {
  display: grid;
  gap: 16px;
}

.developer-reports-filter-row {
  grid-template-columns: repeat(7, minmax(150px, 1fr)) auto;
}

.members-page-summary.developer-reports-summary {
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.developer-report-card {
  text-align: left;
  min-width: 0;
  padding: 12px;
  gap: 9px;
  border-radius: 12px;
}

.developer-report-card .members-summary-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.developer-report-card .members-summary-icon svg {
  width: 19px;
  height: 19px;
}

.developer-report-card .members-summary-copy {
  min-width: 0;
}

.developer-report-card .members-summary-copy span {
  min-height: 30px;
  margin-bottom: 2px;
  font-size: 11px;
  line-height: 1.25;
}

.developer-report-card .members-summary-copy strong {
  font-size: 25px;
}

.developer-report-card .members-summary-copy small {
  display: block;
  margin-top: 2px;
  color: #7a8ba1;
  font-size: 10px;
}

.developer-reports-main-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

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

.developer-reports-sidepanels {
  min-width: 0;
  padding: 14px;
}

.developer-reports-table {
  min-width: 980px;
}

.developer-reports-quick-links,
.developer-reports-usage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.developer-reports-quick-link,
.developer-reports-usage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e1e8f2;
  border-radius: 10px;
  background: #fff;
  color: #10284f;
}

.developer-reports-quick-link:hover {
  background: #f8fbff;
}

.developer-projects-card {
  padding: 16px;
  margin-top: 0;
  overflow: visible;
}

.developer-projects-table {
  width: 100%;
  min-width: 1060px;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.developer-projects-card .members-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  padding-right: 16px;
  scrollbar-gutter: stable both-edges;
}

.developer-projects-table th,
.developer-projects-table td {
  font-size: 11.5px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 13px 10px;
}

.developer-projects-table th {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.developer-projects-table th:nth-child(1),
.developer-projects-table td:nth-child(1) {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.developer-projects-table th:nth-child(2),
.developer-projects-table td:nth-child(2) {
  min-width: 155px;
}

.developer-projects-table th:nth-child(3),
.developer-projects-table td:nth-child(3) {
  min-width: 110px;
}

.developer-projects-table th:nth-child(4),
.developer-projects-table td:nth-child(4) {
  min-width: 135px;
}

.developer-projects-table th:nth-child(5),
.developer-projects-table td:nth-child(5) {
  min-width: 84px;
}

.developer-projects-table th:nth-child(6),
.developer-projects-table td:nth-child(6),
.developer-projects-table th:nth-child(7),
.developer-projects-table td:nth-child(7),
.developer-projects-table th:nth-child(8),
.developer-projects-table td:nth-child(8) {
  width: 64px;
  min-width: 64px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.developer-projects-table th:nth-child(9),
.developer-projects-table td:nth-child(9) {
  min-width: 108px;
}

.developer-projects-table th:nth-child(10),
.developer-projects-table td:nth-child(10) {
  width: 138px;
  min-width: 138px;
  white-space: nowrap;
}

.developer-projects-table th:nth-child(10) {
  overflow: visible;
  text-overflow: clip;
}

.developer-projects-table td:nth-child(10) {
  overflow: visible;
  text-overflow: clip;
}

.developer-projects-table th:nth-child(11),
.developer-projects-table td:nth-child(11) {
  width: 104px;
  min-width: 104px;
  position: sticky;
  right: 0;
  background: #fff;
  z-index: 2;
  text-align: center;
  box-shadow: -1px 0 0 #e6edf5;
}

.developer-projects-table td strong {
  color: #10284f;
  font-size: 11.5px;
  font-weight: 700;
}

.developer-projects-cell-text {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.developer-projects-updated-text {
  overflow: visible;
  text-overflow: clip;
}

.developer-projects-table .table-action-btn {
  padding: 7px 10px;
  min-width: 72px;
  font-size: 11px;
}

.developer-projects-table .table-action-btn.icon-only {
  min-width: 36px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.developer-projects-action-col {
  text-align: center;
}

.developer-projects-table thead th:nth-child(11) {
  position: sticky;
  right: 0;
  background: #f8fbff;
  z-index: 3;
  box-shadow: -1px 0 0 #e6edf5;
}

.developer-projects-table tr[data-developer-project-open] {
  cursor: pointer;
}

.developer-projects-table tr[data-developer-project-open]:hover td {
  background: #fbfdff;
}

.project-bookings-shell {
  display: grid;
  gap: 16px;
}

.project-bookings-summary-strip {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.project-bookings-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.project-bookings-summary-head h3,
.project-bookings-card-head h3,
.project-bookings-preview-head h3,
.project-bookings-preview-section h4 {
  margin: 0;
  color: #10284f;
}

.project-bookings-summary-head span {
  color: #647690;
  font-size: 13px;
}

.project-bookings-pill-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.project-bookings-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d9e3f0;
  background: #f8fbff;
  color: #19345c;
  font-size: 13px;
  font-weight: 700;
}

.project-bookings-quick-select {
  max-width: 240px;
}

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

.project-booking-kpi-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
}

.project-payment-kpi-card {
  text-align: left;
  border: 1px solid #e1e8f2;
  background: #fff;
  box-shadow: 0 10px 28px rgba(18, 38, 67, 0.06);
  transform: none;
  min-height: 112px;
}

.project-payment-kpi-card:hover {
  background: #fbfdff;
  box-shadow: 0 12px 30px rgba(18, 38, 67, 0.08);
  transform: none;
}

.project-payment-kpi-card.is-active {
  border-color: #245ec7;
  background: linear-gradient(180deg, #f9fbff 0%, #eef4ff 100%);
  box-shadow: 0 14px 32px rgba(36, 94, 199, 0.12);
}

.members-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.members-page-head h2 {
  margin: 0 0 6px;
  color: #10284f;
  font-size: 22px;
}

.members-page-head p {
  margin: 0;
  color: #5f7088;
  font-size: 14px;
}

.members-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.members-page-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.members-summary-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
}

.members-summary-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #f3f7fd;
  color: #245ec7;
  display: grid;
  place-items: center;
}

.members-summary-icon svg {
  width: 24px;
  height: 24px;
}

.members-summary-copy span {
  display: block;
  font-size: 13px;
  color: #5e7089;
  margin-bottom: 4px;
}

.members-summary-copy strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  color: #10284f;
}

.members-summary-copy small {
  display: block;
  margin-top: 6px;
  color: #6a7b92;
  font-size: 12px;
}

.members-table-card {
  padding: 16px;
  width: 100%;
  max-width: none;
}

.members-filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(160px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.members-filter-row label {
  display: grid;
  gap: 6px;
}

.members-filter-row label span {
  font-size: 12px;
  font-weight: 700;
  color: #5f718b;
}

.members-filter-search input {
  min-height: 42px;
}

.members-filter-actions {
  display: flex;
  justify-content: flex-end;
  align-items: end;
}

.project-bookings-filter-row {
  grid-template-columns: minmax(240px, 2fr) repeat(5, minmax(120px, 1fr)) auto;
}

.project-payment-kpi-card .members-summary-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
}

.project-payment-kpi-card .members-summary-icon svg {
  width: 20px;
  height: 20px;
}

.project-payment-kpi-card .members-summary-copy span {
  font-size: 12px;
  margin-bottom: 3px;
}

.project-payment-kpi-card .members-summary-copy strong {
  font-size: clamp(18px, 1.4vw, 23px);
  line-height: 1.05;
  white-space: nowrap;
}

.project-payment-kpi-card .members-summary-copy small {
  margin-top: 4px;
  font-size: 11px;
}

.project-refunds-shell .project-refunds-filter-row .project-payments-filter-actions .small-btn {
  min-width: 72px;
  padding: 8px 10px;
}

.project-refunds-summary-card .project-payments-status-row,
.project-refunds-summary-card .project-payments-refund-pending-row,
.project-refunds-summary-card .developer-payments-alert-row {
  border-radius: 10px;
}

.members-table-wrap {
  border: 1px solid #e1e8f2;
  border-radius: 10px;
  overflow: visible;
  width: 100%;
}

.members-page-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.members-page-table td,
.members-page-table th {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
  padding: 12px 10px;
  font-size: 13px;
}

.members-page-table thead th {
  background: #f8fbff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.members-page-table th:nth-child(1),
.members-page-table td:nth-child(1) { min-width: 52px; width: 52px; }
.members-page-table th:nth-child(2),
.members-page-table td:nth-child(2) { min-width: 140px; width: 16%; }
.members-page-table th:nth-child(3),
.members-page-table td:nth-child(3) { min-width: 96px; width: 10%; }
.members-page-table th:nth-child(4),
.members-page-table td:nth-child(4) { min-width: 150px; width: 17%; }
.members-page-table th:nth-child(5),
.members-page-table td:nth-child(5) { min-width: 100px; width: 10%; }
.members-page-table th:nth-child(6),
.members-page-table td:nth-child(6) { min-width: 108px; width: 11%; }
.members-page-table th:nth-child(7),
.members-page-table td:nth-child(7) { min-width: 108px; width: 11%; }
.members-page-table th:nth-child(8),
.members-page-table td:nth-child(8) { min-width: 92px; width: 8%; text-align: center; }
.members-page-table th:nth-child(9),
.members-page-table td:nth-child(9) { min-width: 104px; width: 10%; }
.members-page-table th:nth-child(10),
.members-page-table td:nth-child(10) { min-width: 74px; width: 7%; text-align: right; }

.members-actions-cell {
  white-space: nowrap;
  padding-right: 12px;
}

.members-row-menu-trigger {
  width: 32px;
  height: 32px;
  border: 1px solid #dbe4df;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #1d3557;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.members-action-menu-layer {
  position: fixed;
  z-index: 10020;
  min-width: 148px;
  border: 1px solid #dbe4df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(18, 34, 66, 0.14);
  padding: 6px;
  display: none;
}

.members-action-menu-layer.open {
  display: grid;
}

.members-action-menu-layer button {
  border: none;
  background: transparent;
  padding: 9px 10px;
  text-align: left;
  border-radius: 8px;
  cursor: pointer;
  color: #1d3557;
}

.members-action-menu-layer button:hover:not(:disabled) {
  background: rgba(36, 100, 232, 0.08);
}

.members-action-menu-layer button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.members-action-menu-note {
  margin-top: 4px;
  padding: 8px 10px;
  border-top: 1px solid #eef3f8;
  color: #61738d;
  font-size: 12px;
  line-height: 1.45;
}

#projectMemberViewDialog {
  width: min(1120px, 82vw) !important;
  max-width: min(1120px, 82vw) !important;
  max-height: min(92vh, calc(100vh - 32px)) !important;
}

#projectMemberViewDialog .member-details-form {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: min(88vh, calc(100vh - 48px));
  max-height: min(88vh, calc(100vh - 48px));
  padding: 14px 16px 12px;
}

#projectMemberViewDialog .dialog-title {
  flex: 0 0 auto;
  position: static;
  padding-bottom: 8px;
}

#projectMemberViewDialog .dialog-actions {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding-top: 8px;
  background: linear-gradient(to top, #ffffff 82%, rgba(255, 255, 255, 0.95) 100%);
  border-top: 1px solid #eef3f8;
}

#projectMemberViewDialog .dialog-window-close {
  width: 36px;
  height: 36px;
}

#projectMemberViewDialog .dialog-title h2 {
  font-size: 18px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#projectMemberViewDialog .dialog-title p {
  font-size: 12px;
  margin-top: 2px;
}

#projectMemberViewDialog .dialog-window-close {
  width: 34px;
  height: 34px;
  font-size: 22px;
}

.project-bookings-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 3fr);
  gap: 16px;
  align-items: start;
}

.table-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
}

.table-sort-btn span {
  color: #6b7f99;
  font-size: 11px;
  line-height: 1;
}

.project-payment-context-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-payment-context-stack span {
  color: #10284f;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-payment-context-stack small {
  color: #6b7f99;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-payment-reference-cell strong {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-payment-amount-cell {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}

.project-payment-amount-cell.is-refund {
  color: #c24141;
}

.project-payment-bookingref-cell,
.project-payment-date-cell,
.project-payment-type-cell,
.project-payment-mode-cell,
.project-payment-status-cell {
  white-space: nowrap;
}

.project-payment-bookingref-cell .small-link-btn {
  white-space: nowrap;
}

.project-payment-context-cell,
.project-payment-reference-cell {
  white-space: normal;
  overflow: hidden;
}

.project-treasury-filter-card {
  padding: 14px;
}

.project-treasury-filter-shell {
  gap: 0;
}

.project-treasury-card {
  padding: 16px;
}

.project-treasury-head {
  margin-bottom: 12px;
}

.project-treasury-head h3 {
  margin-bottom: 4px;
}

.project-treasury-table-wrap {
  overflow-x: hidden;
}

.project-treasury-table {
  width: 100%;
  table-layout: fixed;
}

.project-treasury-table th:nth-child(1),
.project-treasury-table td:nth-child(1) { width: 11%; }
.project-treasury-table th:nth-child(2),
.project-treasury-table td:nth-child(2) { width: 11%; }
.project-treasury-table th:nth-child(3),
.project-treasury-table td:nth-child(3) { width: 13%; }
.project-treasury-table th:nth-child(4),
.project-treasury-table td:nth-child(4) { width: 25%; }
.project-treasury-table th:nth-child(5),
.project-treasury-table td:nth-child(5) { width: 12%; }
.project-treasury-table th:nth-child(6),
.project-treasury-table td:nth-child(6) { width: 10%; }
.project-treasury-table th:nth-child(7),
.project-treasury-table td:nth-child(7) { width: 10%; }
.project-treasury-table th:nth-child(8),
.project-treasury-table td:nth-child(8) { width: 8%; text-align: right; }

.project-treasury-table td {
  white-space: normal;
}

.project-treasury-description {
  display: grid;
  gap: 4px;
  line-height: 1.4;
}

.project-treasury-description span {
  color: #10284f;
  overflow-wrap: anywhere;
}

.project-treasury-description small {
  color: #6b7f99;
  font-size: 12px;
}

.project-treasury-direction {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.project-treasury-direction.in {
  color: #18864b;
}

.project-treasury-direction.out {
  color: #d04141;
}

.project-finance-transaction-row {
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.project-finance-transaction-row:hover {
  background: #f7faff;
}

.project-finance-transaction-row:focus-visible {
  outline: 2px solid #2a57ea;
  outline-offset: -2px;
  background: #f7faff;
}

.payment-details-modal {
  width: min(1180px, calc(100vw - 36px));
  max-width: 1180px;
  border: 0;
  padding: 0;
  background: transparent;
}

.payment-details-modal::backdrop,
.payment-child-modal::backdrop {
  background: rgba(10, 22, 43, 0.38);
}

.payment-details-modal-card,
.payment-child-modal-card {
  width: 100%;
  border: 1px solid #dfe7f2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 26px 60px rgba(10, 31, 68, 0.16);
}

.payment-details-modal-card {
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.payment-details-modal-head,
.payment-child-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-details-modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid #e8eef6;
}

.payment-details-modal-head h2,
.payment-child-modal-head h3,
.payment-details-panel-head h3,
.payment-details-panel-head h4 {
  margin: 0;
  color: #10284f;
}

.payment-details-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px 24px;
}

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

.project-finance-transaction-detail-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid #e8eef7;
  border-radius: 12px;
  background: #fbfdff;
}

.project-finance-transaction-detail-item span {
  color: #6a7a93;
  font-size: 12px;
  font-weight: 600;
}

.project-finance-transaction-detail-item strong {
  color: #10284f;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.payment-details-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.payment-details-main,
.payment-details-summary-blocks,
.payment-details-quick-actions {
  display: grid;
  gap: 12px;
}

.payment-details-panel,
.payment-quick-action-card {
  border: 1px solid #e1e8f2;
  border-radius: 14px;
  background: #fff;
}

.payment-details-panel {
  padding: 14px 16px;
}

.payment-details-primary-panel {
  gap: 14px;
}

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

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

.payment-details-content {
  display: grid;
  gap: 10px;
}

.payment-details-description {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.45;
}

.payment-detail-card {
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  min-width: 0;
}

.payment-detail-card--wide {
  width: 100%;
}

.payment-detail-card span {
  display: block;
  margin-bottom: 4px;
  color: #61738d;
  font-size: 12px;
  font-weight: 600;
}

.payment-detail-card strong {
  color: #10284f;
  font-size: 14px;
  line-height: 1.35;
}

.payment-details-grid .wide {
  grid-column: 1 / -1;
}

.payment-details-grid span,
.payment-child-summary-grid span {
  display: block;
  margin-bottom: 4px;
  color: #61738d;
  font-size: 12px;
  font-weight: 600;
}

.payment-details-grid strong,
.payment-child-summary-grid strong {
  color: #10284f;
  font-size: 14px;
  line-height: 1.35;
}

.payment-details-grid strong.success {
  color: #0e8b57;
}

.payment-details-summary-blocks {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-details-summary-row,
.payment-details-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f8;
}

.payment-details-summary-row:last-child,
.payment-details-status-row:last-child {
  border-bottom: 0;
}

.payment-details-quick-actions h4 {
  margin: 0 0 2px;
  color: #10284f;
}

.payment-quick-action-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  text-align: left;
}

.payment-quick-action-card strong {
  color: #10284f;
  font-size: 14px;
}

.payment-quick-action-card small {
  color: #61738d;
  font-size: 12px;
}

.payment-quick-action-card:hover {
  background: #f8fbff;
}

.payment-quick-action-card.danger strong {
  color: #b53431;
}

.payment-details-modal-foot,
.payment-child-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px 18px;
  border-top: 1px solid #e8eef6;
}

.payment-details-foot-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.payment-details-foot-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.project-payment-type-badge,
.project-payment-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.payment-details-layout {
  display: grid;
  gap: 18px;
}

.payment-details-summary-strip {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) repeat(4, minmax(0, 0.7fr));
  border: 1px solid #e1e8f2;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.payment-details-summary-primary,
.payment-details-summary-meta > div {
  padding: 18px 22px;
}

.payment-details-summary-primary {
  display: grid;
  gap: 14px;
  border-right: 1px solid #e8eef6;
}

.payment-details-summary-badge-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.payment-details-summary-badge-row strong {
  color: #12814f;
  font-size: 20px;
  line-height: 1;
}

.payment-details-summary-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #10284f;
  font-weight: 500;
}

.payment-details-summary-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #27b36a;
  box-shadow: 0 0 0 4px rgba(39, 179, 106, 0.12);
}

.payment-details-summary-status-dot.status-warning,
.payment-details-summary-status-dot.warning {
  background: #d9901a;
  box-shadow: 0 0 0 4px rgba(217, 144, 26, 0.14);
}

.payment-details-summary-status-dot.status-danger,
.payment-details-summary-status-dot.danger {
  background: #ca4f44;
  box-shadow: 0 0 0 4px rgba(202, 79, 68, 0.14);
}

.payment-details-summary-meta {
  display: contents;
}

.payment-details-summary-meta > div {
  display: grid;
  gap: 8px;
  border-left: 1px solid #e8eef6;
}

.payment-details-summary-meta span,
.payment-details-info-table span,
.payment-details-breakdown-table span {
  color: #61738d;
  font-size: 12px;
  font-weight: 600;
}

.payment-details-summary-meta strong,
.payment-details-info-table strong,
.payment-details-breakdown-table strong {
  color: #10284f;
  font-size: 14px;
  line-height: 1.45;
}

.payment-details-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.payment-details-info-table,
.payment-details-breakdown-table {
  display: grid;
}

.payment-details-info-table {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-details-info-table > div,
.payment-details-breakdown-table > div {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid #edf2f8;
}

.payment-details-info-table > div:nth-child(1),
.payment-details-info-table > div:nth-child(2),
.payment-details-breakdown-table > div:first-child {
  border-top: 0;
}

.payment-details-info-table > div:nth-child(odd) {
  padding-right: 14px;
}

.payment-details-info-table > div:nth-child(even) {
  padding-left: 14px;
}

.payment-details-info-table > div:nth-child(even) {
  border-left: 1px solid #edf2f8;
}

.payment-details-info-table .wide {
  grid-column: 1 / -1;
  padding-left: 0;
  padding-right: 0;
  border-left: 0;
}

.payment-details-side-stack {
  display: grid;
  gap: 18px;
}

.payment-details-positive-amount {
  color: #12814f !important;
}

.payment-details-negative-amount {
  color: #ca4f44 !important;
}

.payment-details-soft-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ebf8ef;
  color: #168050;
  font-size: 12px;
  font-weight: 700;
}

.payment-details-attachment-list {
  display: grid;
  gap: 12px;
}

.payment-details-attachment-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e1e8f2;
  border-radius: 14px;
  background: #fff;
}

.payment-details-attachment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff3f2;
  color: #d1453b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.payment-details-attachment-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.payment-details-attachment-meta strong,
.payment-details-attachment-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-details-attachment-meta small {
  color: #61738d;
}

.payment-details-attachment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-details-empty-state {
  padding: 18px 16px;
  border: 1px dashed #d9e4f1;
  border-radius: 14px;
  color: #61738d;
  background: #fbfdff;
}

@media (max-width: 1180px) {
  .payment-details-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-details-summary-primary {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid #e8eef6;
  }

  .payment-details-summary-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-details-summary-meta > div:nth-child(odd) {
    border-left: 0;
  }}

@media (max-width: 900px) {
  .payment-details-content-grid,
  .payment-details-info-table {
    grid-template-columns: 1fr;
  }

  .payment-details-info-table > div,
  .payment-details-info-table .wide {
    padding-left: 0;
    padding-right: 0;
    border-left: 0;
  }}

@media (max-width: 680px) {
  .project-finance-transaction-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .payment-details-summary-strip,
  .payment-details-summary-meta {
    grid-template-columns: 1fr;
  }

  .payment-details-summary-meta > div {
    border-left: 0;
    border-top: 1px solid #e8eef6;
  }

  .payment-details-modal,
  .payment-child-modal {
    width: min(calc(100vw - 20px), 1100px);
  }

  .payment-details-attachment-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .payment-details-attachment-actions {
    justify-content: flex-start;
  }}

.payment-child-modal {
  width: min(760px, calc(100vw - 48px));
  max-width: 760px;
  border: 0;
  padding: 0;
  background: transparent;
}

.payment-child-modal-head,
.payment-child-modal-body,
.payment-child-modal-foot {
  padding-inline: 18px;
}

.payment-child-modal-head {
  padding-top: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8eef6;
}

.payment-child-modal-body {
  padding-top: 16px;
  padding-bottom: 16px;
}

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

.project-bookings-preview-section.top-compact {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.table-inline-alert {
  display: block;
  margin-top: 4px;
  color: #c64545;
  font-size: 11px;
  font-weight: 700;
}

.project-bookings-list-card,
.project-bookings-preview-card {
  padding: 16px;
}

.project-bookings-card-head,
.project-bookings-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.project-bookings-table-wrap {
  border: 1px solid #e1e8f2;
  border-radius: 10px;
  overflow: auto;
}

.project-bookings-table {
  min-width: 1100px;
}

.project-refunds-shell .project-payments-preview-card {
  min-width: 320px;
}

.project-bookings-table tr.selected td {
  background: #f8fbff;
}

.project-bookings-table tbody tr {
  cursor: pointer;
}

.project-bookings-table tbody tr:hover td {
  background: #fbfdff;
}

.project-bookings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.project-bookings-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-bookings-preview-ref {
  font-size: 20px;
  font-weight: 800;
  color: #10284f;
  margin-bottom: 14px;
}

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

.project-bookings-preview-grid.compact {
  margin-top: 10px;
}

.project-bookings-preview-grid div {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid #edf2f8;
}

.project-bookings-preview-grid span {
  color: #647690;
  font-size: 12px;
}

.project-bookings-preview-grid strong {
  color: #10284f;
  font-size: 15px;
}

.project-bookings-preview-grid strong.success {
  color: #0e8b57;
}

.project-bookings-preview-grid strong.warning {
  color: #d07d17;
}

.project-bookings-preview-grid strong.danger {
  color: #c64545;
}

.project-bookings-preview-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e8eef6;
}

.project-bookings-preview-actions,
.project-bookings-preview-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.project-payments-refund-pending-list {
  display: grid;
  gap: 10px;
}

.project-payments-refund-pending-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  text-align: left;
  transform: none;
}

.project-payments-refund-pending-row small {
  grid-column: 1 / -1;
  color: #647690;
}

.project-payments-refund-pending-row:hover {
  background: #f8fbff;
  transform: none;
  box-shadow: none;
}

.project-documents-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.developer-scope-card,
.placeholder-panel {
  border-radius: 16px;
}

.members-page-head h2,
.project-dashboard-title-row h2 {
  letter-spacing: 0;
}

.members-page-head h2 {
  font-size: 26px;
}

.data-table th,
.data-table td {
  padding: 11px 12px;
  font-size: 13px;
}

.table-actions.compact-actions {
  gap: 8px;
}

.table-action-btn {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 10px;
}

.project-account-kpi-card {
  min-height: 120px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid #e3eaf4;
  position: relative;
}

.project-account-kpi-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 0 0 16px 16px;
  background: #dbe6f7;
}

.project-account-kpi-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
}

.project-account-kpi-copy {
  min-width: 0;
}

.project-account-kpi-copy span {
  font-size: 13px;
}

.project-account-kpi-copy strong {
  font-size: clamp(24px, 1.95vw, 30px);
  line-height: 1.1;
  white-space: nowrap;
}

.project-account-kpi-copy small {
  font-size: 12px;
  color: #6b7d93;
}

.project-account-kpi-card.tone-mca::after {
  background: #2563eb;
}

.project-account-kpi-card.tone-rera::after {
  background: #8b5cf6;
}

.project-account-kpi-card.tone-non-rera::after {
  background: #16a34a;
}

.project-account-kpi-card.tone-total::after {
  background: #f97316;
}

.project-account-name-cell {
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.project-account-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.project-account-type-badge.type-mca {
  color: #2563eb;
  background: #eef4ff;
  border-color: #d8e6ff;
}

.project-account-type-badge.type-rera {
  color: #7c3aed;
  background: #f5efff;
  border-color: #e6d9ff;
}

.project-account-type-badge.type-non_rera,
.project-account-type-badge.type-non-rera {
  color: #15803d;
  background: #edf9f0;
  border-color: #d2efd9;
}

.project-account-type-badge.type-account {
  color: #55657d;
  background: #f4f7fb;
  border-color: #dfe6ef;
}

.project-account-action-btn {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  vertical-align: middle;
}

.project-account-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: #647690;
}

.project-account-action-icon svg {
  width: 14px;
  height: 14px;
}

.project-account-status-cell .status-badge {
  justify-content: center;
}

.project-account-ledger-tab {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid #dbe6f4;
  background: #f8fbff;
  color: #245ec7;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.project-account-ledger-tab:hover {
  background: #eef5ff;
  border-color: #bfd4f3;
}

.project-account-ledger-tab.active {
  background: #eff6ff;
  border-color: #b8d1f6;
  color: #123b7a;
  box-shadow: inset 0 -2px 0 #2563eb;
}

.project-account-ledger-description {
  display: grid;
  gap: 3px;
}

.project-account-ledger-description strong {
  color: #10284f;
  font-size: 13px;
  line-height: 1.35;
}

.project-account-ledger-description small {
  color: #647690;
  font-size: 11px;
  line-height: 1.3;
}

.project-account-amount.credit {
  color: #0e8b57;
}

.project-account-amount.debit {
  color: #c64545;
}

.project-account-settings-modal::backdrop,
.project-account-transaction-modal::backdrop {
  background: rgba(10, 24, 48, 0.45);
}

.project-account-dialog-card {
  width: min(1520px, calc(100vw - 28px));
  max-height: 88vh;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(16, 40, 79, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-account-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #e1e8f2;
}

.project-account-dialog-head h3 {
  margin: 0;
}

.project-account-dialog-body {
  padding: 16px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

.project-account-settings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  width: 100%;
  min-width: 0;
}

.project-account-settings-toolbar p {
  margin: 0;
  color: #647690;
  font-size: 13px;
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
}

.project-account-settings-toolbar-spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.project-account-settings-table-wrap {
  border: 1px solid #e1e8f2;
  border-radius: 18px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
}

.project-account-settings-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  box-sizing: border-box;
}

.project-account-settings-table th,
.project-account-settings-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e8eef7;
  text-align: left;
  vertical-align: middle;
}

.project-account-settings-table thead th {
  background: #f7faff;
  color: #647690;
  font-size: 12px;
  font-weight: 800;
}

.project-account-settings-table tbody tr:last-child td {
  border-bottom: 0;
}

.project-account-settings-table th:nth-child(1) { width: 14%; }
.project-account-settings-table th:nth-child(2) { width: 18%; }
.project-account-settings-table th:nth-child(3) { width: 16%; }
.project-account-settings-table th:nth-child(4) { width: 19%; }
.project-account-settings-table th:nth-child(5) { width: 16%; }
.project-account-settings-table th:nth-child(6) { width: 9%; }
.project-account-settings-table th:nth-child(7) { width: 8%; }

.project-account-settings-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #dbe5f4;
  border-radius: 12px;
  background: #fff;
  color: #10284f;
  box-sizing: border-box;
}

.project-account-settings-input.number {
  text-align: right;
}

.project-account-settings-input-readonly {
  background: #f7faff;
  color: #445a78;
  cursor: default;
}

.project-account-settings-balance-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.project-account-settings-currency {
  font-weight: 800;
  color: #10284f;
}

.project-account-settings-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #10284f;
}

.project-account-settings-edit-note {
  color: #647690;
  font-size: 12px;
  font-weight: 700;
}

.modal-overlay[data-modal-id="projectAccountSettingsModal"] .modal-shell {
  width: min(94vw, 1240px);
  max-width: min(94vw, 1240px);
  max-height: 90vh;
}

.modal-overlay[data-modal-id="projectAccountSettingsModal"] .project-account-settings-shell-head,
.modal-overlay[data-modal-id="projectAccountSettingsModal"] .project-account-settings-shell-footer {
  z-index: 12;
}

.modal-overlay[data-modal-id="projectAccountSettingsModal"] .project-account-settings-shell-body {
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-overlay[data-modal-id="projectAccountSettingsModal"] .project-account-settings-table-wrap,
.modal-overlay[data-modal-id="projectAccountSettingsModal"] .project-account-settings-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.modal-overlay[data-modal-id="projectAccountSettingsModal"] .project-account-settings-table th,
.modal-overlay[data-modal-id="projectAccountSettingsModal"] .project-account-settings-table td {
  padding-left: 12px;
  padding-right: 12px;
}

.modal-overlay[data-modal-id="projectAccountSettingsModal"] .project-account-settings-input {
  min-width: 0;
}

@media (max-width: 1200px) {
  .project-account-dialog-card.project-account-settings-card {
    width: min(1220px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
  }

  .project-account-settings-toolbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }
}

@media (max-width: 980px) {
  .project-account-settings-table,
  .project-account-settings-table thead,
  .project-account-settings-table tbody,
  .project-account-settings-table tr,
  .project-account-settings-table th,
  .project-account-settings-table td {
    display: block;
  }

  .project-account-settings-table thead {
    display: none;
  }

  .project-account-settings-table tbody {
    display: grid;
    gap: 12px;
  }

  .project-account-settings-table tr {
    border: 1px solid #e1e8f2;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
  }

  .project-account-settings-table td {
    display: grid;
    grid-template-columns: minmax(110px, 140px) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eef3fa;
  }

  .project-account-settings-table tbody tr td:last-child {
    border-bottom: 0;
  }

  .project-account-settings-table td::before {
    content: attr(data-label);
    color: #647690;
    font-size: 12px;
    font-weight: 800;
  }
}

.booking-field-hint {
  display: block;
  margin-top: 6px;
  color: #60748f;
  font-size: 12px;
  font-weight: 600;
}

.booking-wizard-checkbox-field {
  align-self: end;
}

.booking-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: #10284f;
  font-weight: 600;
}

.booking-inline-check input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
}

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

.project-account-transaction-content {
  display: grid;
  gap: 10px;
}

.project-account-detail-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #e1e8f2;
  border-radius: 16px;
  background: #fafcff;
}

.project-account-detail-grid > div.wide {
  grid-column: 1 / -1;
}

.project-account-detail-grid span {
  font-size: 12px;
  color: #647690;
  font-weight: 700;
}

.project-account-detail-grid strong {
  color: #10284f;
}

.project-documents-type-summary,
.project-documents-activity-list {
  display: grid;
  gap: 10px;
}

.project-documents-type-row,
.project-documents-activity-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  color: #10284f;
}

.project-documents-activity-row {
  flex-direction: column;
  align-items: stretch;
}

.project-documents-type-row span,
.project-documents-activity-row span {
  font-size: 13px;
}

.project-documents-type-row strong,
.project-documents-activity-row strong {
  font-size: 13px;
  font-weight: 700;
}

.project-documents-activity-row small {
  font-size: 12px;
  color: #647690;
}

.project-documents-type-row:hover,
.project-documents-activity-row:hover {
  background: #f8fbff;
}

.small-link-btn {
  min-height: 32px;
  padding: 6px 10px;
}

.empty-inline-note {
  color: #647690;
  font-size: 13px;
}

.text-link-btn {
  border: 1px solid #dbe4f0;
  background: #fff;
  color: #245ec7;
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 12px;
  text-align: left;
  box-shadow: none;
  transform: none;
}

.text-link-btn:hover {
  background: #f8fbff;
  box-shadow: none;
  transform: none;
}

.sales-booking-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.sales-booking-status.open {
  color: #1f67d2;
  background: #eef5ff;
  border-color: #d4e4ff;
}

.sales-booking-status.booked {
  color: #157347;
  background: #edf9f0;
  border-color: #d2efd9;
}

.sales-booking-status.sold {
  color: #7f56d9;
  background: #f5efff;
  border-color: #e6d9ff;
}

.sales-booking-status.cancelled {
  color: #c64545;
  background: #fff0f0;
  border-color: #f4cdcd;
}

.sales-booking-status.refund {
  color: #d07d17;
  background: #fff7e7;
  border-color: #f3dfb7;
}

.sales-booking-status.neutral {
  color: #55657d;
  background: #f4f7fb;
  border-color: #dfe6ef;
}

/* Project Sales / Bookings responsive desktop refactor */
.project-bookings-shell {
  display: grid;
  gap: 12px;
  width: 100%;
}

.project-bookings-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.project-bookings-group-card {
  padding: 12px 14px;
  min-height: 0;
  display: grid;
  gap: 10px;
  border: 1px solid #e4ebf5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 35, 63, 0.05);
}

.project-bookings-group-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.project-bookings-group-head::after {
  content: "";
  width: 38px;
  min-width: 38px;
}

.project-bookings-group-head .members-summary-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 11px;
}

.project-bookings-group-head .members-summary-icon svg {
  width: 18px;
  height: 18px;
}

.project-bookings-group-head h3 {
  margin: 0;
  color: #10284f;
  font-size: 15px;
  line-height: 1.15;
  text-align: center;
}

.project-bookings-group-head > div {
  width: 100%;
}

.project-bookings-group-metrics {
  display: grid;
  gap: 0;
  align-content: start;
  border: 1px solid #edf2f7;
  border-radius: 14px;
  overflow: hidden;
  background: #fbfdff;
}

.project-bookings-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
}

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

.project-bookings-metric-row-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-bookings-metric-row + .project-bookings-metric-row {
  border-top: 1px solid #edf2f7;
}

.project-bookings-metric-row-single {
  grid-template-columns: 1fr;
}

.project-bookings-metric-block {
  display: grid;
  gap: 6px;
  padding: 12px 10px;
  min-width: 0;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.project-bookings-metric-block + .project-bookings-metric-block {
  border-left: 1px solid #edf2f7;
}

.project-bookings-metric-block span {
  color: #62748c;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 600;
  white-space: normal;
  text-align: center;
}

.project-bookings-metric-block strong {
  color: #10284f;
  font-size: 23px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-align: center;
}

.project-bookings-metric-block strong.success {
  color: #15803d;
}

.project-bookings-metric-block strong.warning {
  color: #c27000;
}

.project-bookings-metric-block strong.danger {
  color: #cf3d32;
}

.booking-overview-grid {
  grid-template-columns: 1fr;
}

.unit-sales-overview-grid,
.financial-summary-grid {
  grid-template-columns: 1fr;
}

.project-bookings-filter-row {
  display: grid;
  grid-template-columns: minmax(300px, 3fr) repeat(3, minmax(150px, 1.05fr)) minmax(150px, 1fr) minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.project-bookings-filter-row label {
  min-width: 0;
}

.project-bookings-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.project-bookings-list-card,
.project-bookings-preview-card {
  padding: 10px;
}

.project-bookings-list-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  align-self: stretch;
  justify-self: stretch;
  grid-column: 1 / -1;
}

.project-bookings-preview-card {
  position: sticky;
  top: 88px;
}

#projectBookingDetailsDialog.developer-editor-dialog {
  width: min(980px, calc(100vw - 32px));
  max-width: min(980px, calc(100vw - 32px));
  padding: 0;
  border: none;
  background: transparent;
}

#projectBookingDetailsDialog::backdrop {
  background: rgba(17, 34, 68, 0.3);
  backdrop-filter: blur(3px);
}

.project-booking-details-card {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, calc(100vh - 40px));
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(16, 40, 79, 0.16);
}

.project-booking-details-card .dialog-title {
  flex: 0 0 auto;
  padding: 20px 24px 14px;
  border-bottom: 1px solid #e5edf7;
}

.project-booking-details-card .dialog-title h2 {
  font-size: 24px;
}

.project-booking-details-card .dialog-title p {
  max-width: 720px;
}

.project-booking-details-close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid #d8e3f3;
  background: #f7fbff;
  color: #10284f;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.project-booking-details-close:hover {
  background: #eef5ff;
  border-color: #b9cde9;
}

.project-booking-details-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 18px 24px 24px;
  scroll-padding-bottom: 24px;
}

.project-booking-details-badges {
  margin-top: 0;
}

.project-booking-details-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-bookings-card-head,
.project-bookings-preview-head {
  min-height: 28px;
}

.project-bookings-table-wrap {
  border: 1px solid #e1e8f2;
  border-radius: 10px;
  overflow: auto;
}

.project-bookings-table {
  width: 100%;
  min-width: 980px;
  table-layout: auto;
}

.project-bookings-table th:nth-child(1),
.project-bookings-table td:nth-child(1) {
  width: 13%;
  min-width: 130px;
  white-space: nowrap;
}
.project-bookings-table th:nth-child(2),
.project-bookings-table td:nth-child(2) {
  width: 22%;
  min-width: 180px;
}
.project-bookings-table th:nth-child(3),
.project-bookings-table td:nth-child(3) {
  width: 18%;
  min-width: 170px;
}
.project-bookings-table th:nth-child(4),
.project-bookings-table td:nth-child(4) {
  width: 12%;
  min-width: 128px;
}
.project-bookings-table th:nth-child(5),
.project-bookings-table td:nth-child(5) {
  width: 14%;
  min-width: 148px;
}
.project-bookings-table th:nth-child(6),
.project-bookings-table td:nth-child(6) {
  width: 10%;
  min-width: 120px;
  white-space: nowrap;
}
.project-bookings-table th:nth-child(7),
.project-bookings-table td:nth-child(7) {
  width: 11%;
  min-width: 128px;
}

.project-bookings-table th,
.project-bookings-table td {
  padding: 10px 10px;
  vertical-align: middle;
  font-size: 13px;
}

.project-bookings-table td:nth-child(2),
.project-bookings-table td:nth-child(3) {
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}

.project-bookings-cell-wrap {
  display: block;
}

.project-bookings-table td:nth-child(4),
.project-bookings-table td:nth-child(5),
.project-bookings-table td:nth-child(6) {
  text-align: center;
  white-space: nowrap;
}

.project-bookings-table th:nth-child(7),
.project-bookings-table td:nth-child(7) {
  text-align: right;
  white-space: nowrap;
}

.project-bookings-table th:nth-child(4) .status-badge,
.project-bookings-table td:nth-child(4) .status-badge,
.project-bookings-table th:nth-child(5) .status-badge,
.project-bookings-table td:nth-child(5) .status-badge {
  white-space: nowrap;
  min-width: max-content;
}

.project-empty-cell {
  text-align: center !important;
  vertical-align: middle;
  padding: 32px 16px !important;
  color: #647690;
}

.project-bookings-preview-ref {
  font-size: 16px;
  font-weight: 800;
}

.project-bookings-preview-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

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

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

.project-bookings-preview-grid div {
  display: grid;
  gap: 4px;
  padding: 5px 0;
  border-bottom: 1px solid #eef3f8;
}

.project-bookings-preview-grid span {
  color: #647690;
  font-size: 11px;
}

.project-bookings-preview-grid strong {
  color: #10284f;
  font-size: 12.5px;
}

.project-bookings-status-grid {
  grid-template-columns: 1fr;
}

.project-bookings-status-grid div {
  grid-template-columns: minmax(0, 1fr);
}

.project-bookings-status-grid strong {
  display: inline-flex;
  align-items: center;
}

.project-bookings-preview-section {
  margin-top: 8px;
  padding-top: 8px;
}

.project-bookings-preview-actions,
.project-bookings-preview-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-bookings-preview-actions .ghost-btn,
.project-bookings-preview-links .text-link-btn {
  width: 100%;
  min-height: 36px;
  justify-content: center;
}

.project-bookings-preview-card h4 {
  margin: 0 0 6px;
  font-size: 13px;
}

.project-bookings-preview-card .sales-booking-status {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}

@media (max-width: 1520px) {
  .project-bookings-group-card {
    min-height: 118px;
  }

  .project-bookings-metric-block strong {
    font-size: 18px;
  }

  .project-bookings-filter-row {
    grid-template-columns: minmax(260px, 2.5fr) repeat(3, minmax(132px, 1fr)) minmax(138px, 0.95fr) minmax(138px, 0.95fr) auto;
  }}

@media (max-width: 1366px) {
  .project-bookings-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-bookings-group-card {
    min-height: 112px;
    padding: 10px 12px;
  }

  .project-bookings-group-head {
    gap: 10px;
  }

  .project-bookings-group-head h3 {
    font-size: 15px;
  }

  .project-bookings-metric-block strong {
    font-size: 16px;
  }

  .project-bookings-metric-block {
    padding: 10px 8px;
  }

  .project-bookings-filter-row {
    grid-template-columns: minmax(230px, 2.25fr) repeat(3, minmax(112px, 1fr)) minmax(122px, 0.9fr) minmax(122px, 0.9fr) auto;
  }

  .project-bookings-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }}

@media (max-width: 1180px) {
  .project-bookings-summary-grid {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }

  .project-bookings-filter-row {
    grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(150px, 1fr));
  }}

@media (max-width: 1080px) {
  .project-bookings-summary-grid,
  .project-bookings-main-grid,
  .project-bookings-filter-row {
    grid-template-columns: 1fr;
  }

  .project-bookings-preview-card {
    position: static;
  }}

@media (max-width: 860px) {
  .project-bookings-metric-block strong {
    font-size: 24px;
  }

  .booking-overview-grid,
  .project-bookings-preview-grid,
  .project-booking-details-grid,
  .project-bookings-preview-grid.compact,
  .project-bookings-preview-actions,
  .project-bookings-preview-links {
    grid-template-columns: 1fr;
  }

  #projectBookingDetailsDialog.developer-editor-dialog {
    width: min(calc(100vw - 20px), 1000px);
    max-width: min(calc(100vw - 20px), 1000px);
  }

  .project-booking-details-card .dialog-title,
  .project-booking-details-modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .project-bookings-table-wrap {
    overflow: auto;
  }

  .project-bookings-table {
    min-width: 980px;
    table-layout: auto;
  }}

.booking-action-menu {
  position: relative;
}

.booking-action-menu summary {
  list-style: none;
}

.booking-action-menu summary::-webkit-details-marker {
  display: none;
}

.booking-action-menu .icon-only {
  min-width: 38px;
  padding: 8px 10px;
}

.booking-action-menu[open] .booking-action-menu-list {
  display: grid;
}

.booking-action-menu-list {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  padding: 8px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(20, 35, 61, 0.14);
  z-index: 20;
}

.booking-action-menu-list button {
  background: transparent;
  border: 0;
  color: #163056;
  min-height: 34px;
  border-radius: 7px;
  text-align: left;
  padding: 8px 10px;
  box-shadow: none;
  transform: none;
}

.booking-action-menu-list button:hover:not(:disabled) {
  background: #f5f8fd;
}

.booking-action-menu-list button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 1260px) {
  .members-workspace-shell > .members-page-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .members-filter-row {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

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

  .developer-reports-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .developer-reports-filter-row {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .project-bookings-filter-row {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .developer-documents-filter-row {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

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

  .project-bookings-main-grid {
    grid-template-columns: 1fr;
  }

  .developer-reports-main-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 1100px) {

  .project-treasury-table th:nth-child(4),
  .project-treasury-table td:nth-child(4) {
    width: 22%;
  }}

@media (max-width: 760px) {
  .members-page-head,
  .members-page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .members-page-summary,
  .members-filter-row {
    grid-template-columns: 1fr;
  }

  .members-workspace-shell > .members-page-summary {
    grid-template-columns: 1fr;
  }

  .developer-reports-summary,
  .developer-reports-support-grid,
  .developer-documents-summary-grid,
  .developer-reports-filter-row,
  .developer-documents-filter-row,
  .project-bookings-kpis,
  .project-bookings-filter-row,
  .project-bookings-preview-grid,
  .project-bookings-preview-actions,
  .project-bookings-preview-links {
    grid-template-columns: 1fr;
  }

  .project-payments-kpis,
  .project-refunds-kpis,
  .project-documents-kpis,
  .project-payments-filter-row,
  .project-treasury-filter-row,
  .developer-payments-kpis,
  .developer-payments-filter-row,
  .project-payments-summary-tabs,
  .project-payments-modal-metrics {
    grid-template-columns: 1fr;
  }

  .project-treasury-table {
    table-layout: auto;
  }

  .project-treasury-table-wrap {
    overflow-x: auto;
  }

  .project-bookings-summary-head,
  .project-bookings-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .tally-filter-side {
    grid-template-columns: 1fr;
  }

  .tally-filter-buttons {
    grid-template-columns: 1fr;
    padding-top: 0;
  }}

#projectDocTemplateDialog .developer-dialog-card {
  max-width: 720px;
}

.project-doc-template-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.project-doc-template-file-error { display: block; margin-top: 6px; color: #ad2727; font-size: 12px; }

/* Existing-template picker only. */
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .modal-shell { width: min(94vw, 920px); height: min(640px, calc(100vh - 40px)); max-height: calc(100vh - 40px); }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .modal-card { display: flex; flex-direction: column; height: 100%; min-width: 0; overflow: hidden; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-header,
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-footer { flex: 0 0 auto; padding: 16px 20px; background: #fff; z-index: 1; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-header { border-bottom: 1px solid #e5edf6; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-header h2 { margin: 0; color: #10284f; font-size: 20px; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-header p { margin: 4px 0 0; color: #687b95; font-size: 13px; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 20px; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-shell { display: grid; gap: 12px; min-width: 0; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(170px, 240px); gap: 10px; align-items: center; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-actions { display: flex; gap: 5px; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-breadcrumb { display: flex; gap: 5px; min-width: 0; overflow: hidden; white-space: nowrap; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-breadcrumb button { max-width: 150px; overflow: hidden; border: 0; background: transparent; color: #1c5eab; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] [data-template-file-picker-search] { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 11px; border: 1px solid #d7e2f0; border-radius: 9px; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-list { display: grid; gap: 7px; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid #dce7f3; border-radius: 10px; background: #fbfdff; color: #18345b; text-align: left; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-row:hover,
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-row.is-selected { border-color: #a9c8ed; background: #eef6ff; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-row span:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-row small { color: #71839b; font-size: 11px; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-error { padding: 9px 10px; border-radius: 8px; background: #fff0f0; color: #ad2727; font-size: 12px; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-state { padding: 26px 12px; color: #687b95; text-align: center; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid #e5edf6; color: #60738e; font-size: 12px; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-footer > div { display: flex; gap: 8px; }
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] button:focus-visible,
.modal-overlay[data-modal-id="projectTemplateFilePickerModal"] input:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }
@media (max-width: 700px) {
  .modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .modal-shell { height: calc(100vh - 24px); max-height: calc(100vh - 24px); }
  .modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .modal-overlay[data-modal-id="projectTemplateFilePickerModal"] [data-template-file-picker-search] { grid-column: 1 / -1; }
  .modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-header,
  .modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-body,
  .modal-overlay[data-modal-id="projectTemplateFilePickerModal"] .project-template-file-picker-footer { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 1180px) {
  .project-doc-config-top {
    grid-template-columns: 1fr;
  }

  .tally-filter-side {
    grid-column: 1 / -1;
  }}

@media (max-width: 720px) {
  .project-doc-tag-grid {
    grid-template-columns: 1fr;
  }

  .project-doc-folder-input-row,
  .project-doc-template-file-row {
    grid-template-columns: 1fr;
  }

  .project-doc-config-actions,
  .project-doc-config-table-head,
  .project-doc-config-card-head {
    flex-direction: column;
    align-items: stretch;
  }}

.amount-due,
.text-danger,
.negative-value,
.overdue-value {
  color: #c03632 !important;
}

.amount-received,
.amount-excess,
.text-success,
.positive-value {
  color: #18794e !important;
}

.amount-gold,
.text-gold,
.highlight-amount {
  color: var(--gold) !important;
}

.feature-icon,
.icon-badge,
.summary-icon,
.metric-icon,
.toolbar-icon,
.status-icon-wrap,
.panel-icon {
  background: #f5f8fe;
  color: var(--navy);
}

.feature-gold,
.gold-icon-bg {
  background: var(--gold-soft);
  color: var(--gold);
}

.feature-blue,
.feature-green,
.feature-purple,
.blue-icon-bg,
.green-icon-bg,
.purple-icon-bg {
  background: #f5f8fe;
  color: var(--navy);
}

.partner-avatar,
.avatar-circle,
.profile-avatar,
.member-avatar {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
}

.table-warning-row td,
.warning-banner,
.allocation-warning,
.inline-warning {
  background: #fffaf0;
  border-color: #f0d18b;
}

.note-banner,
.helper-note,
.footnote-card {
  background: #fffdf7;
  border-color: #f1e0ae;
}

/* Developer dashboard */
.dashboard-header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-header-controls.hidden {
  display: none;
}

.dashboard-header-profile-wrap {
  position: relative;
}

.dashboard-header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.dashboard-header-profile:hover,
.dashboard-header-profile[aria-expanded="true"] {
  border-color: rgba(184, 134, 11, 0.34);
  box-shadow: 0 10px 24px rgba(8, 20, 42, 0.08);
  background: #fffdf8;
}

.dashboard-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.dashboard-header-profile-copy {
  display: grid;
  gap: 2px;
}

.dashboard-header-profile-copy strong {
  color: var(--navy);
  font-size: 13px;
}

.dashboard-header-profile-copy span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-header-profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(8, 20, 42, 0.12);
  z-index: 35;
}

.dashboard-header-profile-menu.hidden {
  display: none;
}

.dashboard-header-profile-menu-item {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--navy);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.dashboard-header-profile-menu-item:hover {
  background: rgba(10, 31, 68, 0.06);
}

.dashboard-header-profile-menu-item.danger {
  color: #b53431;
}

.dashboard-header-profile-menu-item.danger:hover {
  background: rgba(181, 52, 49, 0.08);
}

.developer-dashboard-root {
  display: grid;
  gap: 16px;
}

.developer-dashboard-loading-shell {
  min-height: 360px;
}

.developer-kpi-grid-skeleton .developer-kpi-icon,
.skeleton-line {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #edf2f7 0%, #f7f9fc 50%, #edf2f7 100%);
  background-size: 220px 100%;
  animation: dashboard-skeleton 1.25s linear infinite;
  color: transparent !important;
}

.skeleton-line {
  display: block;
  height: 12px;
  border-radius: 999px;
}

.skeleton-line.short {
  width: 42%;
}

.skeleton-line.medium {
  width: 68%;
  height: 20px;
}

.developer-kpi-skeleton small {
  display: block;
}

@keyframes dashboard-skeleton {
  0% { background-position: -220px 0; }
  100% { background-position: 220px 0; }
}

.developer-dashboard-shell {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: none;
  align-self: stretch;
}

.developer-dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.developer-dashboard-hero h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
}

.developer-dashboard-hero p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.developer-kpi-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 154px;
}

.developer-kpi-card.tone-danger strong {
  color: #c03632;
}

.developer-kpi-card.tone-success strong {
  color: #18794e;
}

.developer-kpi-card.tone-warn strong {
  color: #9a6700;
}

.developer-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--navy-wash);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.developer-kpi-icon svg {
  width: 18px;
  height: 18px;
}

.developer-kpi-copy,
.developer-kpi-group-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
  flex: 1;
}

.developer-kpi-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.developer-kpi-copy strong {
  color: var(--navy);
  font-size: 18px;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.developer-kpi-copy strong em {
  color: var(--gold);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.developer-kpi-link {
  width: fit-content;
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.developer-kpi-link:hover {
  color: var(--gold);
  background: transparent;
  box-shadow: none;
}

.developer-kpi-group-head span {
  color: var(--navy);
  font-size: 16px;
  font-weight: 800;
}

.developer-kpi-group-list {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.developer-kpi-group-row {
  border: 0;
  background: transparent;
  padding: 6px 8px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  min-width: 0;
  box-shadow: none;
  cursor: pointer;
}

.developer-kpi-group-row:hover {
  background: rgba(10, 31, 68, 0.04);
}

.developer-kpi-group-row-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.developer-kpi-group-row-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.developer-kpi-group-row strong {
  color: var(--navy);
  font-size: 16px;
  line-height: 1.05;
  white-space: nowrap;
  text-align: right;
}

.developer-kpi-group-row.tone-danger strong { color: #c03632; }
.developer-kpi-group-row.tone-success strong { color: #18794e; }
.developer-kpi-group-row.tone-warn strong { color: #9a6700; }

.developer-kpi-group-row-chevron {
  color: #7a8ba5;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.18s ease, color 0.18s ease;
}

.developer-kpi-group-row:hover .developer-kpi-group-row-chevron {
  color: #13795b;
  transform: translateX(2px);
}

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

.developer-table-card,
.developer-partner-overview {
  grid-column: span 1;
}

.developer-dashboard-full-width-card {
  width: 100%;
  max-width: none;
  align-self: stretch;
  justify-self: stretch;
  grid-column: 1 / -1;
  min-width: 0;
  flex: 1 1 auto;
}

.developer-projects-overview-card,
.developer-quick-actions {
  width: 100%;
  max-width: none;
  align-self: stretch;
  justify-self: stretch;
  grid-column: 1 / -1;
  min-width: 0;
}

.developer-table-card .text-link-btn {
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.developer-donut-layout {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 4px 10px 8px;
}

.developer-donut-chart {
  width: 124px;
  height: 124px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.developer-donut-center {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: inset 0 0 0 1px var(--line);
}

.developer-donut-center strong {
  color: var(--navy);
  font-size: 16px;
  line-height: 1;
}

.developer-donut-center span {
  color: var(--muted);
  font-size: 10px;
}

.developer-donut-legend {
  display: grid;
  gap: 6px;
}

.developer-legend-btn {
  min-height: 34px;
  padding: 6px 10px;
}

.developer-donut-legend div,
.developer-bar-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.developer-donut-legend strong {
  margin-left: auto;
  color: var(--navy);
}

.legend-sold,
.legend-unsold,
.legend-hold,
.legend-pending {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-sold { background: var(--green); }
.legend-unsold { background: var(--gold); }
.legend-hold { background: #8f9db5; }
.legend-pending { background: #c03632; }

.developer-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 180px;
  padding: 12px 16px 0;
}

.developer-bar-group {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.developer-bar-stack {
  min-height: 150px;
  display: flex;
  align-items: end;
  gap: 5px;
}

.developer-bar-stack span {
  width: 12px;
  border-radius: 999px 999px 4px 4px;
  display: inline-block;
}

.bar-collected { background: var(--green); }
.bar-pending { background: #f2a9a5; }

.developer-bar-group small {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.developer-bar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 0 16px 16px;
}

.developer-partner-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 16px 16px;
}

.developer-partner-cards article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.developer-partner-cards span {
  color: var(--muted);
  font-size: 12px;
}

.developer-partner-cards strong {
  color: var(--navy);
  font-size: 20px;
}

.developer-recent-list {
  display: grid;
  gap: 10px;
  padding: 10px 16px 16px;
}

.developer-recent-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  text-align: left;
  box-shadow: none;
}

.developer-recent-item strong {
  color: var(--navy);
  font-size: 14px;
}

.developer-recent-item span,
.developer-recent-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.developer-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 16px 16px;
}

.developer-quick-grid button {
  min-height: 64px;
  border-radius: 14px;
  font-weight: 700;
}

.project-settings-quick-grid {
  padding: 8px 16px 14px;
}

.project-settings-quick-grid button {
  min-height: 56px;
}

.developer-quick-grid-compact {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  padding: 4px 10px 10px;
}

.developer-quick-grid-compact button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  text-align: center;
  border-radius: 12px;
}

.developer-quick-grid-compact button span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #13795b;
  flex-shrink: 0;
}

.developer-quick-grid-compact button span svg {
  width: 18px;
  height: 18px;
}

.developer-quick-grid-compact button strong {
  color: var(--navy);
  font-size: 11px;
  line-height: 1.25;
}

.developer-dashboard-projects-table th:nth-child(3),
.developer-dashboard-projects-table th:nth-child(4),
.developer-dashboard-projects-table th:nth-child(5),
.developer-dashboard-projects-table th:nth-child(6),
.developer-dashboard-projects-table td:nth-child(3),
.developer-dashboard-projects-table td:nth-child(4),
.developer-dashboard-projects-table td:nth-child(5),
.developer-dashboard-projects-table td:nth-child(6) {
  text-align: center;
  width: 74px;
}

.developer-dashboard-projects-table td:nth-child(7),
.developer-dashboard-projects-table th:nth-child(7),
.developer-dashboard-projects-table td:nth-child(8),
.developer-dashboard-projects-table th:nth-child(8) {
  text-align: right;
  width: 124px;
}

.developer-dashboard-projects-table td:last-child,
.developer-dashboard-projects-table th:last-child {
  width: 118px;
  text-align: center;
}

.developer-dashboard-projects-table td.developer-dashboard-action-col,
.developer-dashboard-projects-table th.developer-dashboard-action-col {
  width: 104px;
  text-align: center;
}

.developer-dashboard-projects-table td.developer-dashboard-action-col {
  white-space: nowrap;
}

.developer-dashboard-action-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.developer-dashboard-projects-table .table-action-btn.icon-only {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  vertical-align: middle;
}

.developer-dashboard-projects-table th,
.developer-dashboard-projects-table td {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 12.5px;
}

.developer-dashboard-projects-table .table-action-btn {
  min-height: 34px;
  padding: 6px 12px;
}

.developer-bank-balance-link {
  font-weight: 700;
  color: var(--navy);
}

.developer-bank-balance-dialog {
  width: min(520px, 92vw);
}

.developer-bank-balance-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.developer-bank-balance-row,
.developer-bank-balance-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.developer-bank-balance-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.developer-bank-balance-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

.developer-bank-balance-total {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.empty-dashboard-state {
  padding: 24px;
}

/* Developer dashboard refresh */
.developer-dashboard-shell {
  gap: 12px;
  min-width: 0;
  padding: 0;
}

.developer-dashboard-shell > .content-card,
.developer-dashboard-shell .content-card {
  max-width: none;
  width: 100%;
}

.developer-dashboard-hero-band,
.developer-dashboard-summary-grid,
.developer-dashboard-main-grid,
.developer-dashboard-action-dock,
.developer-dashboard-portfolio-table,
.developer-dashboard-portfolio-body,
.developer-dashboard-side-stack,
.developer-dashboard-health-grid,
.developer-dashboard-attention-list,
.developer-dashboard-action-dock-row {
  min-width: 0;
  box-sizing: border-box;
}

.developer-dashboard-hero-band {
  min-height: 112px;
  padding: 11px 18px;
  border-radius: 14px;
  background: linear-gradient(90deg, #092347 0%, #0b2d5b 58%, #0b2d5b 100%);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(620px, 0.98fr);
  gap: 14px;
  align-items: center;
  box-shadow: 0 14px 28px rgba(8, 22, 46, 0.14);
}

.developer-dashboard-hero-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.developer-dashboard-hero-eyebrow {
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
}

.developer-dashboard-hero-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.developer-dashboard-hero-band h2 {
  margin: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.1;
}

.developer-dashboard-hero-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.25;
}

.developer-dashboard-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 15px;
  border-radius: 999px;
  background: #f2fbf4;
  color: #14603f;
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(20, 96, 63, 0.08);
}

.developer-dashboard-hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #1f9d61;
}

.developer-dashboard-hero-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  align-self: center;
  min-width: 0;
}

.developer-dashboard-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(118px, auto));
  width: auto;
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  align-items: center;
}

.developer-dashboard-hero-stat {
  padding: 0 28px 0 0;
  min-width: 0;
}

.developer-dashboard-hero-stat + .developer-dashboard-hero-stat {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  padding-left: 28px;
}

.developer-dashboard-hero-stat span {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  margin-bottom: 8px;
}

.developer-dashboard-hero-stat strong {
  display: block;
  color: #fff;
  font-size: 18px;
  line-height: 1.05;
  white-space: nowrap;
}

.developer-dashboard-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: auto;
  flex: 0 0 auto;
  margin-top: 0;
}

.developer-dashboard-hero-btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.developer-dashboard-hero-btn svg,
.developer-dashboard-dock-btn span svg,
.developer-dashboard-primary-dock-btn span svg,
.developer-dashboard-health-icon svg,
.developer-dashboard-card-icon svg,
.developer-dashboard-project-icon svg,
.developer-dashboard-more-menu summary svg,
.developer-dashboard-row-menu summary svg {
  width: 18px;
  height: 18px;
}

.developer-dashboard-more-menu summary {
  min-width: 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.developer-dashboard-summary-card,
.developer-dashboard-side-card,
.developer-dashboard-portfolio-card,
.developer-dashboard-action-dock {
  padding: 14px 16px;
  border-radius: 14px;
  min-width: 0;
}

.developer-dashboard-summary-card {
  display: grid;
  align-content: start;
  gap: 11px;
  min-height: 202px;
}

.developer-dashboard-card-head,
.developer-dashboard-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.developer-dashboard-card-title-wrap,
.developer-dashboard-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.developer-dashboard-card-title-wrap h3,
.developer-dashboard-section-title h2 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.2;
}

.developer-dashboard-section-title span {
  color: var(--muted);
  font-size: 13px;
}

.developer-dashboard-card-icon,
.developer-dashboard-health-icon,
.developer-dashboard-project-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #eef4ff;
  color: #11376f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.developer-dashboard-card-chevron {
  border: 0;
  background: transparent;
  color: #72819a;
  box-shadow: none;
  min-height: 24px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.developer-dashboard-card-chevron:hover {
  background: transparent;
  color: var(--navy);
  box-shadow: none;
}

.developer-dashboard-inventory-main,
.developer-dashboard-bank-partner-main {
  display: grid;
  grid-template-columns: minmax(108px, 0.82fr) minmax(0, 1.18fr);
  gap: 8px;
  align-items: start;
}

.developer-dashboard-inventory-main > div:first-child span,
.developer-dashboard-bank-balance-block small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.developer-dashboard-inventory-main > div:first-child strong,
.developer-dashboard-bank-balance-block strong {
  display: block;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.05;
}

.developer-dashboard-inventory-side,
.developer-dashboard-summary-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.developer-dashboard-inventory-side--with-divider,
.developer-dashboard-summary-list--partner {
  border-left: 1px solid #e7edf6;
  padding-left: 14px;
}

.developer-dashboard-inline-metric,
.developer-dashboard-summary-row,
.developer-dashboard-bank-balance-block {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  min-height: 0;
  color: inherit;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  text-align: left;
}

.developer-dashboard-inline-metric,
.developer-dashboard-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.developer-dashboard-bank-balance-block {
  display: grid;
  align-content: start;
  justify-content: start;
  justify-items: start;
  gap: 2px;
  padding-top: 4px;
}

.developer-dashboard-inline-metric:hover,
.developer-dashboard-summary-row:hover,
.developer-dashboard-bank-balance-block:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.developer-dashboard-inline-metric small,
.developer-dashboard-summary-row small {
  color: var(--muted);
  font-size: 10px;
}

.developer-dashboard-inline-metric strong,
.developer-dashboard-summary-row strong {
  color: var(--navy);
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
}

.developer-dashboard-inline-metric small,
.developer-dashboard-summary-row small {
  min-width: 0;
  white-space: normal;
}

.developer-dashboard-inline-metric strong {
  text-align: right;
  min-width: max-content;
}

.developer-dashboard-summary-row strong {
  text-align: right;
  min-width: max-content;
}

.developer-dashboard-inventory-side .developer-dashboard-inline-metric strong {
  font-size: 10px;
  letter-spacing: -0.01em;
}

.developer-dashboard-summary-list--partner .developer-dashboard-summary-row {
  grid-template-columns: minmax(0, 72px) auto;
  gap: 8px;
}

.developer-dashboard-summary-list--partner .developer-dashboard-summary-row small {
  line-height: 1.15;
}

.developer-dashboard-summary-list--partner .developer-dashboard-summary-row strong {
  font-size: 10px;
  letter-spacing: -0.01em;
}

.developer-dashboard-inline-metric.tone-success strong,
.developer-dashboard-summary-row.tone-success strong {
  color: #13795b;
}

.developer-dashboard-inline-metric.tone-warn strong,
.developer-dashboard-summary-row.tone-warn strong {
  color: #d97706;
}

.developer-dashboard-inline-metric.tone-danger strong,
.developer-dashboard-summary-row.tone-danger strong {
  color: #c03632;
}

.developer-dashboard-progress {
  height: 10px;
  border-radius: 999px;
  background: #e7ecf3;
  display: flex;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(14, 35, 74, 0.04);
}

.developer-dashboard-progress span {
  display: block;
  height: 100%;
}

.developer-dashboard-progress-sold { background: #1b9d65; }
.developer-dashboard-progress-available { background: #f39b1f; }
.developer-dashboard-progress-hold { background: #cfd7e4; }

.developer-dashboard-card-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.developer-dashboard-card-note.is-good {
  color: #13795b;
  font-weight: 700;
}

.developer-dashboard-card-note.is-alert {
  color: #c03632;
  font-weight: 700;
}

.developer-dashboard-card-footer-links,
.developer-dashboard-side-footer,
.developer-dashboard-portfolio-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 2px;
}

.developer-dashboard-card-footer-links {
  padding-top: 8px;
  border-top: 1px solid #edf2f8;
  justify-content: space-between;
}

.developer-dashboard-card-footer-links .text-link-btn {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d9e3f2;
  border-radius: 12px;
  color: #2563eb;
  font-weight: 600;
  flex: 1 1 0;
  justify-content: center;
  white-space: nowrap;
  font-size: 12px;
}

.developer-dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
}

.developer-dashboard-main-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.developer-dashboard-portfolio-card,
.developer-dashboard-side-card {
  align-self: start;
}

.developer-dashboard-side-stack {
  display: grid;
  grid-template-rows: minmax(0, auto) minmax(0, auto);
  gap: 12px;
}

.developer-dashboard-portfolio-table {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.developer-dashboard-portfolio-head,
.developer-dashboard-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(86px, 0.74fr) minmax(126px, 0.96fr) minmax(104px, 0.82fr) minmax(102px, 0.88fr) minmax(102px, 0.88fr) minmax(84px, 0.72fr) 40px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.developer-dashboard-portfolio-head {
  padding: 0 0 6px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.developer-dashboard-portfolio-body {
  display: grid;
  gap: 2px;
}

.developer-dashboard-portfolio-footer {
  margin-top: 2px;
}

.developer-dashboard-project-row {
  padding: 8px 0;
  border-bottom: 1px solid #edf1f6;
  cursor: pointer;
}

.developer-dashboard-project-row:last-child {
  border-bottom: 0;
}

.developer-dashboard-project-row:hover {
  background: rgba(10, 31, 68, 0.02);
}

.developer-dashboard-project-cell {
  min-width: 0;
  font-size: 13px;
  color: var(--navy);
}

.developer-dashboard-project-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.developer-dashboard-project-copy {
  min-width: 0;
}

.developer-dashboard-project-copy strong,
.developer-dashboard-project-metric,
.developer-dashboard-project-progress-text {
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

.developer-dashboard-project-copy strong {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.2;
}

.developer-dashboard-project-cell small {
  display: flex;
  gap: 8px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.developer-dashboard-project-progress-bar {
  margin-top: 6px;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #e9eef5;
  overflow: hidden;
}

.developer-dashboard-project-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b9d65 0%, #0f7a4d 100%);
}

.developer-dashboard-project-money {
  font-weight: 600;
  white-space: nowrap;
  font-size: 13px;
}

.developer-dashboard-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 10px;
  border: 1px solid #d6e3f5;
  background: #f5f8ff;
  color: #18457f;
  font-size: 11px;
  font-weight: 700;
}

.developer-dashboard-project-icon.tone-residential,
.developer-dashboard-type-pill.tone-residential {
  background: #eef8f1;
  border-color: #d5eadc;
  color: #1a7a50;
}

.developer-dashboard-project-icon.tone-commercial,
.developer-dashboard-type-pill.tone-commercial {
  background: #eef4ff;
  border-color: #d6e3f5;
  color: #18457f;
}

.developer-dashboard-project-icon.tone-industrial,
.developer-dashboard-type-pill.tone-industrial {
  background: #fff6e8;
  border-color: #f4dfb5;
  color: #99620f;
}

.developer-dashboard-project-icon.tone-mixed,
.developer-dashboard-type-pill.tone-mixed {
  background: #f1efff;
  border-color: #ddd8ff;
  color: #5b48a8;
}

.developer-dashboard-project-actions-cell,
.developer-dashboard-row-menu summary {
  justify-self: end;
}

.developer-dashboard-row-menu summary {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.developer-dashboard-attention-list,
.developer-dashboard-health-grid {
  display: grid;
  gap: 8px;
}

.developer-dashboard-attention-row,
.developer-dashboard-health-item {
  min-height: 0;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  display: grid;
  gap: 4px;
  text-align: left;
}

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

.developer-dashboard-attention-row span,
.developer-dashboard-health-item small {
  color: var(--navy);
  font-size: 12px;
}

.developer-dashboard-attention-row strong {
  color: var(--navy);
  font-size: 13px;
  white-space: nowrap;
}

.developer-dashboard-attention-row small {
  color: #2563eb;
  font-size: 11px;
}

.developer-dashboard-attention-row.tone-danger {
  border-left: 4px solid #e04646;
}

.developer-dashboard-attention-row.tone-warn {
  border-left: 4px solid #f39b1f;
}

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

.developer-dashboard-health-item {
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.developer-dashboard-health-item strong {
  display: block;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.05;
  margin-top: 2px;
}

.developer-dashboard-action-dock {
  padding: 12px 14px;
  width: 100%;
}

.developer-dashboard-action-dock-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.1fr) repeat(4, minmax(0, 1fr)) minmax(112px, 0.7fr);
  gap: 10px;
  align-items: center;
}

.developer-dashboard-primary-dock-btn,
.developer-dashboard-dock-btn {
  min-height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-weight: 600;
  white-space: nowrap;
  font-size: 13px;
}

.developer-dashboard-primary-dock-btn {
  background: #fff;
  border-color: #d9e3f2;
  color: var(--navy);
}

.developer-dashboard-dock-btn {
  color: var(--navy);
}

.developer-dashboard-dock-more {
  width: 100%;
}

.developer-dashboard-dock-more summary {
  list-style: none;
}

.developer-dashboard-dock-more summary::-webkit-details-marker {
  display: none;
}

.developer-dashboard-dock-more-btn {
  width: 100%;
}

.developer-portfolio-account-row {
  align-items: center;
}

.developer-portfolio-account-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.developer-portfolio-account-actions strong {
  min-width: 120px;
  text-align: right;
}

@media (max-width: 1400px) {
  .developer-dashboard-hero-band {
    grid-template-columns: minmax(0, 1.38fr) minmax(360px, 0.92fr);
    gap: 10px;
  }

  .developer-dashboard-project-row,
  .developer-dashboard-portfolio-head {
    grid-template-columns: minmax(0, 1.28fr) minmax(78px, 0.66fr) minmax(112px, 0.86fr) minmax(90px, 0.72fr) minmax(88px, 0.76fr) minmax(88px, 0.76fr) minmax(68px, 0.52fr) 36px;
    gap: 7px;
  }

  .developer-dashboard-action-dock-row {
    grid-template-columns: minmax(154px, 1fr) repeat(4, minmax(0, 1fr)) 100px;
  }
}

@media (max-width: 1280px) {
  .developer-dashboard-hero-band {
    padding: 12px 14px;
    grid-template-columns: minmax(0, 1.32fr) minmax(330px, 0.9fr);
  }

  .developer-dashboard-summary-grid {
    gap: 10px;
  }

  .developer-dashboard-summary-card,
  .developer-dashboard-side-card,
  .developer-dashboard-portfolio-card,
  .developer-dashboard-action-dock {
    padding: 13px 14px;
  }

  .developer-dashboard-project-row,
  .developer-dashboard-portfolio-head {
    grid-template-columns: minmax(0, 1.18fr) minmax(74px, 0.62fr) minmax(104px, 0.8fr) minmax(86px, 0.68fr) minmax(84px, 0.72fr) minmax(84px, 0.72fr) minmax(64px, 0.48fr) 34px;
    gap: 6px;
  }

  .developer-dashboard-action-dock-row {
    grid-template-columns: minmax(148px, 1fr) repeat(4, minmax(0, 1fr)) 96px;
    gap: 8px;
  }
}

@media (max-width: 1024px) {
  .developer-dashboard-hero-band,
  .developer-dashboard-summary-grid,
  .developer-dashboard-main-grid,
  .developer-dashboard-health-grid,
  .developer-dashboard-action-dock-row {
    grid-template-columns: 1fr;
  }

  .developer-dashboard-hero-side,
  .developer-dashboard-hero-actions {
    justify-items: stretch;
    justify-content: flex-start;
  }

  .developer-dashboard-hero-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .developer-dashboard-hero-stat {
    padding: 0;
  }

  .developer-dashboard-hero-stat + .developer-dashboard-hero-stat {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 10px;
  }

  .developer-dashboard-project-row,
  .developer-dashboard-portfolio-head {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .developer-dashboard-project-actions-cell,
  .developer-dashboard-row-menu summary {
    justify-self: start;
  }
}

@media (max-width: 1200px) {
  .developer-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .developer-quick-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }}

@media (max-width: 980px) {
  .dashboard-header-controls {
    justify-content: flex-start;
  }

  .developer-kpi-grid {
    grid-template-columns: 1fr;
  }

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

  .developer-bars {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

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

  .developer-kpi-card {
    min-height: auto;
  }}

/* Project dashboard */
.project-dashboard-root {
  display: grid;
}

.project-dashboard-shell {
  display: grid;
  gap: 16px;
}

.context-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.app-breadcrumb {
  margin: 8px 0 0 72px;
  min-height: 22px;
}

.context-breadcrumb button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.context-breadcrumb button.active,
.context-breadcrumb button:hover {
  color: var(--navy);
}

.developer-scope-shell {
  display: grid;
}

.developer-scope-card {
  display: grid;
  gap: 16px;
}

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

.developer-scope-stat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.developer-scope-stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.developer-scope-stat strong {
  color: var(--navy-900);
  font-size: 20px;
}

.developer-documents-page-card {
  gap: 14px;
}

.developer-documents-summary-grid .developer-scope-stat {
  display: grid;
  gap: 4px;
  text-align: left;
  min-height: 96px;
  padding: 16px 18px;
  align-content: center;
}

.developer-documents-summary-grid .developer-scope-stat small {
  color: var(--muted);
  font-size: 11px;
}

.developer-documents-kpi {
  cursor: pointer;
  color: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.developer-documents-page .developer-document-kpi-label,
.developer-documents-page .developer-documents-kpi span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  opacity: 1;
  visibility: visible;
}

.developer-documents-page .developer-document-kpi-value,
.developer-documents-page .developer-documents-kpi strong {
  color: var(--navy);
  font-size: 24px;
  line-height: 1.1;
  opacity: 1;
  visibility: visible;
}

.developer-documents-kpi:hover {
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.developer-documents-kpi:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.24);
  outline-offset: 2px;
}

.developer-documents-page .developer-documents-kpi.is-active {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 1px rgba(30, 64, 175, 0.08);
  background: var(--navy);
  background-color: var(--navy);
}

.developer-documents-page .developer-documents-kpi.is-active:hover,
.developer-documents-page .developer-documents-kpi.is-active:focus-visible {
  background: var(--navy);
  background-color: var(--navy);
  border-color: var(--navy-700);
}

.developer-documents-page .developer-documents-kpi.is-active .developer-document-kpi-label,
.developer-documents-page .developer-documents-kpi.is-active span {
  color: rgba(255, 255, 255, 0.8);
}

.developer-documents-page .developer-documents-kpi.is-active .developer-document-kpi-value,
.developer-documents-page .developer-documents-kpi.is-active strong {
  color: #fff;
}

.developer-documents-kpi:disabled {
  cursor: default;
  opacity: 0.7;
}

.developer-documents-filter-card {
  padding: 14px 16px;
}

.developer-documents-filter-row {
  grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(150px, 1fr)) auto;
  margin-bottom: 0;
}

.developer-documents-table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.developer-documents-table-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.developer-documents-register-wrap {
  overflow-x: hidden;
  overflow-y: visible;
}

.developer-documents-register-table {
  width: 100%;
  table-layout: fixed;
}

.developer-documents-register-table th,
.developer-documents-register-table td {
  padding: 12px 10px;
  vertical-align: middle;
}

.developer-documents-register-table th {
  white-space: nowrap;
}

.developer-documents-register-table td:nth-child(2),
.developer-documents-register-table td:nth-child(3) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.developer-documents-register-table td:nth-child(4),
.developer-documents-register-table td:nth-child(5),
.developer-documents-register-table td:nth-child(7),
.developer-documents-register-table td:nth-child(8) {
  white-space: nowrap;
}

.developer-documents-register-table th:nth-child(1) {
  width: 24%;
}

.developer-documents-register-table th:nth-child(2) {
  width: 12%;
}

.developer-documents-register-table th:nth-child(3) {
  width: 14%;
}

.developer-documents-register-table th:nth-child(4) {
  width: 9%;
}

.developer-documents-register-table th:nth-child(5) {
  width: 10%;
}

.developer-documents-register-table th:nth-child(6) {
  width: 11%;
}

.developer-documents-register-table th:nth-child(7) {
  width: 12%;
}

.developer-documents-register-table th:nth-child(8) {
  width: 8%;
}

.developer-documents-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.developer-documents-head h2,
.developer-documents-head p,
.developer-documents-table-head h3 {
  margin: 0;
}

.developer-documents-add-btn {
  white-space: nowrap;
}

.developer-documents-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.developer-documents-name-cell > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.developer-documents-name-cell strong,
.developer-documents-name-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.developer-documents-name-cell small {
  color: var(--muted);
  font-size: 11px;
}

.developer-documents-file-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(15, 23, 42, 0.06);
  color: var(--navy-800);
}

.developer-documents-file-icon.tone-pdf {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.developer-documents-file-icon.tone-image {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.developer-documents-file-icon.tone-doc {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.developer-documents-footer {
  gap: 12px;
}

.developer-documents-actions-cell {
  overflow: visible;
  text-overflow: clip;
}

.developer-documents-menu-trigger {
  min-width: 34px;
  width: 34px;
  padding: 0;
  justify-content: center;
}

.developer-documents-action-menu-layer {
  position: fixed;
  left: -9999px;
  top: -9999px;
  z-index: 130;
  min-width: 164px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 6px;
  display: none;
}

.developer-documents-action-menu-layer.open {
  display: grid;
}

.developer-documents-action-menu-layer button {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--navy-900);
  font-size: 13px;
  text-align: left;
}

.developer-documents-action-menu-layer button:hover:not(:disabled),
.developer-documents-action-menu-layer button:focus-visible {
  background: rgba(15, 23, 42, 0.06);
  outline: none;
}

.developer-documents-action-menu-layer button.danger {
  color: #b91c1c;
}

.developer-documents-action-menu-layer button.danger:hover:not(:disabled),
.developer-documents-action-menu-layer button.danger:focus-visible {
  background: rgba(239, 68, 68, 0.1);
}

/* Compact Developer Documents workspace */
.developer-documents-page {
  --dd-navy: #0b1f3a;
  --dd-navy-2: #15375f;
  --dd-gold: #c59a32;
  --dd-gold-soft: #fff7e3;
  --dd-line: #dde4ec;
  --dd-muted: #65748a;
  color: var(--dd-navy);
  width: 100%;
  max-width: none;
}

#main-documents,
#main-documents .developer-scope-shell,
#main-documents .developer-documents-page,
#main-documents .developer-documents-page-card {
  width: 100%;
  max-width: none !important;
  justify-self: stretch;
}

.developer-documents-page .developer-documents-page-card {
  gap: 10px;
  padding: 16px;
  border-color: var(--dd-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(11, 31, 58, 0.06);
}

.developer-documents-page .developer-documents-head { align-items: center; }
.developer-documents-page .developer-documents-head h2 { color: var(--dd-navy); font-size: 21px; line-height: 1.15; }
.developer-documents-page .developer-documents-head p { margin-top: 3px; color: var(--dd-muted); font-size: 12px; }
.developer-documents-page .developer-documents-add-btn { min-height: 38px; padding: 7px 14px; border: 1px solid var(--dd-gold); border-radius: 9px; background: var(--dd-navy); color: #fff; }

.developer-documents-page .developer-documents-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.developer-documents-page .developer-documents-summary-grid .developer-scope-stat { display: flex; min-height: 72px; padding: 10px 12px; align-items: center; align-content: initial; gap: 10px; border-color: var(--dd-line); border-radius: 11px; background: #fff; }
.developer-documents-page .developer-document-kpi-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 10px; background: #f1f5fb; color: var(--dd-navy-2); }
.developer-documents-page .developer-document-kpi-icon svg { width: 19px; height: 19px; }
.developer-documents-page .developer-document-kpi-copy { min-width: 0; }
.developer-documents-page .developer-document-kpi-label { margin: 0 0 3px; font-size: 10px; }
.developer-documents-page .developer-document-kpi-value { font-size: 20px; }
.developer-documents-page .developer-documents-kpi--good .developer-document-kpi-icon { background: #e9f8f0; color: #08794a; }
.developer-documents-page .developer-documents-kpi--warning .developer-document-kpi-icon { background: var(--dd-gold-soft); color: #9b6200; }
.developer-documents-page .developer-documents-kpi--danger .developer-document-kpi-icon { background: #fff0f0; color: #b42318; }
.developer-documents-page .developer-documents-kpi.is-active { border-color: var(--dd-gold); background: var(--dd-navy); box-shadow: none; }
.developer-documents-page .developer-documents-kpi.is-active .developer-document-kpi-icon { background: rgba(255,255,255,.12); color: #fff; }

.developer-documents-page .developer-documents-filter-card { padding: 10px 12px; border-color: var(--dd-line); border-radius: 11px; box-shadow: none; }
.developer-documents-page .developer-documents-filter-row { grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(130px, 1fr)) auto; gap: 9px; }
.developer-documents-page .developer-documents-filter-row label > span { margin-bottom: 4px; color: var(--dd-muted); font-size: 10px; }
.developer-documents-page .developer-documents-filter-row input,
.developer-documents-page .developer-documents-filter-row select { min-height: 36px; height: 36px; padding-block: 5px; border-color: var(--dd-line); border-radius: 8px; font-size: 12px; }
.developer-documents-page .members-filter-actions { align-self: end; }
.developer-documents-page .members-filter-actions button { min-height: 36px; border-color: var(--dd-line); color: var(--dd-navy-2); }

.developer-documents-page .developer-documents-table-card { padding: 0; overflow: hidden; border-color: var(--dd-line); border-radius: 11px; box-shadow: none; }
.developer-documents-page .developer-documents-table-head { padding: 10px 12px 7px; }
.developer-documents-page .developer-documents-table-head h3 { color: var(--dd-navy); font-size: 13px; }
.developer-documents-page .developer-documents-register-table th,
.developer-documents-page .developer-documents-register-table td { height: 38px; padding: 6px 9px; font-size: 11px; }
.developer-documents-page .developer-documents-register-table th { background: #f6f8fb; color: var(--dd-navy); font-size: 10px; }
.developer-documents-page .developer-documents-file-icon { width: 30px; height: 30px; border-radius: 9px; }
.developer-documents-page .developer-documents-name-cell { gap: 8px; }
.developer-documents-page .developer-documents-name-cell small { font-size: 9px; }
.developer-documents-page .developer-documents-menu-trigger { width: 32px; min-width: 32px; height: 30px; border: 1px solid #dfbd66; border-radius: 7px; background: #fff; color: var(--dd-navy); }
.developer-documents-page .developer-documents-footer { min-height: 46px; padding: 7px 12px; color: var(--dd-muted); font-size: 10px; }
.developer-documents-page .project-bookings-pagination select,
.developer-documents-page .project-bookings-pagination button { min-height: 32px; height: 32px; }
.developer-documents-mobile-list { display: none; }

.developer-documents-page button:focus-visible,
.developer-documents-page input:focus-visible,
.developer-documents-page select:focus-visible { outline: 2px solid var(--dd-gold); outline-offset: 2px; }

@media (max-width: 1100px) {
  .developer-documents-page .developer-documents-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .developer-documents-page .members-filter-search { grid-column: 1 / -1; }
  .developer-documents-page .members-filter-actions { justify-self: end; }
}

@media (max-width: 767px) {
  .developer-documents-page { overflow-x: hidden; }
  .developer-documents-page .developer-documents-page-card { padding: 12px; }
  .developer-documents-page .developer-documents-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .developer-documents-page .developer-documents-add-btn { width: 100%; min-height: 42px; }
  .developer-documents-page .developer-documents-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .developer-documents-page .developer-documents-summary-grid .developer-scope-stat { min-height: 68px; padding: 9px; }
  .developer-documents-page .developer-documents-filter-row { grid-template-columns: 1fr; }
  .developer-documents-page .members-filter-search { grid-column: auto; }
  .developer-documents-page .developer-documents-filter-row input,
  .developer-documents-page .developer-documents-filter-row select,
  .developer-documents-page .members-filter-actions button { min-height: 42px; height: 42px; }
  .developer-documents-page .members-filter-actions { width: 100%; justify-self: stretch; }
  .developer-documents-page .members-filter-actions button { width: 100%; }
  .developer-documents-page .developer-documents-register-wrap { display: none; }
  .developer-documents-page .developer-documents-mobile-list { display: grid; gap: 8px; padding: 0 10px 10px; }
  .developer-documents-mobile-card { min-width: 0; padding: 11px; border: 1px solid var(--dd-line); border-radius: 10px; background: #fff; }
  .developer-documents-mobile-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .developer-documents-mobile-card .developer-documents-name-cell { min-width: 0; }
  .developer-documents-mobile-card .developer-documents-name-cell strong,
  .developer-documents-mobile-card .developer-documents-name-cell small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .developer-documents-mobile-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; margin-top: 10px; }
  .developer-documents-mobile-meta > div { min-width: 0; }
  .developer-documents-mobile-meta span { display: block; margin-bottom: 3px; color: var(--dd-muted); font-size: 9px; }
  .developer-documents-mobile-meta strong { display: block; overflow: hidden; color: var(--dd-navy); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .developer-documents-mobile-meta strong[class*="status"] { display: inline-flex; width: auto; }
  .developer-documents-mobile-empty { padding: 22px 12px; border: 1px dashed var(--dd-line); border-radius: 10px; text-align: center; color: var(--dd-muted); font-size: 12px; }
  .developer-documents-page .developer-documents-footer { align-items: stretch; flex-direction: column; }
  .developer-documents-page .project-bookings-pagination { width: 100%; justify-content: space-between; }
}

@media (max-width: 420px) {
  .developer-documents-page .developer-documents-summary-grid { grid-template-columns: 1fr; }
  .developer-documents-page .developer-documents-summary-grid .developer-scope-stat { min-height: 60px; }
}

/* Developer Profile & Compliance Documents */
.developer-profile-page { --dp-navy:#0b1f3a; --dp-navy-2:#15375f; --dp-gold:#c59a32; --dp-gold-bg:#fff7e3; --dp-muted:#65748a; --dp-line:#dde4ec; display:grid; gap:10px; color:var(--dp-navy); }
.developer-profile-page-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; min-height:34px; margin-top:-48px; margin-bottom:4px; }
.developer-profile-page-actions > span { margin-right:8px; color:var(--dp-muted); font-size:11px; }
.developer-profile-page .developer-profile-primary { border:1px solid var(--dp-gold); background:var(--dp-navy); color:#fff; }
.developer-profile-overview-grid { display:grid; grid-template-columns:minmax(0,1.72fr) minmax(330px,1fr); gap:10px; }
.developer-profile-card { min-width:0; padding:14px 16px; border:1px solid var(--dp-line); border-radius:12px; background:#fff; box-shadow:0 3px 12px rgba(11,31,58,.04); }
.developer-profile-card h3,.developer-profile-card p { margin:0; }.developer-profile-card h3 { font-size:17px; color:var(--dp-navy); }.developer-profile-card p { margin-top:3px; color:var(--dp-muted); font-size:11px; }
.developer-profile-identity > header { display:flex; align-items:center; gap:16px; margin-bottom:12px; }
.developer-profile-monogram { display:grid; place-items:center; width:58px; height:58px; flex:0 0 58px; border:1.5px solid var(--dp-gold); border-radius:50%; background:#fffbf1; color:var(--dp-navy); font-size:23px; font-weight:800; }
.developer-profile-identity header > div:last-child > div { display:flex; flex-wrap:wrap; gap:7px; margin-top:6px; }.developer-profile-identity header span { padding:4px 11px; border:1px solid var(--dp-line); border-radius:999px; font-size:10px; }.developer-profile-state.attention { border-color:#e9c56a!important; background:var(--dp-gold-bg); color:#9a6200; }.developer-profile-state.complete { background:#eaf8f1; color:#087b4b; }
.developer-profile-info-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }.developer-profile-info-grid > div { position:relative; min-height:50px; padding:7px 14px; border-left:1px solid var(--dp-line); }.developer-profile-info-grid > div:nth-child(3n+1){border-left:0;padding-left:0}.developer-profile-info-grid span { display:block; color:var(--dp-muted); font-size:10px; }.developer-profile-info-grid strong { display:block; overflow:hidden; margin-top:3px; color:var(--dp-navy); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }.developer-profile-info-grid button { position:absolute; right:8px; bottom:7px; width:30px; height:30px; padding:6px; border:0; background:transparent; color:var(--dp-navy-2); }
.developer-profile-completeness-body { display:grid; grid-template-columns:120px 1fr; gap:14px; align-items:center; margin:8px 0; }.developer-profile-progress { display:grid; place-items:center; width:104px; height:104px; border-radius:50%; background:conic-gradient(var(--dp-gold) 0 var(--profile-progress),#dfe5eb var(--profile-progress) 360deg); }.developer-profile-progress::before { content:""; grid-area:1/1; width:78px; height:78px; border-radius:50%; background:#fff; }.developer-profile-progress strong { z-index:1; grid-area:1/1; font-size:23px; }.developer-profile-completeness-body > div:last-child > strong { display:block; margin-bottom:5px; font-size:11px; }.developer-profile-completeness-body span { display:flex; justify-content:space-between; gap:8px; padding:5px 0; border-bottom:1px solid #edf1f5; font-size:10px; }.developer-profile-completeness-body span b { font-weight:700; }.developer-profile-completeness-body span.complete b{color:#07824e}.developer-profile-completeness-body span.missing b{color:#a86600}.developer-profile-completeness > button { width:100%; }
.developer-profile-documents > header { display:flex; justify-content:space-between; align-items:center; }.developer-profile-documents > header h3 { display:flex; align-items:center; gap:8px; }.developer-profile-documents > header svg { width:20px;height:20px; }
.developer-profile-doc-controls { display:grid; grid-template-columns:minmax(0,1fr) minmax(190px,260px) auto; gap:10px; align-items:center; margin:10px 0 8px; }.developer-profile-doc-tabs { display:flex; width:max-content; max-width:100%; padding:2px; border:1px solid var(--dp-line); border-radius:8px; }.developer-profile-doc-tabs button { min-height:32px; padding:4px 14px; border:0; border-radius:6px; background:#fff; color:var(--dp-navy); font-size:11px; white-space:nowrap; }.developer-profile-doc-tabs button.active { border:1px solid var(--dp-gold); background:var(--dp-navy); color:#fff; }.developer-profile-doc-tabs span { margin-left:4px; opacity:.75; }.developer-profile-doc-controls label { display:block; min-width:0; }.developer-profile-doc-controls input { width:100%; height:36px; border:1px solid var(--dp-line); border-radius:8px; padding:6px 11px; font-size:11px; }.developer-profile-doc-controls .developer-profile-primary{min-height:36px;white-space:nowrap}
.developer-profile-attention { display:flex; justify-content:space-between; align-items:center; gap:16px; min-height:38px; margin:10px 0 0; padding:7px 12px; border:1px solid #e6bd54; border-radius:8px; background:var(--dp-gold-bg); color:#704b00; font-size:11px; font-weight:700; }.developer-profile-attention button { flex:0 0 auto; border:0; background:transparent; color:var(--dp-navy); font-size:10px; font-weight:700; white-space:nowrap; }
.developer-profile-documents-table { width:100%; table-layout:fixed; border-collapse:collapse; }.developer-profile-documents-table th,.developer-profile-documents-table td { height:34px; padding:5px 9px; border-bottom:1px solid #e6ebf1; overflow:hidden; color:var(--dp-navy); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }.developer-profile-documents-table th { background:#f6f8fb; font-weight:700; }.developer-profile-documents-table th:nth-child(1){width:21%}.developer-profile-documents-table th:nth-child(2){width:15%}.developer-profile-documents-table th:nth-child(3){width:25%}.developer-profile-documents-table th:nth-child(4){width:14%}.developer-profile-documents-table th:nth-child(5){width:15%}.developer-profile-documents-table th:nth-child(6){width:10%}.developer-profile-document-name { display:flex; align-items:center; gap:8px; }.developer-profile-document-name svg{width:15px;height:15px;flex:0 0 15px}.developer-profile-requirement,.developer-profile-doc-status { display:inline-flex; padding:3px 8px; border-radius:999px; background:#edf1f5; color:#506079; }.developer-profile-requirement.required,.developer-profile-requirement.conditional,.developer-profile-doc-status.missing { background:#fff2d8;color:#9b6200}.developer-profile-doc-status.uploaded{background:#e6f7ee;color:#08794a}.developer-profile-doc-status.notrequired{background:#edf1f5;color:#59677a}.developer-profile-doc-menu { min-width:32px; width:32px; height:30px; border:1px solid #dfbd66; border-radius:7px; background:#fff; color:var(--dp-navy); font-weight:800; }.developer-profile-doc-menu:focus-visible,.developer-profile-page button:focus-visible,.developer-profile-page input:focus-visible { outline:2px solid var(--dp-gold); outline-offset:2px; }
.developer-profile-mobile-documents { display:none; }.developer-profile-documents footer { display:flex; justify-content:space-between; padding-top:8px; color:var(--dp-muted); font-size:10px; }
@media (min-width:1200px) and (max-height:800px){.developer-profile-page{gap:7px}.developer-profile-card{padding:10px 14px}.developer-profile-monogram{width:50px;height:50px;flex-basis:50px}.developer-profile-identity>header{margin-bottom:6px}.developer-profile-info-grid>div{min-height:42px;padding-top:4px;padding-bottom:4px}.developer-profile-progress{width:88px;height:88px}.developer-profile-progress::before{width:66px;height:66px}.developer-profile-completeness-body{grid-template-columns:102px 1fr;margin:4px 0}.developer-profile-documents-table th,.developer-profile-documents-table td{height:29px;padding-top:3px;padding-bottom:3px}}
@media(max-width:1199px){.developer-profile-page-actions{margin-top:0}.developer-profile-overview-grid{grid-template-columns:1fr}.developer-profile-doc-controls{grid-template-columns:minmax(0,1fr) minmax(200px,1fr) auto}.developer-profile-doc-tabs{justify-self:start}}
@media(max-width:767px){.developer-profile-page{overflow-x:hidden}.developer-profile-page{gap:12px}.developer-profile-page-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.developer-profile-page-actions>span{grid-column:1/-1;margin:0}.developer-profile-page-actions button{width:100%;min-height:42px}.developer-profile-card{padding:14px 12px;border-radius:11px}.developer-profile-identity>header{align-items:flex-start;gap:12px}.developer-profile-monogram{width:50px;height:50px;flex-basis:50px;font-size:20px}.developer-profile-card h3{font-size:16px}.developer-profile-info-grid{grid-template-columns:1fr 1fr}.developer-profile-info-grid>div{min-width:0;padding:9px 10px}.developer-profile-info-grid>div:nth-child(3n+1){border-left:1px solid var(--dp-line);padding-left:10px}.developer-profile-info-grid>div:nth-child(2n+1){border-left:0;padding-left:0}.developer-profile-info-grid strong{padding-right:28px;font-size:12px}.developer-profile-completeness-body{grid-template-columns:88px minmax(0,1fr);gap:10px}.developer-profile-progress{width:82px;height:82px}.developer-profile-progress::before{width:62px;height:62px}.developer-profile-progress strong{font-size:19px}.developer-profile-attention{align-items:flex-start;flex-direction:column;gap:4px}.developer-profile-attention button{min-height:32px;padding:0}.developer-profile-doc-controls{grid-template-columns:1fr;gap:8px}.developer-profile-doc-tabs{width:100%}.developer-profile-doc-tabs button{flex:1;min-width:0;min-height:40px;padding-inline:6px}.developer-profile-doc-controls button,.developer-profile-doc-controls input{width:100%;min-height:42px}.developer-profile-documents-table-wrap{display:none}.developer-profile-mobile-documents{display:grid;gap:8px}.developer-profile-mobile-documents article{min-width:0;padding:11px;border:1px solid var(--dp-line);border-radius:10px;background:#fff}.developer-profile-mobile-documents article>header{display:flex;justify-content:space-between;align-items:center;gap:8px}.developer-profile-mobile-documents article>header strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.developer-profile-mobile-doc-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px 12px;margin-top:10px}.developer-profile-mobile-doc-meta>div{min-width:0}.developer-profile-mobile-doc-meta span{display:block;margin-bottom:4px;color:var(--dp-muted);font-size:10px}.developer-profile-mobile-doc-meta b{display:block;overflow:hidden;color:var(--dp-navy);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.developer-profile-mobile-doc-meta .developer-profile-requirement,.developer-profile-mobile-doc-meta .developer-profile-doc-status{display:inline-flex;width:auto;padding:3px 8px}.developer-profile-mobile-doc-file{grid-column:1/-1}.developer-profile-mobile-empty{padding:24px 12px;border:1px dashed var(--dp-line);border-radius:10px;text-align:center;color:var(--dp-muted);font-size:12px}.developer-profile-documents footer{display:grid;gap:3px;padding-top:10px}}
@media(max-width:480px){.developer-profile-page-actions{grid-template-columns:1fr}.developer-profile-page-actions>span{grid-column:auto}.developer-profile-identity>header{flex-direction:column}.developer-profile-info-grid{grid-template-columns:1fr}.developer-profile-info-grid>div,.developer-profile-info-grid>div:nth-child(3n+1),.developer-profile-info-grid>div:nth-child(2n+1){padding:9px 0;border-left:0;border-top:1px solid var(--dp-line)}.developer-profile-info-grid>div:first-child{border-top:0}.developer-profile-completeness-body{grid-template-columns:1fr}.developer-profile-progress{margin-inline:auto}.developer-profile-mobile-doc-meta{grid-template-columns:1fr 1fr}}

.developer-document-modal-body {
  display: grid;
  gap: 12px;
}

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

.developer-document-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 700;
}

.developer-document-form-grid input,
.developer-document-form-grid select,
.developer-document-form-grid textarea {
  width: 100%;
}

.developer-document-checkbox {
  align-content: end;
}

.developer-document-checkbox input {
  width: auto;
  justify-self: start;
}

.developer-document-file-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.developer-document-remarks {
  grid-column: 1 / -1;
}

.developer-document-delete-copy p {
  margin: 0;
}

@media (max-width: 900px) {
  .developer-documents-head {
    flex-direction: column;
  }

  .developer-document-form-grid {
    grid-template-columns: 1fr;
  }
}

.project-dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0 0;
}

.project-dashboard-hero-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.project-dashboard-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.project-dashboard-title-row h2 {
  margin: 0;
  color: var(--navy);
  font-size: 40px;
  line-height: 1.05;
}

.project-dashboard-hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.project-dashboard-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
  justify-content: flex-end;
}

.project-dashboard-upload-priority {
  box-shadow: 0 8px 18px rgba(12, 39, 84, 0.18);
}

.project-status-master-pending {
  border-color: #f0a33a;
  background: #fff7e8;
  color: #9a5800;
}

.project-master-data-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #f2bc67;
  border-left: 4px solid #df8b18;
  border-radius: 14px;
  background: #fff9ee;
}

.project-master-data-banner-icon {
  color: #c8750b;
  font-size: 24px;
  line-height: 1;
}

.project-master-data-banner-copy {
  min-width: 0;
  flex: 1;
}

.project-master-data-banner-copy h3,
.project-master-data-banner-copy p {
  margin: 0;
}

.project-master-data-banner-copy h3 {
  color: #392507;
  font-size: 16px;
}

.project-master-data-banner-copy p,
.project-master-data-banner-copy small {
  display: block;
  margin-top: 3px;
  color: #6d5228;
  font-size: 13px;
  line-height: 1.45;
}

.project-master-data-missing {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: #6d5228;
  font-size: 12px;
  font-weight: 700;
}

.project-master-data-chip {
  padding: 4px 8px;
  border: 1px solid #f3cf93;
  border-radius: 7px;
  background: #fff;
  color: #6d5228;
  font-weight: 600;
}

.project-master-data-banner-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-summary-setup-note {
  margin: 5px 6px 0;
  color: #8a5a13;
  font-size: 11px;
  line-height: 1.35;
}

.developer-quick-grid-compact button.is-disabled,
.developer-quick-grid-compact button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.project-actions-menu {
  position: relative;
}

.project-actions-menu summary {
  list-style: none;
}

.project-actions-menu summary::-webkit-details-marker {
  display: none;
}

.project-actions-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  display: grid;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 34px rgba(8, 20, 42, 0.12);
  z-index: 20;
}

.project-actions-menu:not([open]) .project-actions-menu-list {
  display: none;
}

.project-actions-menu-list button {
  border: 0;
  background: transparent;
  color: var(--navy);
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  cursor: pointer;
}

.project-actions-menu-list button:hover {
  background: var(--navy-wash);
}

.project-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.project-summary-card {
  min-height: auto;
  padding: 10px 12px;
}

.project-summary-card .developer-kpi-group-list {
  gap: 2px;
}

.project-summary-card .developer-kpi-group-row {
  padding: 5px 6px;
}

.project-summary-card .developer-kpi-group-row-copy small {
  font-size: 12px;
}

.project-summary-card .developer-kpi-group-row strong {
  font-size: 17px;
}

.project-dashboard-mid-grid,
.project-dashboard-bottom-grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

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

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

.project-dashboard-bottom-grid {
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

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

.project-dashboard-bottom-grid > .content-card,
.project-dashboard-last-grid > .content-card,
.compact-project-mid-grid > .content-card {
  height: 100%;
}

.compact-project-bars {
  min-height: 150px;
}

.compact-project-mid-grid .developer-bar-card {
  min-height: 230px;
}

.project-info-grid {
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  row-gap: 10px;
  column-gap: 12px;
  padding: 10px 14px 14px;
}

.project-info-grid span {
  color: var(--muted);
}

.project-info-grid strong {
  color: var(--navy);
  text-align: right;
}

.project-dashboard-footer {
  display: flex;
  justify-content: flex-start;
}

.project-settings-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.project-settings-card {
  margin-top: 0;
}

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

.project-settings-unit-selector-shell {
  display: grid;
  gap: 10px;
}

.project-settings-unit-selector-top {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(220px, auto);
  justify-content: space-between;
  align-items: end;
  gap: 12px 16px;
}

.project-settings-unit-selector-mode {
  display: grid;
  gap: 6px;
}

.project-settings-unit-selector-save {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.project-settings-unit-selector-save .inline-success,
.project-settings-unit-selector-save .inline-error {
  margin-top: 0;
}

.project-settings-unit-selector-form {
  gap: 10px 14px;
}

.project-settings-unit-selector-top {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px 14px;
  align-items: end;
}

.project-settings-unit-selector-top.is-combined-field {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto;
}

.project-settings-unit-selector-top.is-single-field,
.project-settings-unit-selector-top.is-multiple-filters {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.project-settings-unit-selector-separator {
  display: grid;
  gap: 6px;
}

.project-settings-unit-selector-save {
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.project-settings-unit-selector-save .small-btn {
  white-space: nowrap;
}

.project-settings-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.project-settings-span-2 {
  grid-column: span 2;
}

.project-settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.project-settings-actions .inline-success,
.project-settings-actions .inline-error {
  margin-top: 0;
  flex: 1;
}

.project-logo-field {
  display: grid;
  gap: 10px;
}

.project-logo-upload-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid #d8e4f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.project-logo-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.project-logo-preview-frame {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  border: 1px solid #d8e4f2;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.project-logo-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.project-logo-preview-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #183a74;
  background: linear-gradient(135deg, #f3f8ff 0%, #dde9fb 100%);
}

.project-logo-preview-copy {
  display: grid;
  gap: 4px;
}

.project-logo-preview-copy strong {
  color: #183153;
}

.project-logo-preview-copy small {
  color: #60748f;
  line-height: 1.4;
}

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

.project-edit-page {
  display: grid;
  gap: 10px;
}

.project-edit-page .content-card {
  max-width: none;
}

.placeholder-panel.project-edit-frame {
  padding: 14px 16px 16px;
  border-radius: 24px;
}

.project-edit-banner {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(188, 204, 229, 0.28);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)) top right / 42% 100% no-repeat,
    linear-gradient(120deg, #0d2d63 0%, #153f82 52%, #12376f 100%);
  box-shadow: 0 18px 40px rgba(14, 40, 88, 0.18);
  color: #fff;
  overflow: hidden;
}

.project-edit-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 64%, rgba(255, 255, 255, 0.08) 64% 65%, transparent 65% 100%),
    linear-gradient(135deg, transparent 0 78%, rgba(255, 255, 255, 0.06) 78% 79%, transparent 79% 100%);
  opacity: 0.55;
  pointer-events: none;
}

.project-edit-banner > * {
  position: relative;
  z-index: 1;
}

.project-edit-banner-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.project-edit-banner-logo {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(13, 45, 99, 0.04);
}

.project-edit-banner-logo .project-logo-preview-image {
  background: transparent;
}

.project-edit-banner-logo .project-logo-preview-fallback {
  color: #1c53b8;
  background: transparent;
  font-size: 26px;
  letter-spacing: 0.04em;
}

.project-edit-banner-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-edit-banner-copy h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.1;
}

.project-edit-banner-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.project-edit-banner-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.project-edit-banner-separator {
  color: rgba(255, 255, 255, 0.46);
}

.project-edit-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.project-edit-status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.project-edit-status-badge.tone-success {
  background: rgba(17, 185, 112, 0.14);
  border-color: rgba(95, 224, 155, 0.45);
  color: #9ef0c4;
}

.project-edit-status-badge.tone-warning {
  background: rgba(245, 180, 59, 0.14);
  border-color: rgba(253, 211, 120, 0.42);
  color: #ffe08a;
}

.project-edit-status-badge.tone-neutral,
.project-edit-status-badge.tone-info {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #eef5ff;
}

.project-edit-banner-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.project-edit-logo-btn,
.project-edit-logo-remove {
  white-space: nowrap;
}

.project-edit-logo-btn {
  --btn-bg: rgba(255, 255, 255, 0.08);
  --btn-color: #fff;
  --btn-border: rgba(255, 255, 255, 0.48);
  --btn-hover-bg: rgba(255, 255, 255, 0.14);
  --btn-hover-color: #fff;
  --btn-hover-border: rgba(255, 255, 255, 0.72);
  min-height: 38px;
  padding-inline: 16px;
  border-radius: 12px;
  box-shadow: none;
}

.project-edit-logo-btn:hover,
.project-edit-logo-remove:hover {
  transform: none;
}

.project-edit-logo-remove {
  --btn-bg: rgba(255, 255, 255, 0.04);
  --btn-color: rgba(255, 255, 255, 0.9);
  --btn-border: rgba(255, 255, 255, 0.22);
  --btn-hover-bg: rgba(255, 255, 255, 0.1);
  --btn-hover-color: #fff;
  --btn-hover-border: rgba(255, 255, 255, 0.42);
}

.project-edit-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.project-edit-heading h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.15;
  color: #10284f;
  font-size: 12px;
}

.developer-reports-quick-link {
  min-height: 38px;
  text-align: left;
}

.developer-reports-sidepanels .project-payments-summary-row {
  padding-block: 9px;
}

#developerReportGenerateDialog.developer-editor-dialog[open] {
  padding: 20px;
}

.developer-report-generate-card {
  width: min(900px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 35, 68, 0.24);
}

.developer-report-generate-header {
  position: relative;
  padding: 20px 22px 17px;
  border-bottom: 1px solid #e3eaf3;
  background: linear-gradient(135deg, #f8fbff 0%, #fff 62%);
}

.developer-report-generate-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.developer-report-generate-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #eaf2ff;
  color: #1e5fc4;
}

.developer-report-generate-icon svg {
  width: 23px;
  height: 23px;
}

.developer-report-generate-eyebrow {
  margin: 0 0 3px !important;
  color: #2a64b7 !important;
  font-size: 10px !important;
  font-weight: 800;
  letter-spacing: .13em;
}

.developer-report-generate-header h3 {
  margin: 0;
  color: #10284f;
  font-size: 21px;
}

.developer-report-generate-body {
  display: grid;
  gap: 14px;
  overflow-y: auto;
  padding: 18px 22px;
  background: #f8fafc;
}

.developer-report-generate-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e1e8f2;
  border-radius: 14px;
  background: #fff;
}

.developer-report-generate-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.developer-report-generate-section-title > span {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #10284f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.developer-report-generate-section-title h4,
.developer-report-generate-section-title p {
  margin: 0;
}

.developer-report-generate-section-title h4 {
  color: #142e55;
  font-size: 14px;
}

.developer-report-generate-section-title p {
  margin-top: 2px;
  color: #708198;
  font-size: 11px;
}

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

.developer-report-generate-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #435a78;
  font-size: 11px;
  font-weight: 750;
}

.developer-report-generate-grid label > span b {
  color: #c53d38;
}

.developer-report-generate-grid select,
.developer-report-generate-grid input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border-color: #d8e2ef;
  border-radius: 10px;
  background-color: #fbfdff;
}

.developer-report-generate-grid select:focus,
.developer-report-generate-grid input:focus {
  border-color: #4b7fd1;
  box-shadow: 0 0 0 3px rgba(36, 100, 232, .1);
}

.developer-report-generate-wide {
  grid-column: 1 / -1;
}

.developer-report-output-grid {
  grid-template-columns: 1.1fr 1fr 1fr;
}

.developer-report-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border: 1px solid #d8e6f8;
  border-radius: 11px;
  background: #edf5ff;
}

.developer-report-selection-summary span {
  color: #526d91;
  font-size: 11px;
  font-weight: 700;
}

.developer-report-selection-summary strong {
  min-width: 0;
  overflow: hidden;
  color: #153866;
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.developer-report-generate-footer {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-top: 1px solid #e3eaf3;
  background: #fff;
}

.developer-report-generate-footer p {
  margin: 0;
  color: #718197;
  font-size: 11px;
}

.developer-report-generate-footer .dialog-actions {
  margin: 0;
}

@media (max-width: 680px) {
  #developerReportGenerateDialog.developer-editor-dialog[open] { padding: 8px; }
  .developer-report-generate-card { width: calc(100vw - 16px); max-height: calc(100vh - 16px); border-radius: 15px; }
  .developer-report-generate-header { padding: 16px; }
  .developer-report-generate-body { padding: 13px; }
  .developer-report-generate-grid,
  .developer-report-output-grid { grid-template-columns: 1fr; }
  .developer-report-generate-wide { grid-column: auto; }
  .developer-report-selection-summary { align-items: flex-start; flex-direction: column; gap: 4px; }
  .developer-report-selection-summary strong { width: 100%; text-align: left; }
  .developer-report-generate-footer { align-items: stretch; flex-direction: column; padding: 12px 16px; }
  .developer-report-generate-footer .dialog-actions { justify-content: flex-end; }
}

.project-edit-heading p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #5f738f;
}

.project-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 1.05fr);
  gap: 10px;
  align-items: start;
}

.project-edit-card {
  padding: 12px 14px;
  border-radius: 18px;
}

.project-edit-card-basic {
  grid-column: 1;
}

.project-edit-card-schedule {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.project-edit-card-structure {
  grid-column: 1;
}

.project-edit-card-location {
  grid-column: 1 / -1;
}

.project-edit-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.project-edit-card-head h3 {
  margin: 0;
  font-size: 15px;
  color: #10284f;
}

.project-edit-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #245ec7;
  background: linear-gradient(180deg, #f3f8ff 0%, #e8f0ff 100%);
  border: 1px solid #d9e5f6;
  flex: 0 0 auto;
}

.project-edit-card-icon svg {
  width: 17px;
  height: 17px;
}

.project-edit-form-grid {
  gap: 10px 12px;
}

.project-edit-form-grid label,
.project-edit-schedule-item {
  display: grid;
  gap: 6px;
}

.project-edit-form-grid label > span,
.project-edit-schedule-item > span {
  font-size: 11px;
  font-weight: 700;
  color: #32496f;
}

.project-edit-form-grid input,
.project-edit-form-grid select,
.project-edit-schedule-item input,
.project-edit-schedule-item select {
  min-height: 42px;
  font-size: 14px;
}

.project-edit-form-grid textarea {
  min-height: 46px;
  font-size: 14px;
  resize: vertical;
}

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

.project-edit-schedule-list {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 16px;
}

.project-edit-schedule-list::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 6px;
  width: 2px;
  background: linear-gradient(180deg, #d6e2f2 0%, #eaf0f8 100%);
}

.project-edit-schedule-item {
  position: relative;
}

.project-edit-schedule-item::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #b4c7e4;
  box-shadow: 0 0 0 4px #f8fbff;
}

.project-edit-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 2px 0;
}

.project-edit-actionbar .inline-success,
.project-edit-actionbar .inline-error {
  margin-top: 0;
  flex: 1 1 220px;
}

.project-edit-actionbar-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.project-edit-actionbar-buttons .small-btn,
.project-edit-actionbar-buttons .ghost-btn {
  min-height: 40px;
  padding-inline: 16px;
}

.unit-selector-inline-check {
  align-items: start;
}

.unit-selector-inline-check input[type="checkbox"] {
  width: auto;
  min-height: 18px;
  margin-top: 8px;
}

.unit-selector-config-card {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #e2eaf4;
  border-radius: 12px;
  background: #f9fbfe;
}

.unit-selector-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
}

.unit-selector-config-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.unit-selector-config-option {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid #e2eaf4;
  border-radius: 10px;
  background: #fff;
}

.unit-selector-config-option input[type="checkbox"] {
  width: auto;
  min-height: 18px;
  margin: 0;
}

.unit-selector-config-option span {
  font-size: 12px !important;
  color: #24364c !important;
}

.unit-selector-help {
  color: #667b8f;
  font-size: 12px;
}

.project-dashboard-empty-panel {
  min-height: 170px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
  color: var(--muted);
  padding: 18px 14px 10px;
}

.project-dashboard-empty-panel strong {
  color: var(--navy);
  font-size: 16px;
}

.project-dashboard-empty-panel span {
  font-size: 13px;
  max-width: 540px;
}

.project-empty-cell {
  height: 152px;
  vertical-align: middle;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 1200px) {
  .developer-projects-kpi-card {
    min-height: 80px;
    padding: 11px 13px;
  }

  .developer-projects-kpi-copy strong {
    font-size: 20px;
  }

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

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

  .project-dashboard-mid-grid,
  .project-dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .project-settings-grid {
    grid-template-columns: 1fr;
  }

  .compact-project-mid-grid .developer-bar-card {
    min-height: 210px;
  }

  .unit-selector-config-grid-4,
  .project-settings-unit-selector-top,
  .project-settings-unit-selector-top.is-combined-field,
  .project-settings-unit-selector-top.is-single-field,
  .project-settings-unit-selector-top.is-multiple-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }}

@media (max-width: 980px) {
  .developer-projects-shell .members-page-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #main-inventory-toolbar .unit-selector-status,
  #main-inventory-toolbar .header-filters label,
  #main-inventory-toolbar .project-toolbar-filters label,
  #main-inventory-toolbar .unit-picker-anchor {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  #main-inventory-toolbar .unit-picker-toolbar {
    flex-wrap: wrap;
    align-items: center;
  }

  #main-inventory-toolbar .unit-picker-anchor {
    flex-basis: 100%;
  }

  #main-inventory-toolbar .unit-picker-trigger-wrap {
    flex-wrap: wrap;
  }

  #main-inventory-toolbar .unit-picker-trigger-label {
    width: 100%;
  }

  .project-dashboard-hero {
    flex-direction: column;
  }

  .project-master-data-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .project-master-data-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .project-dashboard-title-row h2 {
    font-size: 30px;
  }

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

  .project-summary-grid {
    grid-template-columns: 1fr;
  }

  .project-settings-form,
  .project-settings-import-grid {
    grid-template-columns: 1fr;
  }

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

  .project-edit-card-schedule,
  .project-edit-card-basic,
  .project-edit-card-structure,
  .project-edit-card-location {
    grid-column: auto;
    grid-row: auto;
  }

  .project-logo-upload-shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-logo-upload-actions {
    justify-content: flex-start;
  }

  .project-settings-span-2 {
    grid-column: span 1;
  }

  .project-info-grid {
    grid-template-columns: 1fr;
  }

  .project-info-grid strong {
    text-align: left;
  }

  .project-settings-unit-selector-top,
  .project-settings-unit-selector-top.is-combined-field,
  .project-settings-unit-selector-top.is-single-field,
  .project-settings-unit-selector-top.is-multiple-filters,
  .unit-selector-config-grid-4 {
    grid-template-columns: 1fr;
  }

  .project-settings-unit-selector-save {
    justify-content: flex-start;
  }

  #main-inventory-toolbar .unit-picker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  #main-inventory-toolbar .unit-picker-popover {
    width: calc(100vw - 24px);
    max-width: none;
  }

  #main-inventory-toolbar .unit-picker-shell {
    max-height: min(70vh, 520px);
  }

  #main-inventory-toolbar .unit-picker-sticky,
  #main-inventory-toolbar .unit-picker-grid-scroll,
  #main-inventory-toolbar .unit-picker-foot {
    padding-left: 12px;
    padding-right: 12px;
  }

  #main-inventory-toolbar .unit-picker-foot {
    flex-direction: column;
    align-items: stretch;
  }

  #main-inventory-toolbar .unit-picker-foot .ghost-btn {
    width: 100%;
  }

  .project-edit-banner {
    padding: 14px;
    border-radius: 16px;
  }

  .project-edit-banner,
  .project-edit-banner-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-edit-banner-actions {
    width: 100%;
    align-items: stretch;
    gap: 6px;
  }

  .project-edit-logo-btn,
  .project-edit-logo-remove {
    width: 100%;
    justify-content: center;
  }

  .project-edit-banner-logo {
    width: 68px;
    height: 68px;
    border-radius: 16px;
  }

  .project-edit-heading h2 {
    font-size: 16px;
  }

  .project-edit-card {
    padding: 12px;
  }

  .project-edit-form-grid,
  .project-edit-form-grid-wide {
    grid-template-columns: 1fr;
  }

  .project-edit-actionbar {
    align-items: stretch;
  }

  .project-edit-actionbar-buttons {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
  }

  .project-edit-actionbar-buttons .ghost-btn {
    flex: 1 1 calc(50% - 5px);
  }

  .project-edit-actionbar-buttons #projectEditSaveBtn {
    width: 100%;
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) {
  .developer-projects-shell .members-page-summary {
    grid-template-columns: 1fr;
  }

  .developer-projects-kpi-card {
    min-height: 76px;
  }

  .developer-projects-kpi-copy strong {
    font-size: 19px;
  }}

@media (max-width: 1099px) {
  .app-breadcrumb {
    margin-left: 0;
  }

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

@media (max-width: 980px) {
  .unit-documents-filters {
    flex-wrap: wrap;
  }

  .unit-documents-search {
    flex-basis: 100%;
    margin-left: 0;
  }}

.app-toast-host {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5000;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  min-width: 280px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 42, 78, 0.14);
  background: #ffffff;
  color: var(--navy);
  box-shadow: 0 18px 34px rgba(8, 20, 42, 0.14);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast-success {
  border-color: rgba(22, 163, 74, 0.18);
  background: #f2fcf6;
}

.app-toast-error {
  border-color: rgba(220, 38, 38, 0.18);
  background: #fff5f5;
}

.app-toast-warning {
  border-color: rgba(245, 158, 11, 0.2);
  background: #fff9ed;
}
.developer-donut-chart-btn,
.developer-legend-btn,
.developer-partner-summary-btn,
.developer-recent-item,
.developer-report-card {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.developer-donut-chart-btn:hover,
.developer-legend-btn:hover,
.developer-partner-summary-btn:hover,
.developer-recent-item:hover,
.developer-report-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(18, 37, 70, 0.08);
}

.developer-legend-btn,
.developer-partner-summary-btn {
  border: 1px solid var(--line, #dfe6f1);
  background: #fff;
  border-radius: 8px;
}

.developer-recent-item,
.developer-donut-chart-btn {
  border: 0;
}

.dashboard-customization-card {
  width: min(920px, calc(100vw - 48px));
}

.dashboard-customization-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.dashboard-customization-panel {
  border: 1px solid var(--line, #dfe6f1);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.dashboard-customization-panel h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.dashboard-customization-checklist {
  display: grid;
  gap: 10px;
}

.dashboard-customization-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.dashboard-customization-kpi-list {
  display: grid;
  gap: 10px;
}

.dashboard-customization-kpi-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line, #dfe6f1);
  border-radius: 8px;
  padding: 10px 12px;
}

.dashboard-customization-kpi-row strong,
.dashboard-customization-kpi-row small {
  display: block;
}

.dashboard-customization-kpi-row small {
  color: var(--muted, #6b7b93);
}

.dashboard-customization-kpi-actions {
  display: flex;
  gap: 8px;
}

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

.procurement-detail-dialog-card {
  width: min(1050px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #e5eaf2;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  background: #fff;
}

.procurement-detail-dialog-card .dialog-title {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  padding: 16px 20px 12px;
  background: #fff;
  border-bottom: 1px solid #e5eaf2;
  z-index: 10;
}

.procurement-detail-dialog-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px;
  display: grid;
  gap: 12px;
  background: #fff;
}

.procurement-detail-dialog-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px 14px;
  border-top: 1px solid #e5eaf2;
  background: #fff;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.vendor-detail-kv-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 22px;
  margin-bottom: 0;
  min-width: 0;
}

.vendor-detail-kv-label {
  color: #64748b;
  font-size: 12px;
}

.vendor-detail-kv-value {
  color: #0f2344;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  min-width: 0;
  word-break: break-word;
}

.project-vendors-page,
.project-material-inward-page,
.project-materials-page,
.project-vendors-shell,
.project-purchase-bills-shell,
.project-contractors-shell,
.project-purchase-orders-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

.project-vendors-page > *,
.project-material-inward-page > *,
.project-materials-page > *,
.project-vendors-shell > *,
.project-purchase-bills-shell > *,
.project-contractors-shell > *,
.project-purchase-orders-shell > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.project-vendors-head,
.project-materials-head {
  gap: 12px;
}

.project-vendors-head .members-page-actions,
.project-materials-head .members-page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.project-vendors-head .members-page-actions > *,
.project-materials-head .members-page-actions > * {
  flex: 0 0 auto;
  min-width: 0;
}

.project-advanced-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(38, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

#projectPurchaseBillsAdvancedToggleBtn.is-active {
  border-color: #1d4ed8;
  color: #1d4ed8;
  background: rgba(38, 99, 235, 0.06);
}

.project-purchase-orders-main .project-vendors-table td.money,
.project-purchase-orders-main .project-vendors-table th.money,
.project-purchase-orders-table td.money,
.project-purchase-orders-table th.money {
  text-align: right;
}

@media (max-width: 900px) {

  .vendor-detail-kv-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .vendor-detail-kv-value {
    text-align: left;
  }}

#projectMaterialInwardEditorDialog {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  max-height: none;
  overflow: visible;
}

#projectMaterialInwardEditorDialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

#purchaseOrderItemsShell {
  display: table-row-group;
}

.danger-lite-btn {
  border-color: #f4d0d0;
  color: #d84c4c;
}

#purchaseBillItemsShell {
  display: grid;
  gap: 10px;
}

.project-tab-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-tab-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7e1f0;
  border-radius: 10px;
  background: #fff;
  color: #24405f;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.project-tab-chip svg {
  width: 16px;
  height: 16px;
}

.project-tab-chip.active {
  border-color: #0b7a43;
  background: #eefaf3;
  color: #0b7a43;
}

.project-contractors-main .project-vendors-table td.money,
.project-contractors-main .project-vendors-table th.money {
  text-align: right;
}

@media (max-width: 1180px) {

  .vendors-kpi-six {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
  }}

@media (max-width: 1440px) {
  .project-vendors-kpis,
  .project-materials-kpis,
  .project-purchase-orders-kpis,
  .project-contractors-kpis,
  .vendors-kpi-six {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  }

  .project-vendors-head .members-page-actions .ghost-btn,
  .project-vendors-head .members-page-actions .primary-btn,
  .project-materials-head .members-page-actions .ghost-btn,
  .project-materials-head .members-page-actions .primary-btn {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .project-vendors-table th,
  .project-vendors-table td,
  .project-purchase-bills-table th,
  .project-purchase-bills-table td,
  .project-materials-table th,
  .project-materials-table td {
    padding: 10px 12px;
    font-size: 13px;
  }}

@media (max-width: 1200px) {
  .project-vendors-head .members-page-actions,
  .project-materials-head .members-page-actions {
    justify-content: flex-start;
  }}
.document-preview-dialog {
  width: min(96vw, 1100px);
  max-width: 1100px;
  max-height: 90vh;
  border: none;
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.24);
}

.document-preview-dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
}

.document-preview-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  max-height: 90vh;
  min-height: min(640px, 90vh);
  overflow: hidden;
}

.document-preview-header,
.document-preview-footer {
  padding: 16px 20px;
  border-bottom: 1px solid #d9e3f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
}

.document-preview-footer {
  border-top: 1px solid #d9e3f0;
  border-bottom: 0;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 -8px 20px rgba(20, 35, 61, 0.06);
}

.document-preview-title-wrap h2 {
  margin: 0 0 6px;
}

.document-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: #5b6b7f;
}

.document-preview-meta-sep {
  color: #9fb2ca;
}

.document-preview-banner {
  margin: 12px 20px 0;
  padding: 10px 12px;
  border: 1px solid #f7cf95;
  background: #fff7ec;
  color: #b4690e;
  border-radius: 10px;
  font-size: 12px;
}

.document-preview-body {
  margin: 12px 20px;
  padding: 18px;
  border: 1px solid #d9e3f0;
  border-radius: 12px;
  overflow: auto;
  min-height: 220px;
  min-width: 0;
  background: #fbfdff;
}

.document-preview-html {
  color: #15233b;
  font-size: 13px;
  line-height: 1.55;
}

.doc-preview-paragraph {
  margin: 0 0 10px;
}

.doc-preview-table-wrap {
  overflow-x: auto;
  margin: 0 0 12px;
}

.doc-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.doc-preview-table td,
.doc-preview-table th {
  border: 1px solid #d9e3f0;
  padding: 6px 8px;
  vertical-align: top;
}

.doc-preview-plain {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, "Courier New", monospace;
}

.document-preview-diagnostics {
  margin: 0 20px 12px;
  border: 1px solid #d9e3f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.document-preview-diagnostics > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
}

.document-preview-diagnostics-body {
  padding: 0 14px 14px;
  font-size: 12px;
  color: #41516c;
  max-height: 220px;
  overflow: auto;
}

.document-preview-diagnostic-group + .document-preview-diagnostic-group {
  margin-top: 10px;
}

.document-preview-diagnostic-group ul {
  margin: 6px 0 0 16px;
  padding: 0;
}

.document-preview-diagnostic-empty,
.doc-preview-empty {
  color: #64748b;
  font-size: 12px;
}

.construction-shell {
  display: grid;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.95), #ffffff 18%);
}

.construction-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.construction-page-copy {
  display: grid;
  gap: 4px;
}

.construction-page-copy h2 {
  margin: 0;
  color: #183153;
}

.construction-page-copy p {
  margin: 0;
  color: #5c6983;
  max-width: 760px;
}

.construction-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.construction-tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

.construction-pill-tab {
  border: 1px solid #d8e0f0;
  background: #f7f9fe;
  color: #29415f;
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.construction-pill-tab:hover {
  background: #eef3ff;
  border-color: #c8d4ef;
  color: #183153;
}

.construction-pill-tab.active {
  background: #183153;
  border-color: #183153;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(24, 49, 83, 0.18);
}

.construction-workspace-body {
  display: grid;
  gap: 16px;
}

.construction-dashboard-hero,
.construction-dashboard-card {
  border: 1px solid #e4ebf5;
  box-shadow: 0 12px 28px rgba(15, 35, 66, 0.06);
}

.construction-dashboard-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  align-items: start;
}

.construction-dashboard-hero-main {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 100%;
  width: 100%;
  max-width: 280px;
  padding-right: 6px;
  border-right: 1px solid #ebf0f7;
}

.construction-dashboard-hero-side {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.construction-dashboard-ring-card {
  display: flex;
  align-items: center;
  justify-content: center;
}

.construction-progress-ring {
  --construction-progress: 0%;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 57%, transparent 58%),
    conic-gradient(#1d3557 0 var(--construction-progress), #e9eef8 var(--construction-progress) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px #e5ebf4;
}

.construction-progress-ring-inner {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: 0 8px 18px rgba(20, 42, 75, 0.06);
}

.construction-progress-ring-inner strong {
  display: block;
  font-size: 18px;
  color: #0f2340;
  line-height: 1;
}

.construction-progress-ring-inner span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #6d7b93;
}

.construction-dashboard-health-copy {
  display: grid;
  gap: 12px;
}

.construction-dashboard-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #183153;
}

.construction-health-badge {
  justify-self: flex-start;
  min-height: 30px;
  padding: 0 14px;
  font-weight: 700;
}

.construction-dashboard-meta-list {
  display: grid;
  gap: 10px;
}

.construction-dashboard-meta-list div {
  display: grid;
  gap: 3px;
}

.construction-dashboard-meta-list span {
  font-size: 12px;
  color: #71809a;
}

.construction-dashboard-meta-list strong {
  color: #183153;
  font-size: 15px;
}

.construction-dashboard-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(92px, 1fr);
  gap: 10px;
  align-items: stretch;
  width: 100%;
}

.construction-dashboard-kpi {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-height: 100%;
  padding: 10px 10px;
  text-align: center;
  border: 1px solid #e9eef7;
  border-radius: 16px;
  background: #fff;
}

.construction-dashboard-kpi-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef4ff, #ffffff);
  color: #27518a;
  border: 1px solid #d9e3f2;
  font-size: 10px;
  font-weight: 800;
}

.construction-dashboard-kpi-copy {
  display: grid;
  gap: 4px;
}

.construction-dashboard-kpi-copy label {
  color: #183153;
  font-size: 12px;
  font-weight: 700;
}

.construction-dashboard-kpi-copy strong {
  color: #0f2340;
  font-size: 18px;
  line-height: 1;
}

.construction-dashboard-kpi-copy small {
  color: #71809a;
  font-size: 10px;
}

.construction-dashboard-operational-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid #e8edf6;
  border-radius: 14px;
  background: #fbfdff;
  padding: 10px;
}

.construction-dashboard-operational-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid #e8edf6;
  border-radius: 12px;
  background: #fff;
}

.construction-dashboard-operational-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #eef4ff;
  color: #2f5fa7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

.construction-dashboard-operational-copy {
  display: grid;
  gap: 3px;
}

.construction-dashboard-operational-copy label {
  color: #6e7c94;
  font-size: 11px;
  font-weight: 700;
}

.construction-dashboard-operational-copy strong {
  color: #183153;
  font-size: 13px;
}

.construction-dashboard-operational-item.improving strong {
  color: #19804a;
}

.construction-dashboard-operational-item.watchlist strong {
  color: #b26d09;
}

.construction-dashboard-grid {
  align-items: stretch;
}

.construction-dashboard-bottom-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr);
}

.construction-dashboard-card {
  min-height: 100%;
}

.construction-stage-table {
  display: grid;
  gap: 0;
}

.construction-stage-table-head,
.construction-stage-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.25fr) 70px 90px minmax(190px, 1.4fr);
  gap: 12px;
  align-items: center;
}

.construction-stage-table-head {
  padding: 0 0 10px;
  border-bottom: 1px solid #ecf1f8;
  color: #71809a;
  font-size: 12px;
  font-weight: 700;
}

.construction-stage-table-row {
  padding: 9px 0;
  border-bottom: 1px solid #eef2f8;
  font-size: 13px;
  color: #183153;
  transition: background 0.18s ease;
}

.construction-stage-table-row:hover {
  background: #fbfdff;
}

.construction-stage-table-row.is-muted {
  color: #8b98ad;
}

.construction-stage-table-row:last-child {
  border-bottom: 0;
}

.construction-stage-table-stage {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.construction-stage-table-stage i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f6de0;
  flex: 0 0 auto;
}

.construction-stage-table-stage strong {
  color: #183153;
  font-weight: 700;
}

.construction-stage-table-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.construction-stage-table-progress strong {
  color: #1f8b4d;
  font-size: 12px;
  min-width: 36px;
  text-align: right;
}

.construction-stage-table-row.is-muted .construction-stage-table-progress strong {
  color: #8ea0b7;
}

.construction-stage-table-row.is-muted .construction-stage-bar-track {
  background: #f1f4f9;
}

.construction-stage-table-row.is-muted .construction-stage-bar-fill {
  background: #d8e0ec;
  width: 0 !important;
}

.construction-dashboard-card-actions {
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.construction-dashboard-activity-list,
.construction-dashboard-track-list,
.construction-attention-list {
  display: grid;
  gap: 12px;
}

.construction-dashboard-activity-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #e7edf6;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.construction-dashboard-activity-icon,
.construction-dashboard-track-icon,
.construction-attention-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 12px;
}

.construction-dashboard-activity-icon {
  width: 50px;
  height: 50px;
  background: #edf4ff;
  color: #2c5ca5;
  border: 1px solid #d9e4f3;
}

.construction-dashboard-activity-icon.good {
  background: #ebf9ef;
  color: #187746;
  border-color: #cfe9d8;
}

.construction-dashboard-activity-icon.amber {
  background: #fff7e7;
  color: #c07b11;
  border-color: #f1deb7;
}

.construction-dashboard-activity-icon.blue {
  background: #edf4ff;
  color: #275fb0;
  border-color: #d8e3f5;
}

.construction-dashboard-activity-copy {
  display: grid;
  gap: 5px;
}

.construction-dashboard-activity-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.construction-dashboard-activity-top strong {
  color: #183153;
  font-size: 14px;
}

.construction-dashboard-activity-top span,
.construction-dashboard-activity-copy p,
.construction-dashboard-activity-copy small,
.construction-dashboard-activity-copy em {
  margin: 0;
  font-size: 11px;
  color: #6f7d95;
}

.construction-dashboard-activity-copy p {
  font-weight: 700;
  color: #1b304f;
}

.construction-dashboard-activity-copy em {
  font-style: normal;
  color: #7f8da5;
}

.construction-attention-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #eef2f8;
  border-radius: 14px;
}

.construction-attention-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f6f8fd;
  color: #4f6482;
  border: 1px solid #d9e3f2;
}

.construction-attention-icon.warn {
  background: #fff6e8;
  color: #b26d09;
  border-color: #f0ddb5;
}

.construction-attention-copy {
  display: grid;
  gap: 3px;
}

.construction-attention-copy strong {
  color: #183153;
}

.construction-attention-copy small {
  color: #71809a;
  font-size: 12px;
}

.construction-attention-count {
  min-width: 34px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff5de;
  color: #c07b11;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}

.construction-attention-row.tone_no_activity_in_last_30_days {
  background: linear-gradient(180deg, #fffaf0 0%, #fff7e9 100%);
}

.construction-attention-row.tone_delayed_units {
  background: linear-gradient(180deg, #fff6f6 0%, #fff1f1 100%);
}

.construction-attention-row.tone_contractor_not_assigned {
  background: linear-gradient(180deg, #f5f9ff 0%, #eef5ff 100%);
}

.construction-attention-row.tone_pending_approvals_eligibility {
  background: linear-gradient(180deg, #f6f5ff 0%, #efefff 100%);
}

.construction-attention-empty {
  min-height: 176px;
  display: grid;
  place-items: center;
}

.construction-dashboard-track-row {
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid #e5ebf4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  cursor: pointer;
}

.construction-dashboard-track-row:hover {
  border-color: #ccd8ea;
  background: #ffffff;
}

.construction-dashboard-track-icon {
  width: 44px;
  height: 44px;
  background: #edf4ff;
  color: #27518a;
  border: 1px solid #d9e4f3;
}

.construction-dashboard-track-row strong {
  color: #183153;
}

.construction-dashboard-track-row small {
  color: #6f7d95;
  font-size: 12px;
}

.construction-dashboard-track-row em {
  font-style: normal;
  color: #7d8ca4;
  font-size: 20px;
  line-height: 1;
}

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

.construction-kpi-card {
  min-height: 104px;
  padding: 16px;
  display: grid;
  gap: 6px;
  border: 1px solid #e6ebf5;
  box-shadow: 0 8px 24px rgba(15, 35, 66, 0.05);
}

.construction-kpi-card span {
  font-size: 12px;
  color: #66728a;
}

.construction-kpi-card strong {
  font-size: 28px;
  line-height: 1;
  color: #183153;
}

.construction-kpi-card small {
  font-size: 12px;
  color: #7a859b;
}

.construction-balanced-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}

.construction-activity-grid {
  align-items: stretch;
}

.construction-contractors-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

.construction-template-grid {
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.7fr);
}

.construction-panel {
  padding: 16px;
  display: grid;
  gap: 16px;
}

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

.construction-section-head h3 {
  margin: 0;
  color: #183153;
  font-size: 18px;
}

.construction-section-head p {
  margin: 4px 0 0;
  color: #71809a;
  font-size: 12px;
}

.construction-stage-bars,
.construction-feed-list,
.construction-track-list {
  display: grid;
  gap: 10px;
}

.construction-stage-bar-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 2.4fr) 44px;
  align-items: center;
  gap: 12px;
}

.construction-stage-bar-copy strong {
  color: #29415f;
  font-size: 13px;
}

.construction-stage-bar-track {
  position: relative;
  min-height: 10px;
  background: #eef2fb;
  border-radius: 999px;
  overflow: hidden;
}

.construction-stage-bar-fill {
  display: block;
  min-height: 10px;
  background: linear-gradient(90deg, #183153, #bb9a54);
  border-radius: 999px;
}

.construction-stage-bar-value {
  font-weight: 700;
  color: #183153;
  text-align: right;
}

.construction-feed-card,
.construction-track-row {
  border: 1px solid #e4ebf5;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fbfcff;
}

.construction-feed-card p,
.construction-feed-card small {
  margin: 0;
  color: #64728c;
}

.construction-feed-card small {
  display: block;
  margin-top: 4px;
}

.construction-feed-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.construction-feed-topline strong {
  color: #183153;
}

.construction-feed-topline span {
  font-size: 12px;
  color: #7b879b;
}

.construction-feed-card-compact {
  gap: 4px;
}

.construction-track-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.construction-track-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid #dfe6f2;
  background: #f8fbff;
  padding: 8px 12px;
  color: #29415f;
}

.construction-track-chip small {
  color: #6f7d97;
}

.construction-track-chip.is-active {
  border-color: #183153;
  background: #eef4ff;
}

.construction-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) minmax(220px, 1.2fr);
  gap: 12px;
  align-items: end;
}

.construction-filter-row-tight {
  grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(220px, 1.1fr);
}

.construction-filter-row-unit-progress {
  position: sticky;
  top: 0;
  z-index: 2;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) minmax(220px, 1.1fr);
  padding: 12px;
  border: 1px solid #e5ebf4;
  border-radius: 14px;
  background: #fbfdff;
}

.construction-filter-row select,
.construction-filter-row input,
.construction-form-two-col input,
.construction-form-two-col select,
.construction-panel textarea,
.construction-panel input,
.construction-panel select {
  min-height: 36px;
  border-radius: 10px;
}

.construction-filter-search {
  min-width: 0;
}

.construction-bulk-bar,
.construction-sticky-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid #e3eaf4;
  border-radius: 14px;
  background: #f8fbff;
}

.construction-unit-summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.construction-unit-summary-card {
  border: 1px solid #e5ebf4;
  border-radius: 14px;
  background: #fbfdff;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.construction-unit-summary-card span,
.construction-unit-summary-card small {
  color: #71809a;
  font-size: 11px;
}

.construction-unit-summary-card strong {
  color: #183153;
  font-size: 18px;
  line-height: 1.1;
}

.construction-bulk-copy,
.construction-selection-summary {
  color: #60718d;
  font-size: 13px;
}

.construction-bulk-copy strong {
  color: #183153;
  font-size: 18px;
  margin-right: 6px;
}

.construction-bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.construction-table th,
.construction-table td {
  vertical-align: middle;
  padding-top: 10px;
  padding-bottom: 10px;
}

.unit-progress-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.unit-progress-table-wrap .construction-table {
  min-width: 1180px;
}

.construction-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbff;
}

.construction-progress-row:hover td {
  background: #fbfdff;
}

.construction-group-row td {
  background: #f5f8fe;
  color: #183153;
  font-weight: 700;
  border-top: 1px solid #e6edf7;
}

.construction-group-row small {
  margin-left: 8px;
  color: #6f7d95;
  font-weight: 600;
}

.construction-sticky-action-col {
  position: sticky;
  right: 0;
  background: #fff;
  min-width: 168px;
}

.construction-table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 14px;
}

.construction-table-pagination-summary {
  color: #60718d;
  font-size: 13px;
}

.construction-table-pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-left: auto;
}

.construction-table-page-size {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #60718d;
  font-size: 13px;
  font-weight: 600;
}

.construction-table-page-size span {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.construction-table-page-size select {
  min-width: 72px;
  min-height: 36px;
}

.construction-table-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #183153;
  font-size: 13px;
  font-weight: 600;
}

.construction-table-page-nav .small-btn {
  min-width: 36px;
  min-height: 36px;
  padding-inline: 0;
}

.construction-progress-row:hover .construction-sticky-action-col {
  background: #fbfdff;
}

.construction-progress-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.construction-progress-timeline-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #dfe7f3;
  background: #f7faff;
  color: #61728f;
  font-size: 12px;
  font-weight: 600;
}

.construction-progress-timeline-chip.is-completed {
  border-color: #cce7d8;
  background: #eefaf4;
  color: #1f7a4e;
}

.construction-progress-timeline-chip.is-current {
  border-color: #cdd8eb;
  background: #edf4ff;
  color: #183153;
}

.construction-progress-timeline-chip.is-pending {
  border-color: #dfe7f3;
  background: #f8fbff;
  color: #71809a;
}

.construction-inline-meta {
  display: block;
  margin-top: 3px;
  color: #7a879c;
  font-size: 12px;
}

.construction-mini-progress {
  width: 92px;
  min-height: 8px;
  border-radius: 999px;
  background: #edf2fb;
  overflow: hidden;
  margin-bottom: 4px;
}

.construction-mini-progress span {
  display: block;
  min-height: 8px;
  background: linear-gradient(90deg, #2ca36d, #6bd4aa);
}

.construction-delay-badge,
.construction-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #dbe4f2;
  background: #f6f9ff;
  color: #41516c;
}

.construction-delay-badge.is-delayed {
  border-color: #f2c8c8;
  background: #fff0f0;
  color: #b03636;
}

.construction-status-badge.good {
  border-color: #cbe6d8;
  background: #effaf4;
  color: #1f7a4e;
}

.construction-status-badge.warn {
  border-color: #eddcb2;
  background: #fff8e7;
  color: #8a6720;
}

.construction-status-badge.neutral {
  border-color: #d7dfef;
  background: #f6f8fd;
  color: #53637e;
}

.construction-unit-picker {
  display: grid;
  gap: 12px;
}

.construction-unit-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.construction-unit-picker-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.construction-unit-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.construction-unit-chip {
  border: 1px solid #e0e7f1;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.construction-unit-chip:hover {
  border-color: #c4d2ea;
  background: #f9fbff;
  box-shadow: 0 8px 20px rgba(26, 46, 82, 0.06);
}

.construction-unit-chip.is-selected {
  border-color: #183153;
  background: linear-gradient(180deg, #eff4ff, #ffffff);
  box-shadow: 0 12px 26px rgba(24, 49, 83, 0.12);
}

.construction-unit-chip strong {
  color: #183153;
  font-size: 13px;
}

.construction-unit-chip span {
  font-size: 12px;
  color: #66758f;
}

.construction-unit-chip-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.construction-form-panel {
  min-height: 100%;
}

.construction-activity-form {
  display: grid;
  gap: 14px;
}

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

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

.construction-form-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e4ebf5;
  border-radius: 14px;
  background: #fbfcff;
}

.construction-form-group h4 {
  margin: 0;
  color: #183153;
  font-size: 15px;
}

.construction-rules-table-wrap {
  max-height: 460px;
  overflow: auto;
}

.construction-kpi-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.construction-field-label {
  display: block;
  margin-bottom: 8px;
  color: #5f6f8d;
  font-size: 12px;
  font-weight: 700;
}

.construction-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.construction-unit-chip.selected {
  border-color: #183153;
  background: linear-gradient(180deg, #eff4ff, #ffffff);
  box-shadow: 0 12px 26px rgba(24, 49, 83, 0.12);
}

.construction-action-stack {
  display: grid;
  gap: 6px;
}

.construction-history-expanded-row td {
  background: #fbfcff;
}

.construction-history-expanded {
  display: grid;
  gap: 10px;
}

.construction-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
}

.construction-inline-check span {
  font-size: 12px;
}

.construction-track-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
  background: #ffffff;
}

.construction-track-row strong {
  color: #183153;
}

.construction-track-row span,
.construction-track-row small {
  color: #697892;
}

.construction-track-row.active {
  border-color: #183153;
  background: #eef4ff;
  box-shadow: 0 10px 24px rgba(24, 49, 83, 0.08);
}

.construction-track-chip-list-compact {
  padding-top: 4px;
}

.construction-btn-outline.ghost-btn {
  background: #ffffff;
  border-color: #d6dfef;
  color: #29415f;
}

.construction-btn-outline.ghost-btn:hover {
  background: #f5f8ff;
  border-color: #c6d3ea;
  color: #183153;
}

.construction-btn-primary.primary-btn:hover {
  filter: none;
}

.empty-inline {
  margin: 0;
  color: #6c7a94;
}

.unit-construction-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.unit-construction-summary-grid div {
  background: #f8fbff;
  border: 1px solid #e5eaf4;
  border-radius: 12px;
  padding: 10px 12px;
}

.unit-construction-summary-grid span {
  display: block;
  font-size: 12px;
  color: #66728a;
}

.unit-construction-summary-grid strong {
  color: #183153;
}

@media (max-width: 1400px) {
  .construction-dashboard-hero {
    grid-template-columns: 260px minmax(0, 1fr);
  }

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

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

  .construction-dashboard-operational-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }}

@media (max-width: 1180px) {
  .construction-balanced-grid,
  .construction-contractors-layout,
  .construction-template-grid {
    grid-template-columns: 1fr;
  }

  .construction-filter-row,
  .construction-filter-row-tight,
  .construction-form-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .construction-filter-row-unit-progress,
  .construction-unit-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .construction-dashboard-hero-main {
    border-right: 0;
    padding-right: 0;
    border-bottom: 1px solid #ebf0f7;
    padding-bottom: 14px;
  }

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

  .construction-dashboard-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .construction-dashboard-operational-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }}

@media (max-width: 860px) {
  .construction-page-head,
  .construction-section-head,
  .construction-bulk-bar,
  .construction-sticky-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .construction-kpi-grid,
  .construction-kpi-grid-compact,
  .construction-filter-row,
  .construction-filter-row-tight,
  .construction-form-two-col,
  .construction-unit-chip-grid,
  .construction-chip-grid {
    grid-template-columns: 1fr;
  }

  .construction-filter-row-unit-progress,
  .construction-unit-summary-strip {
    grid-template-columns: 1fr;
  }

  .construction-stage-bar-row {
    grid-template-columns: 1fr;
  }

  .construction-dashboard-hero-main,
  .construction-stage-table-head,
  .construction-stage-table-row,
  .construction-dashboard-track-row,
  .construction-dashboard-activity-card,
  .construction-attention-row {
    grid-template-columns: 1fr;
  }

  .construction-dashboard-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .construction-dashboard-operational-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .construction-dashboard-kpi {
    border-right: 0;
  }

  .construction-dashboard-activity-icon,
  .construction-dashboard-track-icon,
  .construction-attention-icon {
    margin-bottom: 2px;
  }}

.developer-pay-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #647690;
  font-size: 12px;
}

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

.developer-pay-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.developer-pay-chart-svg {
  width: 100%;
  height: auto;
  max-height: 152px;
}

.developer-pay-chart-grid {
  stroke: #edf2f8;
  stroke-width: 1;
}

.developer-pay-chart-axis,
.developer-pay-chart-label {
  fill: #8a97ad;
  font-size: 10px;
}

.developer-pay-donut {
  box-shadow: inset 0 0 0 1px #eef2f8;
}

.developer-pay-empty-chart {
  min-height: 124px;
  align-items: center;
}

.developer-pay-empty-ring {
  background: conic-gradient(#e6edf8 0 100%);
}

.developer-pay-progress-row {
  display: grid;
  gap: 6px;
}

.developer-pay-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #5f728f;
  font-size: 10px;
}

.developer-pay-progress-copy strong {
  color: #142d55;
  font-size: 11px;
}

.developer-pay-progress-copy small {
  color: #7c8aa0;
}

.developer-pay-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #edf2f8;
  overflow: hidden;
}

.developer-pay-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

#unitOnePageReportRoot {
  width: 100%;
}

.report-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.report-action-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pdf-export-mode,
.pdf-export-mode * {
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

.pdf-export-mode {
  width: 794px !important;
  max-width: 794px !important;
  min-height: 1123px !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  padding: 28px !important;
}

.pdf-export-mode,
.pdf-export-mode * {
  overflow: visible !important;
  position: static;
}

/* Lead Details popup redesign overrides */
.lead-details-modal {
  width: min(88vw, 1240px);
  max-width: min(88vw, 1240px);
  height: auto;
  max-height: min(88vh, 760px);
}

.lead-details-modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(88vw, 1240px);
  max-width: min(88vw, 1240px);
  max-height: min(88vh, 760px);
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(20, 35, 61, 0.11);
  overflow: hidden;
}

.lead-details-modal-head {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 50px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.lead-details-head-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 0 0 auto;
}

.lead-details-modal-head h2 {
  font-size: 20px;
  line-height: 1.1;
}

.lead-details-head-copy p {
  display: none;
}

.lead-details-sticky-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  max-width: calc(100% - 56px);
}

.lead-details-header-collapsed .lead-details-sticky-compact {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lead-details-sticky-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef4ff 0%, #dfeaff 100%);
  color: #2464e8;
  font-size: 15px;
  font-weight: 700;
}

.lead-details-sticky-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 3px;
}

.lead-details-sticky-copy strong {
  display: block;
  min-width: 0;
  font-size: 13px;
  line-height: 1.15;
  color: #132541;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-details-sticky-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: nowrap;
}

.lead-details-sticky-status,
.lead-details-sticky-mobile,
.lead-details-sticky-task {
  min-width: 0;
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-details-sticky-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
}

.lead-details-sticky-mobile {
  max-width: 110px;
  color: #5d708d;
}

.lead-details-sticky-task {
  flex: 1 1 auto;
  color: #304665;
}

.lead-details-sticky-compact .lead-due-badge {
  min-height: 22px;
  padding: 0 8px;
  font-size: 10px;
  flex: 0 0 auto;
}

.lead-details-modal-body {
  min-height: 0;
  padding: 12px 16px;
  scroll-padding-bottom: 58px;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
}

.lead-details-modal-foot {
  min-height: 50px;
  padding: 8px 16px;
}

.lead-details-save-state-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #d7e0ea;
  background: #f7fafc;
  color: #506079;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.lead-details-save-state-pill.is-saved {
  border-color: #c6ead4;
  background: #ecfbf3;
  color: #17814a;
}

.lead-details-save-state-pill.is-dirty {
  border-color: #f4c56a;
  background: #fff6df;
  color: #b87400;
}

.lead-details-save-state-pill.is-readonly {
  border-color: #dbe4f0;
  background: #f6f8fc;
  color: #5e6c84;
}

.lead-details-modal-head .lead-details-save-state-pill {
  margin-left: auto;
  flex: 0 0 auto;
}

.lead-details-modal-foot {
  justify-content: flex-end;
}

.lead-details-modal-foot .dialog-actions {
  margin-left: auto;
}

.lead-details-modal-foot .small-btn.is-highlighted {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
  border-color: #f2b84b;
}

.lead-details-summary-card,
.lead-details-info-strip,
.lead-details-panel,
.lead-details-quick-actions {
  border-color: #dbe4f0;
}

.lead-details-summary-card {
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  min-height: 88px;
  overflow: hidden;
  border-radius: 12px;
}

.lead-details-summary-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  min-width: 0;
}

.lead-details-summary-main {
  display: none;
}

.project-lead-avatar.large {
  width: 52px;
  height: 52px;
  font-size: 22px;
  flex: 0 0 auto;
}

.lead-details-summary-copy {
  gap: 4px;
  min-width: 0;
}

.lead-details-summary-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-details-summary-title-row h3 {
  font-size: 17px;
  line-height: 1.15;
}

.lead-details-summary-contact span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #304665;
  font-size: 12px;
  line-height: 1.2;
}

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

.compact-action-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
}

.compact-action-btn.is-whatsapp {
  border-color: #cfead9;
  color: #118a4b;
}

.lead-status-badge-select {
  width: auto;
  min-width: 76px;
  max-width: 110px;
  min-height: 28px;
  height: 28px;
  padding: 0 28px 0 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.lead-details-summary-metrics {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
}

.lead-details-metric-card {
  gap: 2px;
  min-width: 0;
  padding: 8px 9px;
}

.lead-details-metric-card span,
.lead-details-info-strip span,
.lead-details-panel span {
  font-size: 11px;
  line-height: 1.15;
}

.lead-details-metric-card strong,
.lead-details-info-strip strong {
  font-size: 14px;
  line-height: 1.15;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-details-metric-card small {
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-inline-link-btn {
  justify-self: start;
  border: none;
  background: transparent;
  padding: 0;
  color: #2464e8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.lead-details-info-strip {
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 12px;
  align-items: center;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 10px;
}

.lead-details-info-strip > div {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border-left: none;
}

.lead-details-next-action-strip {
  display: grid;
  grid-template-columns: auto minmax(190px, 240px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #f2c472;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffdf8 0%, #fffaf1 100%);
}

.lead-details-next-action-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f7b700 0%, #d88b00 100%);
  color: #fff;
  font-size: 18px;
}

.lead-details-next-action-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.lead-details-next-action-label {
  color: #c07a00;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lead-details-next-action-main strong {
  color: #14233d;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-details-next-action-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  align-items: center;
}

.lead-details-next-action-meta > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-left: 8px;
  border-left: 1px solid #f1dcc0;
}

.lead-details-next-action-meta > div:first-child {
  border-left: none;
  padding-left: 0;
}

.lead-details-next-action-meta .is-summary strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-details-next-action-meta strong {
  font-size: 12px;
  line-height: 1.15;
}

.lead-due-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  width: auto;
  justify-self: start;
}

.lead-due-badge.is-overdue {
  background: #ffeceb;
  color: #ca4638;
}

.lead-due-badge.is-today {
  background: #fff2d9;
  color: #b9770e;
}

.lead-due-badge.is-upcoming {
  background: #ecf3ff;
  color: #2464e8;
}

.lead-due-badge.is-completed {
  background: #eaf7ee;
  color: #17814a;
}

.lead-details-next-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.lead-details-tabs {
  gap: 12px;
  min-height: 38px;
  align-items: end;
}

.lead-details-tabs button {
  padding: 6px 2px;
  font-size: 12px;
}

.lead-details-overview-grid {
  grid-template-columns: minmax(0, 1.68fr) minmax(260px, 0.8fr);
  gap: 8px;
}

.lead-details-overview-main {
  gap: 8px;
}

.lead-details-panel {
  padding: 10px 12px;
  border-radius: 12px;
}

.lead-details-panel-head {
  margin-bottom: 8px;
}

.lead-details-panel-head h4,
.lead-details-quick-actions h4 {
  font-size: 15px;
  line-height: 1.15;
}

.lead-interaction-summary-card {
  grid-template-columns: 210px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 12px;
  min-height: 72px;
  align-items: center;
  border-radius: 12px;
  border: 1px solid #e4eee7;
  background: linear-gradient(180deg, #fbfefc 0%, #f5fbf8 100%);
}

.lead-interaction-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lead-interaction-meta::before {
  content: "\1F5E8";
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef8f1;
  color: #2d8a57;
  font-size: 16px;
}

.lead-interaction-meta span,
.lead-interaction-copy span {
  display: block;
  font-size: 11px;
  color: #6b7d98;
  line-height: 1.15;
}

.lead-interaction-meta strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #14233d;
  line-height: 1.2;
}

.lead-interaction-copy {
  min-width: 0;
}

.lead-interaction-summary-card p {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.2;
  color: #304665;
}

.lead-interaction-action {
  min-width: 128px;
  border-color: #dbe9df;
  color: #2d8a57;
  background: #ffffff;
}

.lead-interaction-action:hover {
  border-color: #bdd7c5;
  background: #f7fcf8;
}

.lead-next-step-grid {
  grid-template-columns: 0.92fr 0.76fr 0.92fr 1.4fr;
  gap: 8px;
}

.lead-next-step-grid label {
  gap: 5px;
}

.lead-next-step-grid input,
.lead-next-step-grid select,
.lead-next-step-grid textarea,
.lead-details-modal-foot .ghost-btn,
.lead-details-modal-foot .small-btn,
.lead-details-next-action-buttons .ghost-btn,
.lead-details-next-action-buttons .small-btn,
.lead-interaction-summary-card .ghost-btn {
  min-height: 34px;
  height: 34px;
  font-size: 12px;
}

.lead-next-step-grid textarea {
  min-height: 62px;
  height: 62px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.lead-next-step-footer {
  margin-top: 8px;
  align-items: center;
}

.lead-details-quick-actions {
  padding: 10px 12px;
  gap: 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.lead-quick-action-card {
  position: relative;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  min-height: 58px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dbe5f2;
}

.lead-quick-action-card strong {
  font-size: 12px;
  line-height: 1.15;
  color: #173055;
}

.lead-quick-action-card small {
  grid-column: 2 / 3;
  font-size: 11px;
  line-height: 1.15;
  color: #7b8ba3;
}

.lead-quick-action-card::after {
  content: "\203A";
  color: #6f85a7;
  font-size: 24px;
  line-height: 1;
  grid-column: 3;
}

.lead-quick-action-card::before {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 1;
  grid-row: 1 / span 2;
  background: #eef4ff;
  color: #2464e8;
  font-size: 18px;
  content: "\270E";
}

.lead-quick-action-card[data-lead-quick-action="followup"]::before {
  content: "\1F4CB";
}

.lead-quick-action-card[data-lead-quick-action="email"]::before {
  content: "\2709";
}

.lead-quick-action-card[data-lead-quick-action="convert"]::before {
  content: "\1F465";
  background: #eef8f1;
  color: #1e8a4c;
}

.lead-quick-action-card[data-lead-quick-action="lost"]::before {
  content: "\26A0";
  background: #fff1ef;
  color: #d24a3a;
}

.lead-quick-action-card[data-lead-quick-action="member"]::before {
  content: "\1F464";
}

.lead-quick-action-card[data-lead-quick-action="booking"]::before {
  content: "\1F5C2";
}

.dialog-x-btn {
  width: 42px;
  height: 42px;
  font-size: 28px;
  flex: 0 0 auto;
  margin-left: auto;
}

.lead-details-modal-body > *,
.lead-details-summary-primary > *,
.lead-details-summary-metrics > *,
.lead-details-next-action-strip > *,
.lead-details-overview-grid > *,
.lead-next-step-grid > * {
  min-width: 0;
  box-sizing: border-box;
}

@media (min-height: 701px) {
  .lead-details-modal-body {
    overflow-y: hidden;
  }
}

@media (max-width: 1280px) {
  .lead-details-summary-card {
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  }

  .lead-details-summary-metrics {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .lead-details-next-action-strip {
    grid-template-columns: auto minmax(170px, 220px) minmax(0, 1fr) auto;
  }

  .lead-details-next-action-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lead-details-sticky-mobile {
    display: none;
  }
}

@media (max-width: 1024px) {
  .lead-details-summary-card,
  .lead-details-overview-grid,
  .lead-details-overview-grid.converted-view,
  .lead-details-next-action-strip {
    grid-template-columns: 1fr;
  }

  .lead-details-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: none;
    border-top: 1px solid #edf2f8;
  }

  .lead-details-next-action-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-details-sticky-call {
    padding: 0 10px;
  }

  .lead-details-sticky-copy strong {
    font-size: 12px;
  }
}

@media (max-height: 700px) {
  .lead-details-modal-body {
    overflow-y: auto;
  }
}

@media print {

  .report-action-bar,
  .report-print-hidden {
    display: none !important;
  }}

.project-gst-shell {
  display: grid;
  gap: 12px;
}

.project-gst-shell .content-card {
  width: 100%;
  max-width: none;
}

.project-gst-head {
  position: relative;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid #e4ebf5;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 14px 36px rgba(18, 38, 67, 0.06);
  overflow: hidden;
}

.project-gst-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(87, 124, 255, 0.08), transparent 34%);
  pointer-events: none;
}

.project-gst-head > * {
  position: relative;
  z-index: 1;
}

.project-gst-head-main {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.project-gst-head-icon,
.project-gst-snapshot-icon,
.project-gst-kpi-icon,
.project-gst-period-card-icon,
.project-gst-period-meta-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.project-gst-head-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(180deg, #5f7cff 0%, #3458f5 100%);
  color: #fff;
  box-shadow: 0 16px 32px rgba(52, 88, 245, 0.22);
}

.project-gst-head-icon svg {
  width: 30px;
  height: 30px;
}

.project-gst-head h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.project-gst-head p {
  max-width: 460px;
  line-height: 1.45;
  font-size: 13px;
}

.project-gst-head-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 206px;
  margin-left: auto;
}

.project-gst-head-visual img {
  display: block;
  width: 188px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.project-gst-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.project-gst-head-btn {
  min-height: 40px;
  border-radius: 11px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.project-gst-head-btn svg {
  width: 18px;
  height: 18px;
}

.project-gst-head-btn-primary {
  background: #102a67;
  border-color: #102a67;
  box-shadow: none;
}

.project-gst-head-btn-primary:hover {
  background: #0d245a;
}

.project-gst-settings-summary-card {
  padding: 10px 14px;
}

.project-gst-snapshot-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1.22fr) minmax(170px, 1.1fr) repeat(5, minmax(118px, 0.94fr));
  gap: 0;
  align-items: stretch;
}

.project-gst-snapshot-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 5px 10px;
  min-width: 0;
  border-right: 1px solid #edf2fb;
}

.project-gst-snapshot-item:last-child {
  border-right: none;
}

.project-gst-snapshot-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #f3f6ff;
  color: #2d59eb;
  align-self: center;
  justify-self: center;
  line-height: 0;
}

.project-gst-snapshot-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  overflow: visible;
}

.project-gst-snapshot-item span {
  display: block;
  margin: 0 0 2px;
  font-size: 11px;
  color: #6c7b96;
}

.project-gst-snapshot-item strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.25;
  color: #10284f;
  min-width: 0;
}

.project-gst-snapshot-item > div {
  min-width: 0;
}

.project-gst-snapshot-item[data-project-gst-snapshot="1"] strong {
  font-size: 12px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.project-gst-snapshot-item[data-project-gst-snapshot="2"] strong {
  line-height: 1.15;
}

.project-gst-period-row {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(220px, 0.8fr) minmax(220px, 0.8fr);
  gap: 12px;
}

.project-gst-period-strip {
  display: grid;
  grid-template-columns: 48px 92px minmax(360px, 0.9fr) minmax(560px, 1.42fr);
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #e4ebf5;
  box-shadow: 0 10px 30px rgba(18, 38, 67, 0.05);
}

.project-gst-period-strip-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: #edf2ff;
  color: #2a57ea;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.project-gst-period-strip-icon svg {
  width: 24px;
  height: 24px;
}

.project-gst-period-strip-head h3 {
  margin: 0;
  font-size: 13px;
  color: #10284f;
  white-space: nowrap;
}

.project-gst-period-strip-controls {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) auto minmax(145px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 12px;
  border-left: 1px solid #edf2fb;
  border-right: 1px solid #edf2fb;
}

.project-gst-period-strip-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  font-size: 20px;
  color: #2a57ea;
  line-height: 1;
  transform: translateY(28px);
}

.project-gst-period-nav-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-gst-period-nav-block > span,
.project-gst-period-strip-status > span {
  font-size: 12px;
  color: #31445f;
}

.project-gst-period-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: center;
}

.project-gst-period-nav select {
  min-height: 38px;
  height: 38px;
  padding-inline: 12px 28px;
}

.project-gst-period-strip-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-self: stretch;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfefc 0%, #f4fbf7 100%);
  border: 1px solid #dcefe4;
}

.project-gst-period-strip-status-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.project-gst-period-strip-status-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-gst-period-strip-status-head strong {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 61, 0.08);
}

.project-gst-period-strip-status-head .status-chip.warning {
  color: #a94705;
  background: linear-gradient(180deg, #fff7e8 0%, #ffefd8 100%);
  border-color: #f4c789;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.12), 0 6px 14px rgba(217, 119, 6, 0.12);
}

.project-gst-period-status-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.project-gst-period-status-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-inline: 14px;
  border-left: 1px solid #e4ebf5;
}

.project-gst-period-status-metric:first-child {
  padding-left: 0;
  border-left: none;
}

.project-gst-period-status-metric span {
  font-size: 11px;
  color: #52647f;
  white-space: nowrap;
}

.project-gst-period-status-metric strong {
  font-size: 18px;
  line-height: 1.1;
  color: #10284f;
  white-space: nowrap;
}

.project-gst-period-status-metric.tone-danger strong {
  color: #ef3b58;
}

.project-gst-period-strip-status-actions {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid #e4ebf5;
}

.project-gst-period-status-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
  width: 100%;
  padding-inline: 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
}

.project-gst-period-status-action svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: block;
}

.project-gst-period-status-action span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-gst-period-status-action-primary {
  color: #c85c08;
  border-color: #f2d2ad;
  background: linear-gradient(180deg, #fffaf3 0%, #fff5e8 100%);
}

.project-gst-period-status-action-primary:hover {
  background: linear-gradient(180deg, #fff7eb 0%, #ffefdc 100%);
}

.project-gst-period-card,
.project-gst-period-meta-card {
  padding: 12px 14px;
  border: 1px solid #e4ebf5;
  box-shadow: 0 10px 30px rgba(18, 38, 67, 0.05);
}

.project-gst-period-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.project-gst-period-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}

.project-gst-period-card-head h3 {
  margin: 0;
  font-size: 12px;
  color: #2453eb;
  white-space: nowrap;
}

.project-gst-period-card-icon,
.project-gst-period-meta-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #edf2ff;
  color: #2a57ea;
}

.project-gst-period-card-icon svg,
.project-gst-period-meta-icon svg {
  width: 20px;
  height: 20px;
}

.project-gst-period-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
  align-items: end;
}

.project-gst-period-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.project-gst-period-toolbar label + label {
  border-left: 1px solid #edf2fb;
  padding-left: 14px;
}

.project-gst-period-toolbar label span {
  font-size: 12px;
  color: #31445f;
}

.project-gst-period-meta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfefc 100%);
}

.project-gst-period-meta-copy {
  display: grid;
  gap: 4px;
}

.project-gst-period-meta-copy strong {
  font-size: 15px;
  color: #10284f;
}

.project-gst-period-meta-copy small {
  font-size: 11.5px;
  line-height: 1.35;
  color: #60718b;
}

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

.project-gst-kpi-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  min-height: 88px;
  border: 1px solid #e4ebf5;
  box-shadow: 0 10px 26px rgba(18, 38, 67, 0.05);
}

.project-gst-kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #eff5ff;
  color: #2e5aed;
}

.project-gst-kpi-icon svg {
  width: 24px;
  height: 24px;
}

.project-gst-kpi-card[data-project-gst-kpi-key="itc"] .project-gst-kpi-icon {
  background: #f3ecff;
  color: #8758ea;
}

.project-gst-kpi-card[data-project-gst-kpi-key="rcm"] .project-gst-kpi-icon {
  background: #fff1e7;
  color: #f08a1f;
}

.project-gst-kpi-card[data-project-gst-kpi-key="carry-previous"] .project-gst-kpi-icon {
  background: #ffeef2;
  color: #e24d7a;
}

.project-gst-kpi-card[data-project-gst-kpi-key="net-payable"] .project-gst-kpi-icon {
  background: #eafaf0;
  color: #16a34a;
}

.project-gst-kpi-card[data-project-gst-kpi-key="carry-balance"] .project-gst-kpi-icon {
  background: #eef2ff;
  color: #2a57ea;
}

.project-gst-kpi-card[data-project-gst-kpi-key="paid"] .project-gst-kpi-icon {
  background: #e7fbf6;
  color: #14b8a6;
}

.project-gst-kpi-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.project-gst-kpi-card > .project-gst-kpi-copy > span {
  color: #31445f;
  font-size: 13px;
  line-height: 1.35;
}

.project-gst-kpi-card > .project-gst-kpi-copy > strong {
  font-size: 17px;
  line-height: 1.15;
  color: #10284f;
}

.project-gst-kpi-card > .project-gst-kpi-copy > small {
  color: #5f7088;
  font-size: 12px;
}

.project-gst-kpi-card-arrow {
  color: #7486a2;
  font-size: 22px;
}

.project-gst-warning-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.project-gst-warning-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.project-gst-main {
  min-width: 0;
}

.project-gst-content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.project-gst-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 0 2px;
  scrollbar-width: none;
}

.project-gst-tabs::-webkit-scrollbar {
  display: none;
}

.project-gst-tabs .tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 12px 12px 0 0;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.project-gst-tabs .tab.is-active {
  background: #f4f7ff;
  box-shadow: inset 0 -2px 0 #2a57ea;
}

.project-gst-inline-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.project-gst-inline-form input,
.project-gst-inline-form select,
.project-gst-inline-form button,
.project-gst-period-toolbar select,
.project-gst-settings-grid input,
.project-gst-settings-grid select {
  min-height: 38px;
  height: 38px;
  border-radius: 10px;
}

.project-gst-inline-form button {
  padding: 0 12px;
}

.project-gst-table {
  min-width: 1180px;
}

.project-gst-table th,
.project-gst-table td {
  padding: 10px 12px;
  font-size: 12.5px;
  white-space: nowrap;
}

.project-gst-table tbody tr[data-project-gst-itc-row] {
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.project-gst-table tbody tr[data-project-gst-itc-row]:hover {
  background: #f7faff;
}

.project-gst-table tbody tr[data-project-gst-itc-row]:focus-visible {
  outline: 2px solid #2a57ea;
  outline-offset: -2px;
  background: #f7faff;
}

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

.project-gst-record-detail-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e8eef7;
  border-radius: 14px;
  background: #fbfdff;
}

.project-gst-record-detail-card span {
  font-size: 12px;
  color: #6a7a93;
}

.project-gst-record-detail-card strong {
  font-size: 14px;
  color: #10284f;
  word-break: break-word;
}

.project-gst-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.project-gst-report-grid .small-btn {
  min-height: 36px;
}

.project-gst-attachment-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.project-gst-attachment-actions .small-btn {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11px;
}

@media (max-width: 1366px) {
  .project-gst-head {
    padding: 14px 16px;
  }

  .project-gst-period-row {
    grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(210px, 1fr));
  }
}

@media (max-width: 1180px) {
  .project-gst-head {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .project-gst-head-visual {
    display: none;
  }

  .project-gst-head-actions {
    margin-left: 0;
  }

  .project-gst-period-row,
  .project-gst-kpis,
  .project-gst-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-gst-period-strip {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .project-gst-period-strip-controls,
  .project-gst-period-strip-status {
    grid-column: 1 / -1;
    border-left: none;
    border-right: none;
    padding: 0;
  }

  .project-gst-period-card {
    grid-column: 1 / -1;
  }

  .project-gst-inline-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .project-gst-head-main {
    grid-template-columns: 1fr;
  }

  .project-gst-head-actions,
  .project-gst-period-row,
  .project-gst-kpis,
  .project-gst-report-grid,
  .project-gst-inline-form,
  .project-gst-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .project-gst-period-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-gst-period-strip-icon {
    display: none;
  }

  .project-gst-period-strip-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-gst-period-strip-arrow {
    display: none;
  }

  .project-gst-record-detail-grid {
    grid-template-columns: 1fr;
  }

  .project-gst-snapshot-item {
    border-right: none;
    border: 1px solid #edf2fb;
    border-radius: 14px;
    padding: 10px 12px;
  }

  .project-gst-period-card {
    grid-template-columns: 1fr;
  }

  .project-gst-period-toolbar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-gst-period-toolbar label + label {
    border-left: none;
    padding-left: 0;
  }

  .project-gst-head-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .project-gst-head-btn {
    width: 100%;
    justify-content: center;
  }
}

.project-account-transfer-helper {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #60758c;
  line-height: 1.4;
}

.project-account-transfer-helper-error {
  color: #b42318;
  font-weight: 600;
}

.configured-template-summary,
.configured-template-workflow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.configured-template-summary span,
.configured-template-workflow span {
  padding: 5px 8px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #f8fbff;
  color: #425570;
  font-size: 12px;
}

.configured-template-workflow strong {
  color: #16794a;
}

.configured-template-workflow .workflow-error {
  color: #b42318;
}

.configured-template-preview-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  margin-top: 12px;
  overflow: auto;
  border: 1px solid #dce6f2;
  border-radius: 10px;
}

.configured-template-preview-table {
  min-width: max-content;
  margin: 0;
}

.configured-template-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f8fc;
}

.configured-template-preview-table th,
.configured-template-preview-table td {
  padding: 7px 10px;
  white-space: nowrap;
}

.configured-template-preview-table .align-right {
  text-align: right;
}

.configured-template-preview-table .align-left {
  text-align: left;
}

.configured-template-preview-table .has-blocking-issue {
  background: #fff7f5;
}

.configured-template-result-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.configured-template-result-chip.result-new {
  background: #e9f8ef;
  color: #16794a;
}

.configured-template-result-chip.result-update {
  background: #eaf2ff;
  color: #245ec7;
}

.configured-template-result-chip.result-conflict {
  background: #fff0e8;
  color: #b54708;
}

.configured-import-lock-note {
  color: #6b7280;
}

@media (max-width: 720px) {
  .configured-template-summary,
  .configured-template-workflow {
    gap: 6px;
  }

  .configured-template-summary span,
  .configured-template-workflow span {
    font-size: 11px;
  }
}
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .modal-shell {
  height: min(680px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .modal-card,
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .modal-body {
  min-width: 0;
  overflow-x: hidden;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue {
  min-width: 0;
  overflow: visible;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-tabs button[aria-selected="true"] {
  color: #10284f;
  border-color: #85aaf0;
  background: #edf5ff;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-search {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 14px;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-item,
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-item * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #dfe8f4;
  border-radius: 10px;
  background: #fbfdff;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-item pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.45 ui-monospace, Consolas, monospace;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-item button {
  justify-self: start;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] button:focus-visible,
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] input:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .35);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .modal-shell {
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
  }

  .modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Project Tag Guide only: keep the shared modal shell compact and readable. */
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .modal-shell {
  width: min(94vw, 1060px);
  height: min(700px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .modal-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-header,
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-footer {
  flex: 0 0 auto;
  background: #fff;
  z-index: 1;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 250px) auto auto;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-heading h2 { margin: 0; color: #10284f; font-size: 21px; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-heading p { margin: 4px 0 0; color: #667892; font-size: 13px; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-search-wrap input { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 11px; border: 1px solid #d7e2f0; border-radius: 9px; }

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-tabs {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 3px;
  border: 1px solid #d9e4f1;
  border-radius: 10px;
  background: #f5f8fc;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-tabs button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #61738e;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  white-space: nowrap;
}

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-tabs button[aria-selected="true"] { color: #10284f; background: #fff; box-shadow: 0 1px 3px rgba(26, 53, 93, .14); }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 20px 18px; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue { overflow: hidden; }

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-filters { display: flex; flex-wrap: wrap; gap: 7px; overflow-x: hidden; padding: 1px 0 12px; margin-bottom: 2px; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-filter { flex: 0 0 auto; border: 1px solid #d9e4f1; border-radius: 999px; background: #fff; color: #526681; padding: 6px 10px; font-size: 12px; font-weight: 700; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-filter.is-active { border-color: #b7cced; background: #eaf3ff; color: #1255a3; }

.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card,
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card * { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card { position: relative; display: grid; gap: 6px; align-content: start; min-height: 112px; padding: 12px 38px 12px 12px; border: 1px solid #dce7f3; border-radius: 11px; background: #fbfdff; cursor: pointer; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card:hover { border-color: #a9c5eb; background: #f6faff; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card code { color: #1255a3; font-size: 12px; font-weight: 700; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card strong { color: #172f55; font-size: 13px; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-format,
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-context { border-radius: 999px; padding: 3px 7px; font-size: 10px; font-weight: 700; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-format { background: #edf3fb; color: #48617f; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-context { background: #fff5df; color: #966009; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-copy-icon { position: absolute; top: 9px; right: 9px; width: 26px; height: 26px; border: 1px solid #d6e3f2; border-radius: 7px; background: #fff; color: #1d5da8; font-size: 16px; line-height: 1; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card-detail { display: grid; gap: 5px; padding-top: 5px; border-top: 1px solid #e6eef8; color: #5d708b; font-size: 12px; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card-detail p,
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-loop-description { margin: 0; color: #63758e; font-size: 12px; line-height: 1.4; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card pre { margin: 0; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.45 ui-monospace, Consolas, monospace; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid #e3ebf5; color: #62748e; font-size: 12px; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-status { min-height: 18px; margin: 12px 0 0; font-size: 12px; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-status.success { color: #087b54; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-status.error { color: #b42318; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-empty { color: #62748e; }
.modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-notice { margin: 0 0 12px; padding: 8px 10px; border-radius: 8px; background: #fff8e8; color: #835b13; font-size: 12px; }

@media (max-width: 900px) {
  .modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-header { grid-template-columns: minmax(0, 1fr) auto; padding: 15px 16px 12px; }
  .modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-search-wrap { grid-column: 1 / -1; grid-row: 2; }
  .modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-tabs { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
  .modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-body,
  .modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-catalogue-footer { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 560px) {
  .modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-card-grid { grid-template-columns: minmax(0, 1fr); }
  .modal-overlay[data-modal-id="projectDocumentTagCatalogueModal"] .project-doc-tag-heading h2 { font-size: 19px; }
}

/* Configured-root folder explorer only. */
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .modal-shell { width: min(94vw, 940px); height: min(650px, calc(100vh - 40px)); max-height: calc(100vh - 40px); }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .modal-card { display: flex; flex-direction: column; height: 100%; min-width: 0; overflow: hidden; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-header,
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-footer { flex: 0 0 auto; background: #fff; z-index: 1; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-header { padding: 18px 20px 14px; border-bottom: 1px solid #e5edf6; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-header h2 { margin: 0; color: #10284f; font-size: 21px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-header p { margin: 4px 0 0; color: #687b95; font-size: 13px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 20px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-shell { display: grid; gap: 12px; min-width: 0; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(160px, 230px); gap: 10px; align-items: center; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-toolbar-actions { display: flex; gap: 5px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-breadcrumb { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; white-space: nowrap; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-breadcrumb button { overflow: hidden; max-width: 150px; border: 0; background: transparent; color: #1c5eab; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-search { width: 100%; min-width: 0; box-sizing: border-box; padding: 9px 11px; border: 1px solid #d7e2f0; border-radius: 9px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-location { color: #667892; font-size: 12px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-location small { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-list { display: grid; gap: 7px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid #dce7f3; border-radius: 10px; background: #fbfdff; color: #18345b; text-align: left; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-row:hover,
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-row.is-selected { border-color: #a9c8ed; background: #eef6ff; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-row-main { display: grid; gap: 2px; min-width: 0; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-row-main small { color: #71839b; font-size: 11px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-current { justify-self: start; border: 1px dashed #a7c0dd; border-radius: 8px; background: #fff; color: #195ba5; padding: 8px 10px; font-size: 12px; font-weight: 700; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-error { padding: 9px 10px; border-radius: 8px; background: #fff0f0; color: #ad2727; font-size: 12px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-state { padding: 26px 12px; color: #687b95; text-align: center; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid #e5edf6; color: #60738e; font-size: 12px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-footer > div { display: flex; gap: 8px; }
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] button:focus-visible,
.modal-overlay[data-modal-id="projectStorageFolderPickerModal"] input:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }
@media (max-width: 700px) {
  .modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .modal-shell { height: calc(100vh - 24px); max-height: calc(100vh - 24px); }
  .modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-search { grid-column: 1 / -1; }
  .modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-header,
  .modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-body,
  .modal-overlay[data-modal-id="projectStorageFolderPickerModal"] .project-storage-folder-picker-footer { padding-left: 16px; padding-right: 16px; }
}

/* Document Configuration workspace only. */
#main-project-document-configuration .project-doc-config-shell { display: grid; gap: 14px; }
#main-project-document-configuration .project-doc-config-page-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
#main-project-document-configuration .project-doc-config-page-actions { display: flex; align-items: center; gap: 8px; }
#main-project-document-configuration .project-doc-setup-status { flex: 0 0 auto; border-radius: 999px; padding: 7px 10px; background: #e8f8ee; color: #147044; font-size: 12px; font-weight: 700; }
#main-project-document-configuration .project-doc-setup-status.warning { background: #fff5df; color: #976008; }
#main-project-document-configuration .project-doc-config-top { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .8fr); gap: 14px; }
#main-project-document-configuration .project-doc-config-card { padding: 16px; border: 1px solid #dce7f3; border-radius: 15px; box-shadow: 0 4px 14px rgba(26, 53, 93, .05); }
#main-project-document-configuration .project-doc-storage-list { display: grid; gap: 8px; }
#main-project-document-configuration .project-doc-storage-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid #e2ebf5; border-radius: 10px; }
#main-project-document-configuration .project-doc-storage-row > small { grid-column: 2 / -1; }
#main-project-document-configuration .project-doc-storage-icon { color: #1b61ae; font-size: 18px; }
#main-project-document-configuration .project-doc-storage-row strong { display: block; color: #173459; font-size: 13px; }
#main-project-document-configuration .project-doc-storage-row small { display: block; overflow: hidden; color: #70829a; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
#main-project-document-configuration .project-doc-storage-state { border-radius: 999px; padding: 4px 7px; background: #eaf8ef; color: #147044; font-size: 10px; font-weight: 700; }
#main-project-document-configuration .project-doc-storage-state.bad { background: #fff0f0; color: #ae3030; }
#main-project-document-configuration .project-doc-tag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
#main-project-document-configuration .project-doc-tag-stat { padding: 12px; border-radius: 10px; background: #f7fbff; }
#main-project-document-configuration .project-doc-tag-stat strong { font-size: 22px; }
#main-project-document-configuration .project-doc-tag-stat span { margin: 3px 0 0; font-size: 11px; }
#main-project-document-configuration .project-doc-tag-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#main-project-document-configuration .project-doc-config-table-card { border: 1px solid #dce7f3; border-radius: 15px; }
#main-project-document-configuration .project-doc-config-table-head { display: flex; gap: 12px; align-items: center; padding: 15px 16px; }
#main-project-document-configuration .project-doc-config-table-head .dialog-toolbar { margin-left: auto; flex-wrap: wrap; }
#main-project-document-configuration #projectDocTemplateSearch { width: 180px; padding: 8px 10px; border: 1px solid #d7e2f0; border-radius: 8px; }
#main-project-document-configuration #projectDocTemplateStatusFilter { padding: 8px; border: 1px solid #d7e2f0; border-radius: 8px; background: #fff; }
#main-project-document-configuration .project-doc-config-table-wrap { max-height: 480px; overflow: auto; }
#main-project-document-configuration .project-doc-config-table { width: 100%; min-width: 0; table-layout: fixed; }
#main-project-document-configuration .project-doc-config-table th:nth-child(1) { width: 25%; }
#main-project-document-configuration .project-doc-config-table th:nth-child(2) { width: 20%; }
#main-project-document-configuration .project-doc-config-table th:nth-child(3) { width: 28%; }
#main-project-document-configuration .project-doc-config-table th:nth-child(4) { width: 17%; }
#main-project-document-configuration .project-doc-config-table th:nth-child(5) { width: 10%; }
#main-project-document-configuration .project-doc-config-table td { overflow: hidden; vertical-align: middle; }
#main-project-document-configuration .project-doc-config-target-row { background: #fff8df; box-shadow: inset 4px 0 0 #d88a00; }
#main-project-document-configuration .project-doc-config-table td:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#main-project-document-configuration .project-doc-status-cell { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
#main-project-document-configuration .project-doc-config-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid #e1ebf5; background: #fff; }
#main-project-document-configuration .project-doc-dirty-count { margin-right: auto; color: #9a6108; font-size: 12px; font-weight: 700; }
@media (max-width: 900px) { #main-project-document-configuration .project-doc-config-top { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  #main-project-document-configuration .project-doc-config-page-head,
  #main-project-document-configuration .project-doc-config-table-head { align-items: stretch; flex-direction: column; }
  #main-project-document-configuration .project-doc-config-table-head .dialog-toolbar { margin-left: 0; }
  #main-project-document-configuration #projectDocTemplateSearch { width: 100%; }
  #main-project-document-configuration .project-doc-storage-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  #main-project-document-configuration .project-doc-storage-row > button { grid-column: 2 / -1; }
  #main-project-document-configuration .project-doc-config-table thead { display: none; }
  #main-project-document-configuration .project-doc-config-table,
  #main-project-document-configuration .project-doc-config-table tbody,
  #main-project-document-configuration .project-doc-config-table tr,
  #main-project-document-configuration .project-doc-config-table td { display: block; width: 100%; box-sizing: border-box; }
  #main-project-document-configuration .project-doc-config-table tr { margin: 8px; border: 1px solid #dce7f3; border-radius: 10px; }
  #main-project-document-configuration .project-doc-config-table td { padding: 8px 10px; white-space: normal; }
}

/* Native dialogs must remain hidden until their owner explicitly opens them.
   The generic overlay class is also used by non-dialog modal shells. */
dialog.modal-overlay:not([open]):not(.is-open) {
  display: none !important;
}

dialog#projectMemberEditor.project-member-editor-modal.is-open {
  position: fixed;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100vw !important;
  max-width: none !important;
  height: 100vh;
  max-height: none !important;
  margin: 0;
  padding: 24px !important;
  background: transparent;
  box-sizing: border-box;
  overflow: hidden !important;
  overscroll-behavior: none;
}

dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-editor-form {
  width: min(920px, calc(100vw - 48px)) !important;
  max-width: calc(100vw - 48px) !important;
  height: min(780px, calc(100vh - 56px));
  max-height: calc(100vh - 56px);
  overflow: hidden;
}

dialog#projectMemberEditor.project-member-editor-modal.is-open .modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  flex: none;
  height: 100%;
  min-height: 0;
}

dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-editor-header,
dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-editor-footer {
  position: relative;
  top: auto;
  bottom: auto;
  flex: 0 0 auto;
  padding-inline: 24px;
}

dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-editor-body {
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  gap: 12px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 20px 24px 28px !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-form-section,
dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-form-grid {
  align-content: start;
}

dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-form-section {
  gap: 8px;
}

dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-form-grid {
  gap: 8px 12px;
  grid-auto-rows: min-content;
}

dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-field {
  align-content: start;
  gap: 3px;
}

dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-field-error {
  min-height: 12px;
  line-height: 12px;
}

@media (max-width: 640px) {
  dialog#projectMemberEditor.project-member-editor-modal.is-open {
    padding: 12px !important;
  }

  dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-editor-form {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
  }

  dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-editor-header,
  dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-editor-footer,
  dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-editor-body {
    padding-inline: 16px !important;
  }

  dialog#projectMemberEditor.project-member-editor-modal.is-open .project-member-editor-body {
    padding-block: 16px 22px !important;
  }
}
