/* One navigation pattern for every portal: a single list, no second dropdown. */
#workspace-primary-nav .rm-nav-links {
  display: grid;
  gap: 3px;
  min-width: 0;
}
#workspace-primary-nav .rm-nav-links a {
  display: block;
  min-height: 38px;
  padding: 8px 12px;
  color: #dce9ef;
  font-size: .82rem;
  line-height: 1.35;
  border-radius: 5px;
}
#workspace-primary-nav .rm-nav-links a[aria-current="page"] {
  color: #04182f;
  background: #91e9e5;
  font-weight: 700;
}
#workspace-primary-nav .rm-nav-links a:hover { background: #15374c; }
#workspace .sidebar .rm-nav-brand {
  display: block;
  margin: 0 0 16px;
  padding: 0 4px;
}
#workspace .sidebar .rm-nav-brand img {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
}

/* The same select control everywhere, with the full selected value visible. */
#workspace select,
#workspace .workspace select,
dialog select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 10px 38px 10px 12px;
  border: 1px solid #b9ccd5;
  border-radius: 8px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%234b6b7b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 12px 8px;
  color: #173746;
  font: inherit;
  font-size: .9rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
#workspace select:focus,
dialog select:focus {
  outline: 3px solid rgba(35, 167, 160, .25);
  outline-offset: 1px;
  border-color: #278f89;
}
#workspace select:disabled,
dialog select:disabled { opacity: .62; cursor: not-allowed; }
#workspace select option,
dialog select option { color: #173746; background: #fff; }
#workspace select[multiple],
#workspace select[size],
dialog select[multiple],
dialog select[size] {
  min-height: 112px;
  padding: 8px;
  background-image: none;
  white-space: normal;
  overflow: auto;
}
#workspace select[multiple] option,
#workspace select[size] option,
dialog select[multiple] option,
dialog select[size] option { padding: 5px 7px; }
#workspace select[multiple]:focus,
#workspace select[size]:focus { outline-offset: 1px; }

/* Settings hub: one place for the links that used to sit in the main nav. */
#workspace .rm-settings-hub { margin-top: 18px; }
#workspace .rm-settings-hub .link-grid { margin-top: 12px; }
#workspace .rm-settings-hub a {
  display: block;
  padding: 12px 14px;
  border: 1px solid #d7e5e9;
  border-radius: 8px;
  background: #fbfdfd;
  color: #1d5a68;
  text-decoration: none;
}
#workspace .rm-settings-hub a:hover { border-color: #8fc9c4; background: #f1faf8; }
#workspace .rm-autofill-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}
#workspace .rm-autofill-actions [role="status"] {
  color: #1d5a68;
  font-size: .8rem;
}
#workspace .rm-autofill-note {
  margin: 14px 0 0;
  color: #6d838e;
  font-size: .78rem;
  line-height: 1.55;
}
#workspace input[data-rm-autofilled="true"] { border-color: #9bcfc9; background-color: #f8fdfb; }
#workspace input[list] { background-image: none; }

/* Self-service sign-in settings on My account. */
#workspace .rm-account-security { margin-top: 18px; }
#workspace .rm-security-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
#workspace .rm-security-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d7e5e9;
  border-radius: 9px;
  background: #fbfdfd;
}
#workspace .rm-security-card h3 { margin: 0 0 10px; font-size: .95rem; color: #08243d; }
#workspace .rm-security-facts { margin: 0; display: grid; gap: 8px; }
#workspace .rm-security-facts > div { display: grid; gap: 2px; }
#workspace .rm-security-facts dt { color: #6d838e; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
#workspace .rm-security-facts dd { margin: 0; color: #173746; font-size: .84rem; overflow-wrap: anywhere; }
#workspace .rm-security-count { margin: 0 0 6px; font-weight: 700; color: #173746; font-size: .84rem; }
#workspace .rm-security-list { margin: 0; padding-left: 18px; color: #405d6b; font-size: .78rem; line-height: 1.5; }
#workspace .rm-security-actions { margin-top: 14px; }
#workspace .rm-security-status { min-height: 1.2em; margin: 10px 0 0; color: #1d5a68; font-size: .8rem; }
@media (max-width: 900px) {
  #workspace .rm-security-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  #workspace select, dialog select { font-size: 16px; min-height: 46px; }
}

/* The signed-in identity and sign-out action must stay legible in the narrow
   sidebar. Stack them instead of squeezing the name beside a wide button. */
#workspace .sidebar-controls .account-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}
#workspace .sidebar-controls .account-name {
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.35;
}
#workspace .sidebar-controls [data-logout] {
  width: 100%;
}

/* Keep the account block anchored at the bottom of the sidebar. The nav
   scrolls inside its own column when More is expanded. */
#workspace .sidebar .workspace-section-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
#workspace .sidebar .sidebar-controls {
  flex: 0 0 auto;
}

/* The workspace shell owns the only menu control. Its sidebar shows the one
   complete link list at every width. */

/* Settings stay collapsed until opened. The summary is the only control
   visible on arrival, so the page reads as a clean list of choices. */
#workspace .rm-settings-disclosure {
  margin: 12px 0;
  border: 1px solid #d7e3ea;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
#workspace .rm-settings-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 14px 18px;
  color: #123c51;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
#workspace .rm-settings-disclosure > summary::-webkit-details-marker { display: none; }
#workspace .rm-settings-disclosure > summary::after {
  content: "+";
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #c8dde1;
  border-radius: 50%;
  color: #17636c;
  background: #f2faf8;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}
#workspace .rm-settings-disclosure[open] > summary {
  border-bottom: 1px solid #e1ebef;
  background: #f7fbfb;
}
#workspace .rm-settings-disclosure[open] > summary::after { content: "−"; }
#workspace .rm-settings-disclosure > summary:hover { background: #f6fbfa; }
#workspace .rm-settings-disclosure > summary:focus-visible {
  outline: 3px solid rgba(35, 167, 160, .28);
  outline-offset: -3px;
}
#workspace .rm-settings-disclosure > .panel,
#workspace .rm-settings-disclosure > .rm-settings-panel {
  margin: 0 !important;
  padding: 16px 18px 18px !important;
  border: 0 !important;
  background: #fff;
}
#workspace .rm-settings-disclosure > .panel > h2:first-child { margin-top: 0; }
#workspace .rm-settings-disclosure .rm-autofill-note { margin-bottom: 0; }
#workspace .rm-settings-note {
  margin: 8px 0 14px;
  color: #6d838e;
  font-size: .8rem;
  line-height: 1.5;
}
@media (max-width: 520px) {
  #workspace .rm-settings-disclosure > summary { padding: 13px 14px; font-size: .9rem; }
  #workspace .rm-settings-disclosure > .panel,
  #workspace .rm-settings-disclosure > .rm-settings-panel { padding: 14px !important; }
}
/* Above the drawer breakpoint the complete sidebar is already visible. Keep
   one navigation control and one current-page heading, not a second Menu
   button or a repeated section label. */
#workspace .workspace-section-title { display: none; }
@media (min-width: 621px) {
  #workspace .workspace-nav-toggle { display: none !important; }
}
@media (max-width: 620px) {
  #workspace .sidebar.is-nav-open { position: relative; }
  #workspace .sidebar.is-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(4, 24, 47, .58);
  }
  #workspace .sidebar.is-nav-open .workspace-section-nav {
    position: relative;
    z-index: 51;
  }
  #workspace .sidebar.is-nav-open #workspace-primary-nav {
    display: grid;
    max-height: min(70vh, calc(100dvh - 210px));
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #315166;
    border-radius: 9px;
    background: #04182f;
    box-shadow: 0 18px 50px rgba(4, 24, 47, .55);
  }
  body:has(.sidebar.is-nav-open) { overflow: hidden; }
}
#workspace .rm-entitlement-summary{margin-top:12px;padding:14px;border:1px solid #dce9e7;border-radius:12px;background:#f7fbfa}
#workspace .rm-entitlement-summary-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
#workspace .rm-entitlement-summary-head strong{display:block;color:#08243d;font-size:.98rem}
#workspace .rm-entitlement-summary-head small{display:block;color:#5b7180;font-size:.76rem;margin-top:2px}
#workspace .rm-entitlement-status{display:inline-flex;align-items:center;border-radius:999px;padding:3px 8px;font-size:.64rem;font-weight:750;letter-spacing:.04em;text-transform:uppercase;background:#eef2f6;color:#405468;white-space:nowrap}
#workspace .rm-entitlement-status.good{background:#e6f6ee;color:#176b4a}
#workspace .rm-entitlement-status.attention{background:#fff4d6;color:#7a5300}
#workspace .rm-entitlement-status.danger{background:#fdecec;color:#9b2c2c}
#workspace .rm-entitlement-facts{display:grid;grid-template-columns:1fr 1fr;gap:9px 16px;margin:12px 0}
#workspace .rm-entitlement-facts div{min-width:0}
#workspace .rm-entitlement-facts dt{font-size:.64rem;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:#6b7f8d;margin-bottom:2px}
#workspace .rm-entitlement-facts dd{margin:0;font-size:.82rem;color:#17394d;overflow-wrap:anywhere}
#workspace .rm-entitlement-meter{height:7px;background:#e1ecea;border-radius:999px;overflow:hidden;margin:6px 0 8px}
#workspace .rm-entitlement-meter span{display:block;height:100%;background:#0f766e;border-radius:inherit}
#workspace .rm-entitlement-summary p{font-size:.82rem;line-height:1.55;color:#405468;margin:6px 0}
#workspace .rm-entitlement-summary .rm-entitlement-inclusions{font-size:.76rem;color:#31576a;background:#eef7f5;border:1px solid #d9ebe7;border-radius:8px;padding:7px 9px}
#workspace .rm-entitlement-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
#workspace .rm-entitlement-actions .button{font-size:.78rem}
@media(max-width:640px){#workspace .rm-entitlement-facts{grid-template-columns:1fr}#workspace .rm-entitlement-summary{padding:12px}}
#workspace [data-rm-language-mount]{margin:10px 0 4px}
#workspace .rm-language-switch{display:flex;flex-direction:column;gap:5px;align-items:flex-start;max-width:420px}
#workspace .rm-language-switch-label{font-size:.66rem;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:#5b7180}
#workspace .rm-language-switch select{width:100%;min-height:42px;padding:8px 34px 8px 11px;border:1px solid #c8d9d6;border-radius:8px;background:#fff;color:#08243d;font:inherit;font-size:.88rem}
#workspace .rm-language-switch select:focus-visible{outline:3px solid rgba(15,118,110,.3);outline-offset:2px}
#workspace .rm-language-current{font-size:.76rem;color:#31576a;margin:2px 0 0}
#workspace .msg-bubble-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:7px;padding-top:6px;border-top:1px solid rgba(15,118,110,.12)}
#workspace .msg-translate{border:0;background:transparent;color:#0f766e;font:inherit;font-size:.68rem;font-weight:750;padding:0;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
#workspace .msg-translate:disabled{color:#6b7f8d;cursor:wait;text-decoration:none}
#workspace .msg-translation-source{font-size:.62rem;color:#6b7f8d;line-height:1.4}
#workspace .msg-translation{margin-top:7px;padding:8px 10px;border-left:3px solid #0f766e;background:#f1faf8;border-radius:0 6px 6px 0;font-size:.78rem;line-height:1.55;color:#17394d;white-space:pre-wrap;overflow-wrap:anywhere}
#workspace .msg-translation[hidden]{display:none}
@media(max-width:780px){#workspace .msg-bubble-tools{gap:5px}#workspace .msg-translation-source{font-size:.58rem}}

/* Customer card: one KPI row, one compact reconciliation action. */
#workspace .customer-compliance-note {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
}
#workspace .customer-compliance-note .link-button {
  display: inline;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #147b76;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
#workspace .customer-compliance-note .link-button:hover { color: #0b4f4b; }

/* Renter contact: the same record is used by the agency and the trade. */
#workspace .rm-customer-renters {
  grid-column: 1 / -1;
  margin-top: 18px;
}
#workspace .rm-renter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
#workspace .rm-renter-head h2 { margin: 2px 0 0; }
#workspace .rm-renter-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #cfe2e5;
  border-radius: 999px;
  background: #f3faf9;
  color: #2b626c;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}
#workspace .rm-renter-panel-status { min-height: 1.2em; margin: 10px 0 0; color: #147b76; font-size: .8rem; }
#workspace .rm-renter-panel-status:empty { display: none; }
#workspace .rm-renter-table-wrap { overflow-x: auto; margin-top: 14px; }
#workspace .rm-renter-table { width: 100%; min-width: 760px; border-collapse: collapse; }
#workspace .rm-renter-table th {
  padding: 8px 10px;
  border-bottom: 1px solid #d7e5e9;
  color: #6d838e;
  font-size: .68rem;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
}
#workspace .rm-renter-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf3f4;
  color: #173746;
  font-size: .84rem;
  line-height: 1.45;
  vertical-align: top;
}
#workspace .rm-renter-table td strong { display: block; font-size: .86rem; }
#workspace .rm-renter-table td small { display: block; margin-top: 2px; color: #728690; font-size: .72rem; }
#workspace .rm-renter-table a { color: #147b76; text-decoration: underline; text-underline-offset: 2px; }
#workspace .rm-missing { color: #8a5b2a; font-size: .76rem; font-weight: 700; }
#workspace .rm-renter-messages { display: flex; flex-direction: column; gap: 5px; }
#workspace .rm-renter-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 7px;
  border: 1px solid #d7e5e9;
  border-radius: 999px;
  background: #f7fafb;
  color: #6d838e;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
}
#workspace .rm-renter-chip.is-on { border-color: #a8d9d3; background: #eefaf7; color: #147b76; }
#workspace .rm-renter-note { margin: 12px 0 0; color: #6d838e; font-size: .76rem; line-height: 1.55; }
#workspace .rm-renter-editor td { padding: 0; background: #f7fbfb; }
#workspace .rm-renter-form { padding: 16px; border-top: 1px solid #d7e5e9; }
#workspace .rm-renter-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#workspace .rm-renter-form-head h3 { margin: 2px 0 0; font-size: .95rem; }
#workspace .rm-renter-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #cfe2e5;
  border-radius: 50%;
  background: #fff;
  color: #365b67;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
#workspace .rm-renter-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
#workspace .rm-renter-fields label { display: grid; gap: 5px; color: #365b67; font-size: .78rem; font-weight: 700; }
#workspace .rm-renter-fields input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #b9ccd5; border-radius: 6px; background: #fff; color: #173746; font: inherit; font-size: .84rem; }
#workspace .rm-renter-fields input:focus { outline: 3px solid rgba(35, 167, 160, .25); outline-offset: 1px; border-color: #278f89; }
#workspace .rm-renter-consent { display: grid; gap: 6px; margin-top: 12px; }
#workspace .rm-renter-consent label { display: flex; align-items: flex-start; gap: 8px; color: #365b67; font-size: .8rem; line-height: 1.45; }
#workspace .rm-renter-consent input { margin-top: 3px; accent-color: #147b76; }
#workspace .rm-renter-status { min-height: 1.2em; margin: 10px 0 0; color: #6d838e; font-size: .76rem; }
#workspace .rm-error { color: #9a3f32; font-weight: 700; }

/* Document pages keep one clear way back to the parent record. */
#workspace .rm-document-exit {
  position: sticky;
  top: 10px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #cfe2e5;
  border-radius: 8px;
  background: rgba(247, 252, 252, .97);
  box-shadow: 0 4px 16px rgba(4, 24, 47, .06);
  backdrop-filter: blur(6px);
}
#workspace .rm-document-exit span { display: grid; gap: 2px; min-width: 0; }
#workspace .rm-document-exit strong { color: #0d3347; font-size: .78rem; }
#workspace .rm-document-exit small { color: #6d838e; font-size: .72rem; }
#workspace .rm-document-exit .button { flex: 0 0 auto; }
@media (max-width: 760px) {
  #workspace .rm-renter-fields { grid-template-columns: 1fr; }
  #workspace .rm-document-exit { position: static; align-items: flex-start; }
  #workspace .rm-document-exit .button { width: 100%; }
}
