:root{
  --rw-bg: #132033;
  --rw-panel: rgba(255, 255, 255, 0.94);
  --rw-panel-border: rgba(15, 23, 42, 0.12);
  --rw-text: #0f172a;
  --rw-muted: #475569;
  --rw-accent: #0ea5e9;
  --rw-accent-dark: #0369a1;
  --rw-navy: #102d4e;
  /* The platform page's blue (platform.css .pd-bar and .pd-signin): one gradient for buttons and the header, a longer one for the side menu. */
  --rw-navy-2: #1c4471;
  --rw-navy-shine: linear-gradient(180deg, #1c4471 0%, #102d4e 100%);
  --rw-navy-tall: linear-gradient(180deg, #1c4471 0%, #102d4e 60%, #0e243d 100%);
  --rw-green: #dcfce7;
  --rw-green-border: #86efac;
  --rw-gray: #e5e7eb;
  --rw-gray-border: #9ca3af;
  --rw-blue: #e0f2fe;
  --rw-blue-border: #7dd3fc;
  --rw-chat-assistant: #4ade80;
  --rw-chat-assistant-border: #15803d;
  --rw-chat-user: #94a3b8;
  --rw-chat-user-border: #334155;
  --rw-chat-agent: #38bdf8;
  --rw-chat-agent-border: #0369a1;
  --rw-chat-vendor: #f59e0b;
  --rw-chat-vendor-border: #b45309;
  --rw-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  --rw-radius: 18px;
  --rw-header-h: 48px;
  --rw-composer-h: 62px;
  --rw-chat-width: 100%;
  --rw-sidebar-width: 248px;
  --rw-gutter: 15px;
  --ra-page-end: 8px;
}

*,
*::before,
*::after{
  box-sizing: border-box;
}

html,
body{
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

input,
select,
textarea{
  font-size: 16px;
  font-family: inherit;
}

button{
  font-family: inherit;
}

body.ra-portal{
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--rw-text);
  font-family: "Iowan Old Style", Palatino, "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 0.8125rem;
  background: var(--rw-bg);
}

body.ra-portal.ra-portal--signed-in{
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}

.ra-portal__bg{
  position: fixed;
  inset: 0;
  background-color: var(--rw-bg);
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.42));
  z-index: 0;
}

.ra-portal__overlay{
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 42%);
  z-index: 0;
  pointer-events: none;
}

.ra-portal__header{
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px));
  padding: 4px var(--rw-gutter);
  padding-top: calc(4px + env(safe-area-inset-top, 0px));
  padding-left: calc(var(--rw-gutter) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--rw-gutter) + env(safe-area-inset-right, 0px));
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 35, 59, 0.72);
  backdrop-filter: blur(14px);
  color: #fff;
}

.ra-portal__brand{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}

.ra-portal__build{
  margin: 0;
  padding: 4px 8px;
  background: #e36b00;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

body.ra-portal--signed-in .ra-portal__build{
  display: none;
}

.ra-portal__brand-title{
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.ra-portal__brand-home{
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

body.ra-portal.ra-portal--page-scroll{
  height: auto;
  min-height: 100dvh;
  overflow: auto;
  background: #fff;
}

body.ra-portal.ra-portal--page-scroll .ra-portal__bg,
body.ra-portal.ra-portal--page-scroll .ra-portal__overlay{
  display: none;
}

body.ra-portal.ra-portal--page-scroll .ra-portal__header{
  position: static;
  background: #fff;
  color: #0f172a;
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: none;
}

body.ra-portal.ra-portal--page-scroll .ra-portal__brand-title,
body.ra-portal.ra-portal--page-scroll .ra-portal__mode-label,
body.ra-portal.ra-portal--page-scroll .ra-portal__company-name{
  color: #0f172a;
}

body.ra-portal.ra-portal--page-scroll .ra-portal__menu-btn{
  border-color: #d1d5db;
  background: #e5e7eb;
  color: #374151;
}

body.ra-portal.ra-portal--page-scroll .ra-portal__menu-btn-bars,
body.ra-portal.ra-portal--page-scroll .ra-portal__menu-btn-bars::before,
body.ra-portal.ra-portal--page-scroll .ra-portal__menu-btn-bars::after{
  background: #374151;
}

body.ra-portal.ra-portal--page-scroll .ra-portal__main{
  overflow: visible;
  height: auto;
  flex: none;
}

.ra-portal__roles[hidden],
.ra-portal__mode-label[hidden]{
  display: none !important;
}

.ra-portal__mode-label{
  margin: 0;
  justify-self: center;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-align: center;
}

.ra-portal--signed-in .ra-portal__header{
  grid-template-columns: auto 1fr auto;
}

.ra-portal--signed-in .ra-portal__brand{
  grid-column: 1;
  grid-row: 1;
}

.ra-portal--signed-in .ra-portal__mode-label{
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

.ra-portal--signed-in .ra-portal__header-actions{
  grid-column: 3;
  grid-row: 1;
}

.ra-portal__signed-in,
.ra-portal__user-chip{
  display: inline-flex;
  align-items: center;
  max-width: min(70vw, 16rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ra-portal__company-name{
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.ra-portal__company-name[hidden]{
  display: none !important;
}

.ra-portal__user-chip{
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.ra-portal__roles{
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: stretch;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 4;
  pointer-events: auto;
}

.ra-portal__role{
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

.ra-portal__role.is-active{
  background: #fff;
  color: var(--rw-text);
}

.ra-portal__header-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
  position: relative;
  z-index: 5;
  grid-column: 2;
  grid-row: 1;
}

.ra-portal__account-menu{
  position: relative;
}

.ra-portal__account-menu[hidden]{
  display: none !important;
}

.ra-portal__menu-btn{
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  cursor: pointer;
}

.ra-portal__menu-btn-bars,
.ra-portal__menu-btn-bars::before,
.ra-portal__menu-btn-bars::after{
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.ra-portal__menu-btn-bars{
  position: relative;
}

.ra-portal__menu-btn-bars::before,
.ra-portal__menu-btn-bars::after{
  content: "";
  position: absolute;
  left: 0;
}

.ra-portal__menu-btn-bars::before{
  top: -5px;
}

.ra-portal__menu-btn-bars::after{
  top: 5px;
}

.ra-portal__menu-list{
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  min-width: 168px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #28466d;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
  isolation: isolate;
}

.ra-portal__menu-list[hidden]{
  display: none !important;
}

.ra-portal__menu-item{
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ra-portal__menu-item:hover,
.ra-portal__menu-item.is-active{
  background: rgba(255, 255, 255, 0.18);
}

.ra-portal__menu-item[hidden]{
  display: none !important;
}

#rwAccountMenuList .ra-owner__nav-group{
  display: flex;
  flex-direction: column;
  width: 100%;
}

#rwAccountMenuList .ra-owner__nav-sub{
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  width: auto;
  margin: 0;
  padding: 0 0 0 10px;
  border: 0;
  border-radius: 0;
  background: #28466d;
  box-shadow: none;
  transform: none;
}

#rwAccountMenuList .ra-owner__nav-sub.is-modal{
  position: static;
  width: auto;
}

.ra-portal__menu-item--signout{
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0 0 8px 8px;
  color: #fda4af;
}

.ra-portal__ghost-btn[hidden],
.ra-portal__signed-in[hidden],
.ra-portal__user-chip[hidden]{
  display: none !important;
}

.ra-portal__ghost-btn{
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.ra-portal__main{
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ra-portal__main--signed-in{
  min-height: 0;
}

.ra-portal__main--signed-in .ra-portal__signin,
.ra-portal--signed-in .ra-portal__signin,
.ra-portal__signin[hidden]{
  display: none !important;
}

.ra-portal__signin{
  display: grid;
  place-items: center;
  flex: 1;
  padding: 24px var(--rw-gutter) 40px;
}

body.ra-portal.ra-portal--home{
  height: auto;
  min-height: 100dvh;
  overflow: auto;
  background: #fff;
  color: #111827;
}

body.ra-portal.ra-portal--home .ra-portal__bg,
body.ra-portal.ra-portal--home .ra-portal__overlay{
  display: none;
}

body.ra-portal.ra-portal--home .ra-portal__header{
  position: sticky;
  background: var(--rw-navy-shine);
  color: #fff;
  border-bottom: 1px solid #081628;
  backdrop-filter: none;
}

body.ra-portal.ra-portal--home .ra-portal__brand-title{
  color: #fff;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

body.ra-portal.ra-portal--home .ra-portal__account-menu{
  display: none;
}

body.ra-portal.ra-portal--home .ra-portal__menu-btn{
  border-color: #d1d5db;
  background: #f3f4f6;
  color: #374151;
}

body.ra-portal.ra-portal--home .ra-portal__menu-btn-bars,
body.ra-portal.ra-portal--home .ra-portal__menu-btn-bars::before,
body.ra-portal.ra-portal--home .ra-portal__menu-btn-bars::after{
  background: #374151;
}

body.ra-portal.ra-portal--home .ra-portal__main{
  overflow: visible;
  height: auto;
  flex: none;
}

body.ra-portal.ra-portal--home .ra-portal__signin{
  position: relative;
  display: block;
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.ra-home__pointer{
  display: none !important;
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.ra-home__pointer[hidden]{
  display: none !important;
}

.ra-home__pointer-svg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ra-home__pointer-glow,
.ra-home__pointer-line{
  fill: none;
  stroke-linejoin: miter;
  stroke-linecap: butt;
}

.ra-home__pointer-glow{
  stroke: #fff;
  stroke-width: 7;
}

.ra-home__pointer-line{
  stroke: #102d4e;
  stroke-width: 3;
}

.ra-home__stage{
  position: relative;
  width: 100%;
  height: 70vh;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 18px;
  background: #f3f4f6;
}

@media (max-width: 520px){
  body.ra-portal.ra-portal--home .ra-home__stage{
    width: calc(100% + 48px);
    margin-left: -24px;
    margin-right: -24px;
    border-radius: 0;
  }
}

.ra-home__hero{
  display: none;
  margin: 0;
}

@media (min-width: 521px){
  body.ra-portal.ra-portal--home .ra-portal__signin{
    width: 100%;
    min-height: calc(100dvh - var(--rw-header-h) - env(safe-area-inset-top, 0px));
    box-sizing: border-box;
  }

  body.ra-portal.ra-portal--home .ra-home__hero{
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 2;
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px));
    bottom: 0;
    left: 40px;
    justify-content: center;
    margin: 0;
    color: #fff;
    font-size: 90px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    transform: translateY(-100px);
  }

  body.ra-portal.ra-portal--home .ra-home__roles{
    position: relative;
    z-index: 2;
  }

  body.ra-portal.ra-portal--home .ra-home__stage{
    position: relative;
    z-index: auto;
    overflow: visible;
    background: transparent;
  }
}

body.ra-portal.ra-portal--home .ra-home__powered{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  z-index: 1;
}

body.ra-portal.ra-portal--home .ra-home__powered a{
  color: inherit;
  text-decoration: none;
}

body.ra-portal.ra-portal--home .ra-home__roles{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

@media (min-width: 521px){
  body.ra-portal.ra-portal--home .ra-home__roles{
    position: fixed;
    z-index: 4;
    left: 200px;
    right: 200px;
    bottom: 0;
    width: auto;
    height: 160px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 0 12px;
    border-radius: 0;
    border-top: 1px solid #081628;
    background-color: #0e243d;
    background-image: var(--rw-navy-shine);
    background-repeat: no-repeat;
    background-size: 100% var(--rw-header-h);
    background-position: top;
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.8s ease-out;
    animation-name: ra-home-bar-in;
  }

@keyframes ra-home-bar-in{
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

  body.ra-portal.ra-portal--home .ra-home__roles.is-in{
    transform: translateY(0);
  }

  body.ra-portal.ra-portal--home .ra-home__pointer-glow,
  body.ra-portal.ra-portal--home .ra-home__pointer-line{
    stroke: #fff;
  }
}

body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role{
  position: relative;
  border: 2px solid #102d4e;
  border-radius: 12px;
  padding: 12px 10px 11px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
  color: #102d4e;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 1px rgba(11, 35, 64, 0.05), 0 8px 16px rgba(11, 35, 64, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role::before{
  content: "";
  display: block;
  width: 22px;
  height: 3px;
  margin: 0 auto 8px;
  border-radius: 99px;
  background: var(--rw-navy-shine);
}

body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role:hover{
  border-color: #102d4e;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(11, 35, 64, 0.12);
}

body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role.is-active{
  border-color: #081628;
  background: var(--rw-navy-shine);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px rgba(11, 35, 64, 0.22);
}

body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role.is-active::before{
  background: #fff;
}

@media (min-width: 521px){
  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role{
    flex: 1 1 auto;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: #fff;
    font-size: 40px;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: none;
    text-align: center;
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role::before{
    display: none;
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role:not(:last-of-type)::after{
    content: "";
    position: absolute;
    top: 22%;
    bottom: 22%;
    right: 0;
    width: 1px;
    background: #fff;
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role:hover{
    transform: none;
    border-color: transparent;
    box-shadow: none;
    background: transparent;
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role.is-active{
    border-color: transparent;
    background: transparent;
    color: #fff;
    box-shadow: none;
    text-decoration: underline;
    text-underline-offset: 10px;
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role.is-active::before{
    display: none;
  }

  body.ra-portal.ra-portal--home #rwHomeSignIn.is-open{
    position: fixed;
    z-index: 6;
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px));
    right: 0;
    bottom: 200px;
    left: 0;
    padding: 24px;
  }
}

@media (max-width: 840px){
  body.ra-portal.ra-portal--home .ra-portal__signin{
    width: 100%;
    min-height: calc(100dvh - var(--rw-header-h) - env(safe-area-inset-top, 0px));
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body.ra-portal.ra-portal--home .ra-home__hero{
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 2;
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px));
    bottom: calc(108px + env(safe-area-inset-bottom, 0px));
    left: calc(16px + env(safe-area-inset-left, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    justify-content: center;
    margin: 0;
    color: #fff;
    font-size: clamp(28px, min(11vw, 8vh), 52px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    transform: none;
  }

  body.ra-portal.ra-portal--home .ra-home__stage{
    position: relative;
    z-index: auto;
    width: 100%;
    height: 0;
    min-height: 0;
    margin: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
  }

  body.ra-portal.ra-portal--home .ra-home__roles{
    position: fixed;
    z-index: 4;
    left: calc(12px + env(safe-area-inset-left, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: 0;
    width: auto;
    height: calc(90px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 0 4px calc(22px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    border-radius: 0;
    border-top: 1px solid #081628;
    background-color: #0e243d;
    background-image: var(--rw-navy-shine);
    background-repeat: no-repeat;
    background-size: 100% var(--rw-header-h);
    background-position: top;
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.8s ease-out;
  }

  body.ra-portal.ra-portal--home .ra-home__roles.is-in{
    transform: translateY(0);
  }

  body.ra-portal.ra-portal--home .ra-home__powered{
    bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role{
    flex: 1 1 auto;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    padding: 0 4px;
    background: transparent;
    color: #fff;
    font-size: clamp(14px, 4vw, 20px);
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: none;
    text-align: center;
    white-space: nowrap;
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role::before{
    display: none;
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role:not(:last-of-type)::after{
    content: "";
    position: absolute;
    top: 22%;
    bottom: 22%;
    right: 0;
    width: 1px;
    background: #fff;
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role:hover,
  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role.is-active{
    transform: none;
    border-color: transparent;
    background: transparent;
    color: #fff;
    box-shadow: none;
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role.is-active{
    text-decoration: underline;
    text-underline-offset: 6px;
  }

  body.ra-portal.ra-portal--home .ra-home__roles .ra-portal__role.is-active::before{
    display: none;
  }

  body.ra-portal.ra-portal--home #rwHomeSignIn.is-open{
    position: fixed;
    z-index: 6;
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px));
    right: 0;
    bottom: calc(108px + env(safe-area-inset-bottom, 0px));
    left: 0;
    padding: 16px;
  }
}


.ra-home__forgot{
  align-self: flex-start;
  margin: -8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #102d4e;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

body.ra-portal.ra-portal--home .ra-home__card .ra-portal__primary-btn{
  padding: 10px 14px;
  font-size: 0.92rem;
}

.ra-home__reveal:not(.is-open),
.ra-home__reveal[hidden]{
  display: none !important;
}

.ra-home__reveal.is-open{
  display: flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
}

.ra-home__reveal > .ra-home__card{
  width: min(420px, 100%);
  margin: 0;
  border: 2px solid #102d4e;
  background: #fff;
  box-shadow: 0 18px 40px rgba(11, 35, 64, 0.28);
}

body.ra-portal--home #rwAdminAddBtn{
  display: none !important;
}

body.ra-portal.ra-portal--home .ra-home__card .ra-portal__field input{
  border: 1px solid #6d8299;
}

.ra-email__table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.ra-email__table th,
.ra-email__table td{
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.ra-email__table tr[data-rw-email]{
  cursor: pointer;
}

.ra-email__toggle{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-weight: 600;
}

#rwInvoiceAnalysis .ra-email__toggle{
  width: fit-content;
}

#rwInvoiceAnalysis .ra-email__table th{
  white-space: nowrap;
}

#rwInvoiceAnalysis .ra-email__table td,
#rwEmailInvoices .ra-email__table td{
  white-space: normal;
}

#rwEmailInvoices .ra-email__table tr[data-rw-email-invoice]{
  cursor: pointer;
}

#rwEmailInvoiceEstimates{
  min-height: 0;
  height: auto;
  max-height: 4.8rem;
}

#rwEmailInvoiceHint,
#rwAgentInvoiceBatchListHint{
  color: #b91c1c;
  font-weight: 600;
}

#rwEmailInvoiceHint{
  display: block;
  min-height: 1lh;
}

.ra-invoice-doc-line{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

#rwEmailInvoiceForm .ra-invoice-approve-row{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

#rwEmailInvoiceForm .ra-invoice-approve-row #rwEmailInvoiceHint{
  margin: 0;
}

#rwEmailInvoiceForm .ra-invoice-approve-row .ra-estimate-send{
  width: auto;
  height: 32px;
  margin: 0 0 0 auto;
  flex: 0 0 auto;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--rw-navy-shine);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.ra-invoice-link-missing{
  color: #b91c1c;
  font-weight: 600;
}

#rwEmailInvoiceForm.ra-estimate-card{
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ra-invoice-doc-line[hidden],
#rwEmailInvoiceFileRow[hidden]{
  display: none !important;
}

#rwEmailInvoiceProperty.is-invalid,
#rwEmailInvoiceCategory.is-empty{
  color: #b91c1c;
}

#rwEmailInvoiceProperty option,
#rwEmailInvoiceCategory option{
  color: #0f172a;
}

#rwEmailInvoiceProperty option[value=""],
#rwEmailInvoiceProperty option[value="__invoice_address"],
#rwEmailInvoiceCategory option[value=""]{
  color: #b91c1c;
}

#rwEmailInvoiceForm .ra-estimate-pair select,
#rwEmailInvoiceForm .ra-estimate-grow,
#rwEmailInvoiceForm .ra-estimate-block input,
#rwEmailInvoiceForm .ra-estimate-block textarea,
#rwEmailInvoiceLinePage .ra-estimate-tax-amount input{
  height: 30px;
  min-height: 30px;
  padding: 2px 8px;
  font-size: 13px;
}

#rwEmailInvoiceForm #rwEmailInvoiceEstimates{
  height: auto;
  min-height: 84px;
  max-height: 126px;
  padding: 4px 8px;
}

#rwEmailInvoiceForm .ra-estimate-pair{
  margin-bottom: 6px;
}

.ra-invoice-scan{
  display: flex;
  align-items: center;
  gap: 10px;
}

#rwInvoiceScanDots{
  font-weight: 700;
  letter-spacing: 3px;
  min-width: 8em;
}

#rwEmailProcessing label:not(.ra-email__toggle){
  display: grid;
  gap: 4px;
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 700;
}

#rwEmailProcessing select{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 500;
}

.ra-email__body{
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
}

.ra-home__companies{
  display: grid;
  gap: 8px;
}

.ra-home__companies button{
  border: 1px solid #6d8299;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #102d4e;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

#rwSignInForm.is-picking-company .ra-portal__field,
#rwSignInForm.is-picking-company .ra-home__forgot,
#rwSignInForm.is-picking-company #rwSignInBtn{
  display: none;
}

.ra-home__card{
  margin-top: 28px;
  box-shadow: none;
  border: 1px solid #e5e7eb;
  background: #fff;
}

@media (max-width: 520px){
  body.ra-portal.ra-portal--home .ra-home__roles{
    grid-template-columns: 1fr 1fr;
  }
}

.ra-portal__card{
  width: min(var(--rw-chat-width), 100%);
  padding: 28px 24px;
  border: 1px solid var(--rw-panel-border);
  border-radius: var(--rw-radius);
  background: var(--rw-panel);
  box-shadow: var(--rw-shadow);
}

.ra-portal__card-title{
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.ra-portal__card-lead{
  margin: 0 0 18px;
  color: var(--rw-muted);
  line-height: 1.45;
}

.ra-portal__form,
.ra-portal__lead-form{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ra-portal__form[hidden],
.ra-portal__lead-form[hidden]{
  display: none !important;
}

.ra-portal__field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
}

.ra-portal__field-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

/* Three plans on the first row, Monthly / Yearly under them. */
.ra-plan-pick{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.ra-plan-pick[hidden]{
  display: none;
}

.ra-plan-pick .ra-plan-rect{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 64px;
  margin: 0;
  padding: 10px 12px;
  border: 2px solid #c5d0dc;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.ra-plan-pick .ra-plan-rect:has(input:checked){
  border-color: #16324f;
}

.ra-plan-rect__price{
  font-weight: 700;
}

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

@media (max-width: 800px){
  .ra-portal__field-row{
    grid-template-columns: 1fr;
  }
}

.ra-portal__field-legend{
  margin: 28px 0 0;
  font-weight: 650;
}

#rwAdminAddressFields{
  display: grid;
  gap: 12px;
}

#rwAdminAddressFields[hidden]{
  display: none;
}

#rwAdminPlanField:not([hidden]){
  margin-bottom: 20px;
}

.ra-portal__field-legend span{
  margin-left: 6px;
  font-weight: 500;
}

.ra-portal__password{
  position: relative;
  display: block;
}

.ra-portal__password input{
  padding-right: 44px;
}

.ra-portal__password-toggle{
  position: absolute;
  top: 50%;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6d8299;
  transform: translateY(-50%);
  cursor: pointer;
}

.ra-portal__password-toggle svg{
  width: 22px;
  height: 22px;
}

.ra-portal__password-toggle .ra-portal__eye-off{
  display: none;
}

.ra-portal__password-toggle.is-visible .ra-portal__eye{
  display: none;
}

.ra-portal__password-toggle.is-visible .ra-portal__eye-off{
  display: block;
}

.ra-portal__field input,
.ra-portal__field select{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  background: #fff;
  color: var(--rw-text);
  box-sizing: border-box;
}

.ra-portal__field .ra-portal__password input{
  padding-right: 44px;
}

.ra-portal__field--recent{
  margin-bottom: 8px;
}

.ra-portal__recent-select{
  cursor: pointer;
}

.ra-portal__recent-select:disabled{
  cursor: not-allowed;
  opacity: 0.7;
}

.ra-portal__field--inline input{
  min-width: 0;
}

.ra-portal__primary-btn,
.ra-portal__send-btn{
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--rw-accent), var(--rw-accent-dark));
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ra-portal__primary-btn{
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 16px rgba(11, 35, 64, 0.2);
}

.ra-portal__primary-btn:hover{
  filter: brightness(1.03);
}

.ra-portal__primary-btn:disabled,
.ra-portal__primary-btn[aria-disabled="true"],
.ra-portal__send-btn:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}

.ra-portal__hint{
  margin: 0;
  font-size: 0.82rem;
  color: #b45309;
}

.ra-portal__hint--error{
  color: #b91c1c;
}

.saas-opening{
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(22, 32, 48, 0.45);
}

.saas-opening[hidden]{
  display: none;
}

.saas-opening__card{
  display: grid;
  justify-items: center;
  gap: 14px;
  min-width: 240px;
  margin: 0;
  padding: 28px 32px;
  border-radius: 16px;
  background: #fff;
  color: #16324f;
  font-weight: 700;
}

.saas-opening__card p{
  margin: 0;
}

.saas-opening__spin{
  width: 36px;
  height: 36px;
  border: 3px solid #e6dfd4;
  border-top-color: #16324f;
  border-radius: 50%;
  animation: saas-spin 0.8s linear infinite;
}

.saas-opening--error .saas-opening__spin{
  display: none;
}

.saas-opening--error p{
  color: #b91c1c;
}

@keyframes saas-spin{
  to{ transform: rotate(360deg); }
}

#rwVerifyMailText{
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.4;
}

#rwVerifyMailModal .ra-portal__modal-actions{
  margin-top: 16px;
}

#rwVerifyMailOk{
  flex: 1 1 0;
  min-height: 48px;
}

.ra-portal__chat{
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.ra-portal__sidebar{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: calc(100vh - var(--rw-header-h));
  max-height: calc(100vh - var(--rw-header-h));
  padding: 14px 12px calc(14px + env(safe-area-inset-bottom, 0px));
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 35, 59, 0.82);
  backdrop-filter: blur(12px);
}

.ra-portal__sidebar[hidden]{
  display: none !important;
}

.ra-portal__sidebar-label{
  margin: 0;
  padding: 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.ra-portal__new-chat-btn{
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(14, 165, 233, 0.18);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.ra-portal__new-chat-btn:hover{
  background: rgba(14, 165, 233, 0.28);
}

.ra-portal__idle-panel{
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  max-width: var(--rw-chat-width);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.ra-portal__idle-panel[hidden]{
  display: none !important;
}

.ra-portal__idle-home{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  flex: 1;
  min-width: 0;
  margin-inline: 0;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
  overflow: hidden;
}

.ra-portal__idle-dropdown{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.ra-portal__idle-dropdown[hidden]{
  display: none !important;
}

.ra-portal__idle-select{
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--rw-text);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  box-sizing: border-box;
}

.ra-portal__idle-select:disabled{
  cursor: not-allowed;
  opacity: 0.7;
}

.ra-portal__idle-hint{
  margin: 0;
  color: #fde68a;
  font-size: 0.62rem;
  text-align: center;
}

.ra-portal__idle-btn{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  min-height: 44px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-align: center;
}

.ra-portal__idle-btn:hover:not(:disabled){
  background: rgba(255, 255, 255, 0.14);
}

.ra-portal__idle-btn[hidden]{
  display: none !important;
}

.ra-portal__idle-btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

.ra-portal__idle-btn--primary{
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(14, 165, 233, 0.28);
}

.ra-portal__idle-btn--primary:hover:not(:disabled){
  background: rgba(14, 165, 233, 0.38);
}

.ra-portal__idle-btn--ghost{
  margin-top: 2px;
  background: transparent;
}

.ra-portal__idle-btn .ra-portal__unread-dot{
  position: absolute;
  top: 10px;
  right: 12px;
}

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

.ra-portal__idle-list{
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
}

.ra-portal__idle-row{
  display: flex;
  align-items: stretch;
  flex-grow: 0;
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.ra-portal__idle-item{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.ra-portal__idle-item:hover{
  background: rgba(255, 255, 255, 0.14);
}

.ra-portal__idle-item.is-selected{
  border-color: rgba(56, 189, 248, 0.75);
  background: rgba(14, 165, 233, 0.28);
}

.ra-portal__idle-item-text{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.ra-portal__idle-item-titleline,
.ra-rowhead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.ra-portal__idle-item-title{
  min-width: 0;
  max-width: 100%;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ra-handler{
  flex: 0 1 auto;
  max-width: 46%;
  padding: 2px 8px;
  border-radius: 999px;
  background: #4a84c4;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ra-people__row span.ra-handler,
.ra-owner__property span.ra-handler,
.ra-vendor__row span.ra-handler,
.ra-portal__idle-item span.ra-handler{
  background: #4a84c4;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.ra-rowdate{
  color: #64748b;
  font-size: 0.78rem;
}

.ra-people__row .ra-rowdate,
.ra-vendor__row .ra-rowdate{
  display: block;
  margin-bottom: 8px;
}

.ra-estimate-list-line{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.ra-people__row .ra-rowhead + .ra-estimate-list-line{
  margin-top: 0.5lh;
}

.ra-estimate-list-money{
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: 16px;
  text-align: right;
  white-space: nowrap;
}

.ra-status-chip{
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  color: #000;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.ra-status-chip--occupied{
  background: #bbf7d0;
}

.ra-status-chip--leased{
  background: #fde68a;
}

.ra-status-chip--vacant,
.ra-status-chip--rejected{
  background: #fecaca;
}

.ra-status-chip--closed,
.ra-status-chip--done{
  background: #e2e8f0;
}

.ra-status-chip--approved,
.ra-status-chip--pay-full{
  background: #bbf7d0;
}

.ra-status-chip--paused{
  background: #fde68a;
}

/* Pay Vendors: a paused invoice stays listed, greyed, and cannot be selected or paid. */
#rwVendorPayRows tr.is-paused td{
  color: #94a3b8;
}

#rwVendorPayRows tr.is-paused input{
  opacity: 0.55;
  cursor: not-allowed;
}

#rwVendorPayRows [data-rw-vendor-pay-open]{
  cursor: pointer;
}

.ra-status-chip--waiting{
  background: #fecaca;
}

.ra-status-chip--received{
  background: #fed7aa;
}

.ra-status-chip--sent{
  background: #fde68a;
}

.ra-status-chip--pay-partial{
  background: #fde68a;
}

.ra-status-chip--pay-unpaid{
  background: #fecaca;
}

.ra-invoice-number-line{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 400;
}

.ra-invoice-select-all{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-weight: 700;
}

.ra-invoice-select-all[hidden]{
  display: none !important;
}

.ra-invoice-batch-row{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.ra-invoice-batch-body{
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.ra-invoice-batch-check,
.ra-invoice-select-all input{
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid #102d4e;
  border-radius: 2px;
  background: #fff;
  flex: 0 0 auto;
  vertical-align: middle;
}

.ra-invoice-batch-check:checked,
.ra-invoice-select-all input:checked{
  background: #102d4e;
  box-shadow: inset 0 0 0 3px #fff;
}

.ra-invoice-batch-close{
  border: 0;
  margin: 12px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.ra-invoice-batch-close[hidden]{
  display: none !important;
}

.ra-invoice-batch-close legend{
  font-weight: 700;
  margin-bottom: 4px;
}

.ra-invoice-batch-close label{
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

/* Pay now while the Treasury balance is still being read: a small spinner on that line only; the
   dialog stays usable and Pay waits for the balance. */
#rwAgentInvoiceBatchBalances.is-loading::before{
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 8px -1px 0;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.6;
  animation: ra-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce){
  #rwAgentInvoiceBatchBalances.is-loading::before{ animation-duration: 2.4s; }
}

/* Pay now with one invoice: Amount to pay, a $ box that starts at what the invoice owes (the agent
   may lower it), and "of $X owed" beside it. */
.ra-invoice-batch-amount{
  display: grid;
  grid-template-columns: minmax(0, 200px) auto;
  justify-content: start;
  align-items: center;
  gap: 6px 12px;
  margin: 16px 0 4px;
}

.ra-invoice-batch-amount[hidden]{
  display: none !important;
}

.ra-invoice-batch-amount__label{
  grid-column: 1 / -1;
  font-weight: 600;
}

.ra-invoice-batch-amount__money{
  position: relative;
  display: block;
}

.ra-invoice-batch-amount__money > span{
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.ra-invoice-batch-amount__money input{
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 0 12px 0 26px;
  border: 1px solid #94a3b8;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.ra-invoice-batch-amount__owed{
  color: #64748b;
  font-size: 0.9rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ra-invoice-address,
.ra-invoice-agent{
  display: block;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
}

.ra-estimate-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  flex: 0 0 auto;
}

.ra-estimate-dot--closed{
  background: #000;
}

.ra-estimate-thread{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.ra-estimate-note{
  margin: 0;
}

.ra-estimate-flow{
  margin: 12px 0;
  padding-left: 1.2rem;
}

.ra-estimate-flow time{
  font-weight: 700;
}

.ra-estimate-sheet{
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.ra-estimate-sheet th,
.ra-estimate-sheet td{
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}

.ra-estimate-sheet td:last-child,
.ra-estimate-sheet th:last-child{
  text-align: right;
  white-space: nowrap;
}

.ra-estimate-sheet tfoot td{
  font-weight: 700;
}

.ra-estimate-summary,
[data-rw-estimate-summary]{
  margin: 12px 0;
  white-space: pre-wrap;
  font-weight: 400;
}

.ra-estimate-line{
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}

.ra-estimate-line input[data-rw-line-text]{
  flex: 1 1 auto;
  min-width: 0;
}

.ra-estimate-card{
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #6d8299;
  border-radius: 16px;
  background: #fff;
}

.ra-batch-wrap{
  position: relative;
  display: inline-flex;
}

.ra-batch-menu{
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  display: grid;
  gap: 4px;
  min-width: 240px;
  padding: 8px;
  border: 2px solid #334155;
  border-radius: 12px;
  background: var(--rw-panel);
  box-shadow: var(--rw-shadow);
}

.ra-batch-menu[hidden]{
  display: none !important;
}

.ra-batch-menu button{
  border: 0;
  background: transparent;
  color: #102d4e;
  font: inherit;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.ra-owner-tx-min{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-weight: 700;
}

.ra-owner-tx-min input{
  width: 8rem;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.ra-estimate-pair{
  --ra-estimate-label: 7.5rem;
  display: grid;
  grid-template-columns: var(--ra-estimate-label) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.ra-linked-estimate{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  font-weight: 400;
}

.ra-linked-estimate__more{
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 0 4px;
}

.ra-linked-estimate__close{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-weight: 600;
}

.ra-estimate-invoice-links{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-weight: 400;
}

.ra-estimate-invoice-links button,
.ra-linked-estimate__link{
  border: 0;
  background: transparent;
  color: #0369a1;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.ra-estimate-pair span:first-child,
.ra-estimate-pair > span{
  font-weight: 700;
}

.ra-estimate-pair > span.ra-estimate-block{
  display: block;
  margin: 0;
  font-weight: 700;
}

.ra-linked-estimate{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  font-weight: 400;
}

.ra-linked-estimate__more{
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 0 4px;
}

.ra-linked-estimate__close{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-weight: 600;
}

.ra-estimate-invoice-links{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-weight: 400;
}

.ra-estimate-invoice-links button,
.ra-linked-estimate__link{
  border: 0;
  background: transparent;
  color: #0369a1;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.ra-estimate-desc{
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 10px;
}

.ra-estimate-desc > span:first-child{
  font-weight: 700;
}

.ra-estimate-desc > span:last-child{
  font-weight: 400;
  white-space: pre-wrap;
  border: 0;
  padding: 0;
  background: none;
}

.ra-estimate-pair[hidden]{
  display: none !important;
}

.ra-estimate-vendor-drop{
  position: relative;
  min-width: 0;
}

.ra-estimate-vendor-toggle{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.ra-estimate-pair .ra-estimate-vendor-toggle span{
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}

.ra-estimate-vendor-toggle::after{
  content: "";
  flex: 0 0 auto;
  margin-left: 8px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #64748b;
}

.ra-estimate-vendor-list{
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: calc(-1 * (var(--ra-estimate-label) + 8px));
  width: calc(100% + var(--ra-estimate-label) + 8px);
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.ra-estimate-search-drop > .ra-estimate-vendor-list{
  left: 0;
  width: 100%;
}

.ra-estimate-vendor-list[hidden]{
  display: none !important;
}

.ra-estimate-search{
  display: block;
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}

.ra-estimate-search::placeholder{
  color: #b91c1c;
  opacity: 1;
}

.ra-estimate-search-drop > select,
#rwAgentEstimateVendorToggle{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.ra-estimate-vendor-option{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 7px 12px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.ra-estimate-vendor-option[hidden]{
  display: none !important;
}

.ra-estimate-vendor-option:last-child{
  border-bottom: 0;
}

.ra-estimate-vendor-option.is-selected{
  background: #eff6ff;
}

.ra-estimate-vendor-name{
  font-size: 15px;
  font-weight: 500;
}

.ra-estimate-vendor-list .ra-people__tags{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ra-estimate-photo-page{
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #e2e8f0;
  color: #0f172a;
}

.ra-estimate-photo-page[hidden]{
  display: none !important;
}

#rwEstimatePhotoPage{
  display: flex;
  inset: auto;
  top: 10vh;
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(720px, calc(100vw - 48px));
  height: min(76vh, 760px);
  max-height: min(76vh, 760px);
  transform: translateX(-50%);
  z-index: 120;
  border: 2px solid #334155;
  border-radius: 10px;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
  overflow: hidden;
}

#rwEstimatePhotoPage .ra-estimate-photo-modal__bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 0;
}

#rwEstimatePhotoPage .ra-estimate-photo-modal__bar h2{
  margin: 0;
}

#rwEstimatePhotoPage .ra-estimate-photo-page__footer{
  justify-content: flex-end;
  gap: 8px;
  padding: 12px;
  background: #e2e8f0;
}

#rwEstimatePhotoPage .ra-estimate-photo-page__footer button{
  flex: 0 0 auto;
  width: auto;
  min-width: 88px;
  padding: 0 16px;
  border-radius: 10px;
}

#rwEstimatePhotoPage #rwEstimatePhotoSave{
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #fff;
}

.ra-estimate-line-page{
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #e2e8f0;
  color: #0f172a;
}

.ra-estimate-line-page[hidden]{
  display: none !important;
}

@media (max-width: 1023px){
  #rwAgentOwnerInvoiceEstimatePick:not([hidden]),
  #rwVendorInvoiceEstimatePick:not([hidden]),
  #rwAgentOwnerInvoiceLinePage:not([hidden]),
  #rwVendorInvoiceLinePage:not([hidden]),
  #rwAgentEstimateLinePage:not([hidden]),
  #rwVendorEstimateLinePage:not([hidden]){
    position: fixed !important;
    z-index: 80;
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px) + 5px) !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    height: auto !important;
    max-height: 50vh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: auto !important;
    margin: 0 !important;
    background: #e2e8f0;
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 16px 20px 1lh;
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
  }

}

.ra-estimate-line-page__fields{
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding: 16px 16px 24px;
  font-size: 1.125rem;
}

.ra-estimate-line-page .ra-estimate-tax-amount,
.ra-estimate-line-page .ra-estimate-tax-included,
.ra-estimate-line-page input{
  font-size: 1.125rem;
}

.ra-estimate-line-page .ra-estimate-tax-amount input{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 400;
}

.ra-estimate-line-page .ra-portal__chat-title-bar{
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#rwAgentEstimateLinePage .ra-owner__muted:empty,
#rwVendorEstimateLinePage .ra-owner__muted:empty{
  display: block;
  min-height: 1lh;
}

.ra-estimate-line-page .ra-portal__chat-title-text{
  width: auto;
  flex: 1 1 auto;
  color: #0f172a;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: left;
  margin-right: auto;
}

.ra-estimate-photo-page__scroll{
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 16px calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
}

.ra-estimate-photo-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.ra-estimate-photo-tile{
  position: relative;
  display: block;
  min-height: 120px;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.ra-estimate-photo-check{
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  border-radius: 6px;
  background: #fff;
}

.ra-estimate-photo-check input{
  width: 20px;
  height: 20px;
  margin: 0;
}

.ra-estimate-photo-open{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  padding: 0;
  border: 0;
  background: #fff;
  color: #0f172a;
  font: inherit;
  cursor: pointer;
}

.ra-estimate-photo-tile img,
.ra-estimate-photo-open img{
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.ra-estimate-owner-photos{
  margin-top: 8px;
}

.ra-estimate-owner-photos .ra-estimate-check{
  font-weight: 500;
  margin: 8px 0;
}

.ra-estimate-owner-photos .ra-estimate-photo-add,
#rwVendorEstimatePhotos .ra-estimate-photo-add,
#rwAgentOwnerInvoicePhotos .ra-estimate-photo-add,
#rwAgentOwnerInvoiceAddLine,
#rwAgentEstimateAddLine,
#rwAgentEstimatePreviewOpen,
#rwVendorInvoiceAddLine,
#rwVendorEstimateAddLine{
  display: inline;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-decoration: underline;
}

.ra-estimate-photo-add{
  display: block;
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  margin: 8px 0;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
}

.ra-estimate-photo-zoom{
  z-index: 90;
  background: #e2e8f0;
}

#rwEstimatePhotoZoom{
  inset: auto;
  top: 10vh;
  right: auto;
  bottom: auto;
  left: 50%;
  width: min(720px, calc(100vw - 48px));
  height: min(76vh, 760px);
  max-height: min(76vh, 760px);
  transform: translateX(-50%);
  z-index: 120;
  border: 2px solid #334155;
  border-radius: 10px;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
  overflow: hidden;
}

#rwEstimatePhotoZoom > .ra-estimate-bubble-x{
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}

.ra-estimate-photo-zoom__arrow{
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ra-estimate-photo-zoom__arrow--prev{ left: 12px; }
.ra-estimate-photo-zoom__arrow--next{ right: 12px; }

.ra-estimate-photo-zoom__arrow[hidden]{ display: none !important; }

.ra-invoice-paper__thanks{
  margin: 0;
  text-align: center;
}

.ra-invoice-paper__write{
  display: block;
  min-height: 1.2em;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  white-space: pre-wrap;
}

.ra-invoice-paper__write[data-placeholder]:empty::before{
  content: attr(data-placeholder);
  color: #94a3b8;
  font-weight: 400;
}

.ra-invoice-paper__line-tools{
  display: flex;
  justify-content: flex-end;
  margin: 0 0 4px;
}

.ra-invoice-paper__line-tools .ra-estimate-photo-add{
  width: 120px;
  text-align: right;
}

.ra-invoice-paper__amt .ra-invoice-paper__write{
  text-align: right;
}

.ra-invoice-paper__tax-toggle{
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #d6dde6;
  border-radius: 3px;
  padding: 0;
  background: #fff;
  color: transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.ra-invoice-paper__tax-toggle[data-on="1"]{
  color: #15803d;
  border-color: #bbf7d0;
  background: #f7fef9;
}

.ra-invoice-paper__thumbs{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
}

.ra-invoice-paper__thumbs img{
  width: 28px;
  height: 28px;
  object-fit: cover;
}

.ra-invoice-paper__thumbs .ra-estimate-photo-more{
  display: none;
}

.ra-estimate-save-v{
  position: absolute;
  top: 8px;
  right: 52px;
  z-index: 4;
  width: 36px;
  height: 36px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #15803d;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.ra-estimate-draft{
  position: relative;
  width: min(374px, 100%);
  margin: 0 auto 12px;
}

.ra-estimate-draft-trash{
  position: absolute;
  top: 28px;
  right: -30px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #b91c1c;
  cursor: pointer;
}

.ra-vendor-tax-note{
  margin: 0 0 12px;
  color: #b91c1c;
  font-weight: 650;
}

.ra-vendor-tax h3{
  margin: 0 0 8px;
}

.ra-estimate-keep-actions{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ra-estimate-keep-actions button{
  flex: 1 1 0;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#rwEstimateKeepSend{
  border-color: #14532d;
  background: #14532d;
  color: #fff;
}

#rwEstimateKeepAbandon{
  border-color: transparent;
  background: transparent;
  color: #b91c1c;
}

#rwVendorEstimateSave,
#rwAgentEstimateToOwner #rwAgentEstimateSaveLines{
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
  background: transparent;
  text-align: right;
}

#rwVendorEstimateAnswer{
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.ra-invoice-paper__attach{
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper-accent);
  cursor: pointer;
}

.ra-invoice-paper__attach svg{
  width: 22px;
  height: 22px;
}

.ra-invoice-paper-thumb .ra-invoice-paper__attach{
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  pointer-events: auto;
}

.ra-invoice-paper-thumb .ra-invoice-paper__attach svg{
  width: 36px;
  height: 36px;
}

.ra-estimate-photo-zoom__stage{
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.ra-estimate-photo-zoom__stage img{
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transform-origin: center center;
  will-change: transform;
}

.ra-estimate-photo-zoom__stage p{
  margin: 0;
  color: #0f172a;
  font-weight: 700;
}

@media (min-width: 1025px){
  .ra-estimate-photo-zoom__stage,
  .ra-estimate-photo-zoom__stage img{
    touch-action: auto;
  }
}

.ra-estimate-photo-page .ra-estimate-footer{
  position: static;
  z-index: 1;
  flex: 0 0 auto;
  width: 100%;
  display: flex !important;
}

.ra-estimate-photo-page__footer button + button{
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.28);
}

[data-rw-estimate-photo-line]{
  margin: 8px 0;
}

.ra-estimate-photo-thumbs{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ra-estimate-photo-thumb{
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  overflow: hidden;
  background: #e5e7eb;
  color: #0f172a;
  font: inherit;
  cursor: pointer;
}

.ra-estimate-photo-thumb img{
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  max-width: 28px;
  max-height: 28px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.ra-estimate-photo-more,
button[data-rw-estimate-photo-open]{
  display: block;
  margin-top: 8px;
  border: 0;
  padding: 0;
  background: none;
  color: #1d4ed8;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-align: left;
  cursor: pointer;
}

.ra-estimate-pair select{
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}

#rwVendorInvoiceProperty:has(option[value=""]:checked),
#rwVendorInvoiceProperty option[value=""],
#rwAgentOwnerInvoiceProperty:has(option[value=""]:checked),
#rwAgentOwnerInvoiceProperty option[value=""]{
  color: #b91c1c;
  font-size: 17px;
}

.ra-estimate-block input,
.ra-estimate-block textarea,
.ra-estimate-grow,
.ra-estimate-readonly{
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 400;
}

.ra-estimate-block{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
  font-weight: 400;
}

.ra-estimate-tax-line,
.ra-estimate-send-row{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.ra-estimate-tax-line .ra-estimate-send{
  width: auto;
  margin: 0 0 0 auto;
}

.ra-estimate-tax-line{
  flex-direction: column;
  align-items: flex-start;
}

.ra-estimate-tax-rate{
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

#rwVendorEstimateApplyTax,
#rwAgentEstimateApplyTax,
#rwAgentEstimateCommissionView{
  display: block;
  margin-top: 8px;
}

#rwVendorEstimateHint.ra-estimate-alert,
#rwAgentEstimateEditHint.ra-estimate-alert{
  color: #b91c1c;
  font-size: 1.125rem;
}

#rwVendorInvoiceHint.ra-estimate-alert,
#rwVendorInvoiceLineHint.ra-estimate-alert{
  color: #b91c1c;
}

.ra-estimate-prepare{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ra-estimate-prepare-btn{
  appearance: none;
  display: block;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.ra-estimate-send-row .ra-estimate-send{
  width: auto;
  margin: 0 0 0 auto;
}

#rwVendorEstimateTaxAmount,
#rwAgentEstimateTaxAmount,
#rwVendorInvoiceTaxAmount,
#rwAgentOwnerInvoiceTaxAmount,
#rwAgentTaxRate,
#rwVendorTaxRate{
  width: 5ch;
  box-sizing: content-box;
}

#rwVendorEstimateEdit .ra-estimate-gap{
  height: 4px;
}

#rwVendorEstimateEdit .ra-estimate-block{
  margin-top: 4px;
}

.ra-estimate-grid td[data-rw-estimate-line-item]{
  position: relative;
}

.ra-estimate-grid td[data-rw-estimate-line-text]{
  white-space: pre-wrap;
}

.ra-invoice-sheet-tools{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 1.3em;
  margin: 0 0 4px;
}

#rwAgentOwnerInvoiceCloseSlot,
#rwVendorInvoiceCloseSlot{
  margin-right: auto;
}

.ra-invoice-sheet-tools .ra-linked-estimate__close{
  margin: 0;
}

#rwAgentOwnerInvoicePreview .ra-estimate-grid.ra-invoice-edit-grid th:nth-child(1),
#rwAgentOwnerInvoicePreview .ra-estimate-grid.ra-invoice-edit-grid td:nth-child(1){ width: 24%; }
#rwAgentOwnerInvoicePreview .ra-estimate-grid.ra-invoice-edit-grid th:nth-child(2),
#rwAgentOwnerInvoicePreview .ra-estimate-grid.ra-invoice-edit-grid td:nth-child(2){ width: 46%; }
#rwAgentOwnerInvoicePreview .ra-estimate-grid.ra-invoice-edit-grid th:nth-child(3),
#rwAgentOwnerInvoicePreview .ra-estimate-grid.ra-invoice-edit-grid td:nth-child(3){ width: 16%; }
#rwAgentOwnerInvoicePreview .ra-estimate-grid.ra-invoice-edit-grid th:nth-child(4),
#rwAgentOwnerInvoicePreview .ra-estimate-grid.ra-invoice-edit-grid td:nth-child(4){
  width: 14%;
  text-align: center;
}

#rwAgentOwnerInvoicePreview .ra-invoice-edit-grid .ra-invoice-cell,
#rwAgentEstimatePreview .ra-invoice-edit-grid .ra-invoice-cell{
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit;
  font: inherit;
  line-height: 1.35;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
}

#rwAgentOwnerInvoicePreview .ra-invoice-edit-grid .ra-invoice-cell::placeholder,
#rwAgentEstimatePreview .ra-invoice-edit-grid .ra-invoice-cell::placeholder{
  color: #94a3b8;
}

#rwAgentOwnerInvoicePreview .ra-invoice-edit-grid textarea.ra-invoice-cell,
#rwAgentEstimatePreview .ra-invoice-edit-grid textarea.ra-invoice-cell{
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#rwAgentEstimatePreview .ra-estimate-grid.ra-invoice-edit-grid th:nth-child(1),
#rwAgentEstimatePreview .ra-estimate-grid.ra-invoice-edit-grid td:nth-child(1){ width: 20%; }
#rwAgentEstimatePreview .ra-estimate-grid.ra-invoice-edit-grid th:nth-child(2),
#rwAgentEstimatePreview .ra-estimate-grid.ra-invoice-edit-grid td:nth-child(2){ width: 38%; }
#rwAgentEstimatePreview .ra-estimate-grid.ra-invoice-edit-grid th:nth-child(3),
#rwAgentEstimatePreview .ra-estimate-grid.ra-invoice-edit-grid td:nth-child(3){ width: 14%; }
#rwAgentEstimatePreview .ra-estimate-grid.ra-invoice-edit-grid th:nth-child(4),
#rwAgentEstimatePreview .ra-estimate-grid.ra-invoice-edit-grid td:nth-child(4){ width: 16%; }
#rwAgentEstimatePreview .ra-estimate-grid.ra-invoice-edit-grid th:nth-child(5),
#rwAgentEstimatePreview .ra-estimate-grid.ra-invoice-edit-grid td:nth-child(5){
  width: 12%;
  text-align: center;
}

.ra-invoice-photo-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ra-estimate-photo-row{
  align-items: flex-start;
}

.ra-estimate-photo-row #rwAgentEstimatePreviewOpen{
  flex: 0 0 auto;
  margin: 8px 0 0 auto;
}

.ra-invoice-paper-overlay{
  position: fixed !important;
  inset: 0 !important;
  z-index: 100;
  display: flex !important;
  flex-direction: column !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 24px !important;
  background: rgba(15, 23, 42, 0.55);
  overflow-y: auto !important;
  box-sizing: border-box;
}

.ra-invoice-paper-overlay[hidden]{
  display: none !important;
}

.ra-invoice-paper-shell{
  position: relative;
  flex: 0 0 auto;
  width: min(708px, 100%);
  margin: auto;
}

:is(#rwOwnerEstimateDetail, #rwAgentEstimateDetail, #rwVendorEstimateDetail, #rwVendorEstimateForm, #rwAgentOwnerInvoiceDetail, #rwOwnerLedgerInvoice, #rwOwnerTxDetail, #rwAgentInvoiceDetail, #rwVendorInvoiceDetail, #rwVendorLedgerDetail) .ra-estimate-story.ra-estimate-story--paper-thumb{
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ra-estimate-story--paper-thumb > .ra-estimate-reply{
  margin: 0 0 8px;
}

.ra-invoice-paper-thumb{
  width: min(374px, 100%);
  margin: 0 auto;
  cursor: zoom-in;
  border-radius: 6px;
}

.ra-invoice-paper-thumb:focus-visible{
  outline: 2px solid #16a34a;
  outline-offset: 3px;
}

.ra-invoice-paper-thumb .ra-invoice-paper{
  zoom: 0.44;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.ra-invoice-file-thumb{
  width: calc(816px * 0.44);
  max-width: 100%;
  height: calc(1056px * 0.44);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.ra-invoice-file-thumb .ra-invoice-file-pagelet{
  width: 816px;
  height: 1056px;
  transform: scale(0.44);
  transform-origin: top left;
  overflow: hidden;
  pointer-events: none;
  background: #fff;
}

.ra-invoice-file-thumb iframe,
.ra-invoice-file-thumb img{
  display: block;
  width: 816px;
  height: 1056px;
  border: 0;
  object-fit: contain;
  object-position: top center;
  background: #fff;
  pointer-events: none;
}

.ra-invoice-file-thumb .ra-invoice-doc{
  width: 816px;
  min-height: 1056px;
  box-sizing: border-box;
  padding: 48px 56px 36px;
  background: #fff;
}

#rwVendorEstimateForm.is-sheet #rwVendorEstimateAnswer{
  position: fixed;
  z-index: 90;
  top: calc(env(safe-area-inset-top, 0px) - 5px);
  left: 50%;
  transform: translateX(-50%);
  width: min(708px, calc(100vw - 32px));
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px);
  margin: 0;
  padding: 0;
  overflow: auto;
  background: transparent;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
}

#rwVendorEstimateForm.is-sheet #rwVendorEstimateAnswer > .ra-estimate-save-v,
#rwVendorEstimateForm.is-sheet #rwVendorEstimateAnswer > .ra-invoice-paper-x{
  position: absolute;
  top: 10px;
  z-index: 2;
  margin: 0;
}

#rwVendorEstimateForm.is-sheet #rwVendorEstimateAnswer > .ra-invoice-paper-x{
  right: 12px;
}

#rwVendorEstimateForm.is-sheet #rwVendorEstimateAnswer > .ra-estimate-save-v{
  right: 52px;
}

#rwVendorEstimateForm.is-sheet .ra-invoice-paper{
  width: 100%;
  box-sizing: border-box;
}

.ra-invoice-paper-shell .ra-invoice-paper{
  zoom: 0.864;
}

.ra-invoice-paper-shell .ra-invoice-paper-x{
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
}

.ra-invoice-paper{
  --paper-accent: #203e64;
  --paper-soft: #eef4fb;
  --paper-line: #dbe4ee;
  --paper-muted: #64748b;
  --paper-accent2: #3b82c4;
  --paper-head-line: #c7d7ea;
  --paper-stripe: #fafcfe;
  position: relative;
  background: #fff;
  color: #0f172a;
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  padding: 48px 56px 36px;
  border-top: 8px solid var(--paper-accent);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  user-select: text;
}

.ra-invoice-paper__head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--paper-line);
}

.ra-invoice-paper__brand{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ra-invoice-paper__mark{
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--paper-accent), var(--paper-accent2));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ra-invoice-paper__company{
  font-size: 22px;
  font-weight: 700;
  color: var(--paper-accent);
  overflow-wrap: anywhere;
}

.ra-invoice-paper__title{
  text-align: right;
}

.ra-invoice-paper__title h2{
  margin: 0 0 1lh;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-accent);
}

.ra-invoice-paper__title dl{
  display: grid;
  gap: 2px;
  margin: 0;
}

.ra-invoice-paper__title dl > div{
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.ra-invoice-paper__title dt{
  color: var(--paper-muted);
}

.ra-invoice-paper__title dd{
  margin: 0;
  min-width: 90px;
  font-weight: 600;
}

.ra-invoice-paper__parties{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

.ra-invoice-paper h4{
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-accent2);
}

.ra-invoice-paper__parties p,
.ra-invoice-paper__summary p{
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ra-invoice-paper__parties p:first-of-type{
  font-weight: 600;
}

.ra-invoice-paper__grid{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ra-invoice-paper__grid th{
  padding: 10px 12px;
  background: var(--paper-soft);
  color: var(--paper-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: 2px solid var(--paper-head-line);
}

.ra-invoice-paper__grid td{
  padding: 12px;
  border-bottom: 1px solid var(--paper-line);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.ra-invoice-paper__grid tbody tr:nth-child(even) td{
  background: var(--paper-stripe);
}

.ra-invoice-paper__grid .ra-invoice-paper__n{ width: 40px; color: var(--paper-muted); }
.ra-invoice-paper__grid th:nth-child(2){ width: 26%; }
.ra-invoice-paper__grid .ra-invoice-paper__tax{ width: 80px; text-align: center; }
.ra-invoice-paper__grid td.ra-invoice-paper__tax{ color: var(--paper-accent2); font-weight: 700; }
.ra-invoice-paper__grid .ra-invoice-paper__amt{ width: 120px; text-align: right; }

.ra-invoice-paper__item{
  font-weight: 600;
}

.ra-invoice-paper__desc{
  color: #334155;
  white-space: pre-wrap;
}

.ra-invoice-paper__empty{
  text-align: center;
  color: var(--paper-muted);
}

.ra-invoice-paper__totals{
  width: min(300px, 100%);
  margin: 16px 0 0 auto;
}

.ra-invoice-paper__trow{
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  color: #334155;
}

.ra-invoice-paper__trow--total{
  margin-top: 6px;
  padding: 12px;
  border-radius: 8px;
  background: var(--paper-accent);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.ra-invoice-paper__summary{
  margin-top: 28px;
  padding: 16px 18px;
  border-left: 4px solid var(--paper-accent2);
  background: var(--paper-soft);
  border-radius: 0 8px 8px 0;
}

.ra-invoice-paper__foot{
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-line);
  text-align: center;
  color: var(--paper-muted);
  font-size: 13px;
}

.ra-invoice-paper__linked{
  margin: 0 0 12px;
  text-align: left;
}

@media print{
  .ra-no-print{
    display: none !important;
  }
}

@media (max-width: 640px){
  .ra-invoice-paper{ padding: 28px 18px 24px; }
  .ra-invoice-paper__head{ flex-direction: column; }
  .ra-invoice-paper__title{ text-align: left; }
  .ra-invoice-paper__title dl > div{ justify-content: flex-start; }
  .ra-invoice-paper__parties{ grid-template-columns: 1fr; }
  .ra-invoice-paper__grid .ra-invoice-paper__n,
  .ra-invoice-paper__grid .ra-invoice-paper__tax{ display: none; }
}

.ra-invoice-paper--estimate{
  --paper-accent: #14532d;
  --paper-accent2: #16a34a;
  --paper-soft: #ecfdf3;
  --paper-line: #d7eadf;
  --paper-head-line: #bbe5cb;
  --paper-stripe: #f8fdf9;
}

.ra-invoice-paper--platform{
  --paper-accent: #6b4f2a;
  --paper-accent2: #a67c45;
  --paper-soft: #f7f0e3;
  --paper-line: #e6d8bf;
  --paper-head-line: #d9c4a0;
  --paper-stripe: #fcf8f1;
}

/* The owner's paper: the invoice blue. */
.ra-invoice-paper--owner{
  --paper-accent: #203e64;
  --paper-accent2: #3b82c4;
  --paper-soft: #eef4fb;
  --paper-line: #dbe4ee;
  --paper-head-line: #c7d7ea;
  --paper-stripe: #fafcfe;
}

.ra-invoice-paper__stamp{
  position: absolute;
  top: 46px;
  left: 50%;
  z-index: 2;
  max-width: 12em;
  margin: 0;
  padding: 5px 10px 4px;
  border: 3px solid #9f1239;
  border-radius: 4px;
  outline: 2px solid #9f1239;
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.88);
  color: #9f1239;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-align: center;
  transform: translateX(-50%) rotate(-8deg);
  pointer-events: none;
}

/* The owner's APPROVED is good news: green. REJECTED keeps the red stamp. */
.ra-invoice-paper__stamp--approved{
  border-color: #15803d;
  outline-color: #15803d;
  color: #15803d;
}

/* Who decided ("by limit" / "by owner"), small under the stamp at the same tilt. */
.ra-invoice-paper__stamp-note{
  position: absolute;
  top: 98px;
  left: 50%;
  z-index: 2;
  margin: 0;
  color: #9f1239;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-8deg);
  pointer-events: none;
}

.ra-invoice-paper__stamp-note--approved{
  color: #15803d;
}

.ra-estimate-reply-slot{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: min(374px, 100%);
  margin: 2px auto 0;
}

.ra-estimate-reply-slot .ra-estimate-reply,
.ra-estimate-reply-slot .ra-estimate-send{
  width: auto;
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
}

.ra-estimate-reply-slot .ra-estimate-reply-compose{
  width: 100%;
}

#rwAgentOwnerInvoicePreview .ra-invoice-tax-cell input,
#rwAgentEstimatePreview .ra-invoice-tax-cell input{
  width: 16px;
  height: 16px;
  margin: 0;
}

#rwAgentOwnerInvoicePreview [data-rw-owner-invoice-summary-slot],
#rwAgentEstimatePreview [data-rw-agent-estimate-summary-slot]{
  text-align: left;
}

.ra-invoice-summary-label{
  display: block;
  margin: 0 0 4px;
  font-weight: 700;
}

#rwAgentOwnerInvoicePreview [data-rw-owner-invoice-summary-slot] #rwAgentOwnerInvoiceDesc,
#rwAgentEstimatePreview [data-rw-agent-estimate-summary-slot] #rwAgentEstimateEditDesc{
  display: block;
  width: 100%;
  min-height: 1lh;
  margin: 0;
  padding: 0;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  font: inherit;
  resize: none;
  overflow: hidden;
  box-sizing: border-box;
}

#rwAgentOwnerInvoiceDescHome[hidden],
#rwAgentEstimateEditDescHome[hidden]{
  display: none !important;
}

#rwAgentOwnerInvoiceForm .ra-estimate-form-head,
#rwVendorInvoiceForm .ra-estimate-form-head{
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

#rwAgentOwnerInvoiceNumber,
#rwVendorInvoiceNumber{
  color: #64748b;
  font-weight: 500;
}

#rwAgentOwnerInvoiceForm .ra-estimate-form-head .ra-estimate-bubble-x,
#rwVendorInvoiceForm .ra-estimate-form-head .ra-estimate-bubble-x{
  margin-left: auto;
}

#rwAgentOwnerInvoiceEdit,
#rwVendorInvoiceEdit{
  margin-top: 5px;
}

#rwAgentOwnerInvoiceEdit .ra-estimate-block,
#rwVendorInvoiceEdit .ra-estimate-block{
  margin: 0;
}

#rwAgentOwnerInvoiceDesc,
#rwVendorInvoiceDesc{
  border-radius: 4px;
}

.ra-estimate-line-commission{
  color: #16a34a;
  font-weight: 700;
}

.ra-estimate-commission-note,
.ra-estimate-commission-lack{
  margin: 12px 0 0;
  font-weight: 700;
}

.ra-estimate-commission-note{
  color: #16a34a;
}

.ra-estimate-commission-lack{
  color: #b91c1c;
}

#rwEstimateReadyConfirm[hidden],
#rwEstimateReadyReview[hidden],
#rwEstimatePhotoCamera[hidden]{
  display: none !important;
}

#rwEstimateReadyModal.is-review .ra-portal__modal{
  width: 50vw;
  max-width: 50vw;
  height: auto;
  max-height: calc(100dvh - var(--rw-header-h) - 13px);
  overflow: auto;
  background: #e2e8f0;
  padding-bottom: 1lh;
}

#rwEstimateReadyReview .ra-portal__modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

#rwEstimateReadyReview .ra-portal__modal-actions button{
  flex: 0 0 auto;
  width: auto;
  min-height: 36px;
  height: 36px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

#rwEstimateReadySend{
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 0;
}

.ra-estimate-form-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ra-estimate-form-head h3{
  margin: 0;
}

#rwVendorInvoiceForm .ra-estimate-form-head{
  align-items: center;
  flex-wrap: nowrap;
  margin-bottom: 8px;
}

#rwVendorInvoiceCancel{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 22px;
  margin: -6px 0 0;
  font-size: 26px;
  line-height: 1;
}

#rwAgentOwnerEstimateHead .ra-estimate-form-head,
#rwAgentEstimateForm .ra-estimate-form-head{
  align-items: center;
  margin-bottom: 12px;
}

#rwAgentOwnerEstimateHead .ra-estimate-form-head h3,
#rwAgentEstimateForm .ra-estimate-form-head h3{
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
}

.ra-estimate-choose{
  color: #dc2626;
  font-weight: 600;
}

.ra-estimate-pair--desc{
  align-items: start;
}

.ra-estimate-pair--desc textarea{
  width: 100%;
  box-sizing: border-box;
}

.ra-estimate-picked{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px 7.5rem;
}

.ra-estimate-picked img{
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.ra-estimate-bubble-x{
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.ra-estimate-story--unsent{
  position: relative;
}

.ra-estimate-story--unsent > .ra-estimate-bubble-x{
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.ra-estimate-line-t{
  position: absolute;
  right: 100%;
  margin-right: 6px;
  top: 8px;
  color: #1d4ed8;
  font-weight: 700;
  line-height: 1.2;
}

.ra-estimate-line-x{
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}

#rwVendorEstimateAnswer,
#rwAgentEstimateToOwner{
  overflow: visible;
}

#rwVendorEstimatePreview,
#rwVendorEstimatePreview .ra-estimate-grid,
#rwAgentEstimatePreview,
#rwAgentEstimatePreview .ra-estimate-grid,
#rwVendorInvoicePreview,
#rwVendorInvoicePreview .ra-estimate-grid,
#rwVendorInvoiceBody .ra-estimate-grid,
#rwAgentInvoiceBody .ra-estimate-grid,
#rwAgentOwnerInvoicePreview,
#rwAgentOwnerInvoicePreview .ra-estimate-grid,
#rwAgentOwnerInvoiceBody .ra-estimate-grid,
#rwOwnerLedgerInvoiceBody .ra-estimate-grid{
  overflow: visible;
}

#rwVendorEstimatePreview .ra-invoice-paper__amt{
  position: relative;
}

#rwVendorEstimatePreview .ra-estimate-line-x-cell,
#rwAgentEstimatePreview .ra-estimate-line-x-cell,
#rwVendorInvoicePreview .ra-estimate-line-x-cell,
#rwAgentOwnerInvoicePreview .ra-estimate-line-x-cell{
  width: 0;
  max-width: 0;
  padding: 0;
  border: 0;
  position: relative;
  overflow: visible;
}

#rwVendorEstimatePreview .ra-estimate-line-x,
#rwAgentEstimatePreview .ra-estimate-line-x,
#rwVendorInvoicePreview .ra-estimate-line-x,
#rwAgentOwnerInvoicePreview .ra-estimate-line-x{
  position: absolute;
  left: auto;
  right: -18px;
  top: 0;
}

#rwVendorEstimatePreview .ra-invoice-paper__amt,
#rwAgentEstimatePreview .ra-invoice-paper__amt,
#rwVendorInvoicePreview .ra-invoice-paper__amt,
#rwAgentOwnerInvoicePreview .ra-invoice-paper__amt{
  position: relative;
  padding-right: 32px;
  box-sizing: border-box;
  overflow: visible;
}

#rwVendorEstimatePreview .ra-invoice-paper__amt > .ra-estimate-line-x-cell,
#rwAgentEstimatePreview .ra-invoice-paper__amt > .ra-estimate-line-x-cell,
#rwVendorInvoicePreview .ra-invoice-paper__amt > .ra-estimate-line-x-cell,
#rwAgentOwnerInvoicePreview .ra-invoice-paper__amt > .ra-estimate-line-x-cell{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  max-width: 28px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: visible;
}

#rwVendorEstimatePreview .ra-invoice-paper__amt > .ra-estimate-line-x-cell > .ra-estimate-line-x,
#rwAgentEstimatePreview .ra-invoice-paper__amt > .ra-estimate-line-x-cell > .ra-estimate-line-x,
#rwVendorInvoicePreview .ra-invoice-paper__amt > .ra-estimate-line-x-cell > .ra-estimate-line-x,
#rwAgentOwnerInvoicePreview .ra-invoice-paper__amt > .ra-estimate-line-x-cell > .ra-estimate-line-x{
  position: absolute;
  top: 50%;
  right: 0;
  left: auto;
  transform: translateY(-50%);
}

.ra-estimate-tax-amount{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 400;
}

.ra-estimate-tax-included{
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.ra-estimate-tax-col{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.ra-estimate-text-btn{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #1d4ed8;
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
  cursor: pointer;
}

.ra-estimate-commission-edit{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.ra-estimate-commission-edit[hidden]{
  display: none !important;
}

.ra-estimate-commission-edit input[type="number"]{
  width: 8ch;
}

tr[data-rw-line-edit]{
  cursor: pointer;
}

#rwVendorEstimateTotals{
  font-weight: 400;
}

.ra-estimate-grow{
  resize: none;
  overflow: hidden;
  min-height: 44px;
}

.ra-estimate-readonly{
  white-space: pre-wrap;
  min-height: 44px;
}

.ra-estimate-commission{
  border: 0;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ra-estimate-commission label{
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.ra-estimate-gap{
  height: 1.2rem;
}

.ra-estimate-story{
  max-width: 100%;
  padding: 16px;
  border: 1px solid #6d8299;
  border-radius: 16px;
  background: #fff;
  touch-action: pan-y;
}

#rwAgentOwnerInvoiceForm > .ra-estimate-story,
#rwVendorInvoiceForm > .ra-estimate-story{
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  max-width: none;
}

#rwOwnerLedgerInvoice.ra-owner__card,
#rwVendorLedgerDetail.ra-owner__card{
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#rwVendorLedgerDetail:has(.ra-estimate-story--paper-thumb) > h3{
  display: none;
}

#rwOwnerLedgerInvoiceBody .ra-estimate-line-t{
  display: none;
}

.ra-estimate-story input,
.ra-estimate-story textarea,
.ra-estimate-story button{
  touch-action: pan-y;
}

#rwOwnerEstimateDetail,
#rwAgentEstimateDetail,
#rwVendorEstimateForm,
#rwVendorEstimateDetail,
#rwVendorInvoiceForm,
#rwAgentUploadForm,
#rwVendorInvoiceDetail,
#rwAgentOwnerInvoiceForm,
#rwAgentOwnerInvoiceDetail{
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

#rwEstimateCommissionModal,
#rwEstimateReadyModal{
  z-index: 70;
}

.ra-estimate-story-wrap:has(> [data-rw-estimate-card="decision"]),
.ra-estimate-story-wrap:has(> [data-rw-invoice-card="decision"]){
  width: min(374px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.ra-estimate-from{
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
  text-align: center;
  color: #64748b;
}

.ra-estimate-story-wrap:has(> .ra-estimate-story--paper-thumb) .ra-estimate-from--stamp{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  width: min(374px, 100%);
  margin-right: auto;
  margin-left: auto;
  text-align: start;
}

.ra-estimate-from--stamp time{
  flex: 0 0 auto;
  white-space: nowrap;
}

.ra-estimate-story-gap{
  height: 2.5rem;
}

#rwAgentInvoiceBody,
#rwVendorInvoiceBody,
#rwAgentOwnerInvoiceBody,
#rwOwnerLedgerInvoiceBody{
  padding-bottom: 3.5rem;
}

.ra-estimate-comment-gap{
  height: 1.25rem;
}

.ra-estimate-story__head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 8px;
}

.ra-estimate-story__head h3{
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.ra-estimate-story:is([data-rw-estimate-card="comment"], [data-rw-invoice-card="comment"], [data-rw-estimate-card="decision"], [data-rw-invoice-card="decision"], [data-rw-estimate-card="status"]){
  padding: 6px 12px;
  border-radius: 0;
  border-top-width: 4px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  font-size: 12px;
  line-height: 1.3;
}

.ra-estimate-story:is([data-rw-estimate-tone="owner"]){
  background: #f5f3ff;
  border-color: #ddd6fe;
  border-top-color: #5b21b6;
}

.ra-estimate-story:is([data-rw-estimate-tone="vendor"], [data-rw-invoice-tone="vendor"]){
  background: #ecfdf3;
  border-color: #d7eadf;
  border-top-color: #14532d;
}

.ra-estimate-story:is([data-rw-estimate-card="comment"], [data-rw-invoice-card="comment"], [data-rw-estimate-card="decision"], [data-rw-invoice-card="decision"], [data-rw-estimate-card="status"]) .ra-estimate-story__head{
  margin: 0 0 2px;
}

.ra-estimate-story:is([data-rw-estimate-card="comment"], [data-rw-invoice-card="comment"], [data-rw-estimate-card="decision"], [data-rw-invoice-card="decision"], [data-rw-estimate-card="status"]) .ra-estimate-story__head h3{
  font-size: 12px;
}

.ra-estimate-story:is([data-rw-estimate-card="comment"], [data-rw-invoice-card="comment"], [data-rw-estimate-card="decision"], [data-rw-invoice-card="decision"], [data-rw-estimate-card="status"]) .ra-estimate-story__head time{
  font-size: 11px;
}

.ra-estimate-story:is([data-rw-estimate-card="comment"], [data-rw-invoice-card="comment"], [data-rw-estimate-card="decision"], [data-rw-invoice-card="decision"], [data-rw-estimate-card="status"]) :is([data-rw-estimate-comment], [data-rw-invoice-comment]){
  margin: 0;
  font-size: 12px;
}

.ra-estimate-story:is([data-rw-estimate-card="comment"], [data-rw-invoice-card="comment"], [data-rw-estimate-card="decision"], [data-rw-invoice-card="decision"], [data-rw-estimate-card="status"]) .ra-estimate-reply{
  margin-top: 4px;
}

.ra-estimate-story-wrap:has(> .ra-estimate-story:is([data-rw-estimate-card="comment"], [data-rw-invoice-card="comment"], [data-rw-estimate-card="decision"], [data-rw-invoice-card="decision"], [data-rw-estimate-card="status"])) .ra-estimate-from{
  margin-bottom: 2px;
  font-size: 11px;
}

.ra-estimate-story:is([data-rw-estimate-card="decision"], [data-rw-invoice-card="decision"], [data-rw-estimate-card="status"]) :is(.ra-estimate-pair, p){
  margin: 0;
  font-size: 12px;
}

.ra-estimate-story:is([data-rw-estimate-card="decision"], [data-rw-invoice-card="decision"]) .ra-estimate-pair{
  gap: 6px;
}

.ra-estimate-check-mark,
.ra-estimate-x-mark{
  display: inline-block;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  margin-left: 6px;
}

.ra-estimate-story:is([data-rw-estimate-card="decision"], [data-rw-invoice-card="decision"]) :is(.ra-estimate-check-mark, .ra-estimate-x-mark){
  font-size: 14px;
  margin-left: 4px;
}

.ra-estimate-check-mark{
  color: #16a34a;
}

.ra-invoice-ai-field{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ra-invoice-ai-field select{
  flex: 1 1 auto;
  min-width: 0;
}

.ra-invoice-ai-field .ra-estimate-check-mark{
  flex: 0 0 auto;
  font-size: 1.15rem;
}

.ra-invoice-ai-field .ra-estimate-check-mark[hidden]{
  display: none !important;
}

.ra-estimate-x-mark{
  color: #dc2626;
}

[data-rw-vendor-pending]{
  margin: 0 0 12px;
  font-weight: 800;
  color: #0f172a;
}

.ra-estimate-story__who{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 8px;
}

.ra-estimate-reply,
.ra-estimate-send{
  appearance: none;
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1d4ed8;
  font: inherit;
  font-size: 15px;
  text-align: right;
  text-decoration: underline;
  cursor: pointer;
}

.ra-invoice-actions{
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-top: 10px;
}

.ra-invoice-actions .ra-estimate-reply{
  width: auto;
  margin: 0;
}

.ra-invoice-actions [data-rw-invoice-reply]{
  margin-left: auto;
}

.ra-invoice-payments{
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ra-invoice-pay-name{
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
  color: #64748b;
}

.ra-estimate-reply[hidden],
.ra-estimate-send[hidden],
.ra-estimate-reply-compose[hidden]{
  display: none !important;
}

.ra-estimate-reply-compose textarea{
  width: 100%;
  margin-top: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px;
  font: inherit;
  font-weight: 400;
}

.ra-estimate-tabs{
  display: flex;
  gap: 0;
  margin: 0 0 16px;
  border-bottom: 1px solid #d1d5db;
}

.ra-estimate-tabs button{
  appearance: none;
  flex: 1;
  margin: 0;
  padding: 12px 8px 10px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.ra-estimate-tabs button.is-active{
  background: transparent;
  color: #102d4e;
  border-bottom-color: #102d4e;
}

#rwVendorInvoiceAddLine[hidden],
#rwVendorInvoiceTaxLine[hidden]{
  display: none !important;
}

#rwVendorInvoiceSend{
  margin-top: 16px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 16px rgba(11, 35, 64, 0.2);
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

#rwVendorInvoiceOwnNumber,
#rwVendorInvoiceOwnTotal,
#rwVendorInvoiceOwnEstimates{
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  box-sizing: border-box;
}

#rwVendorInvoiceOwnFileField{
  margin-bottom: 18px;
}

#rwVendorInvoiceOwnFileField[hidden],
#rwVendorInvoiceAttach[hidden],
#rwVendorInvoiceAttached[hidden]{
  display: none !important;
}

.ra-invoice-file-slot{
  min-width: 0;
}

#rwVendorInvoiceAttach{
  appearance: none;
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b91c1c;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  text-align: left;
  text-decoration-line: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.ra-invoice-attached{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}

#rwVendorInvoiceAttachedName{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  text-decoration-line: underline;
  text-underline-offset: 2px;
}

#rwVendorInvoiceAttachedClear{
  flex: 0 0 auto;
  width: 28px;
  height: 22px;
  margin: 0;
  color: #b91c1c;
}

.ra-invoice-mark-wrap{
  position: relative;
  display: block;
  min-width: 0;
}

.ra-invoice-mark-wrap input{
  width: 100%;
  padding-left: 28px;
}

.ra-invoice-mark{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #b91c1c;
  font-weight: 700;
  pointer-events: none;
}

#rwVendorInvoiceOwnNumberField .ra-invoice-mark{
  color: #000;
}

.ra-invoice-mark-wrap:has(input:not(:placeholder-shown)) .ra-invoice-mark{
  visibility: hidden;
}

.ra-invoice-paper .ra-invoice-sheet-tools{
  margin: 0 0 4px;
}

.ra-estimate-grid{
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
}

.ra-estimate-grid th,
.ra-estimate-grid td{
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 4px;
  text-align: left;
  vertical-align: top;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
  background: #fff;
}

.ra-estimate-grid .ra-estimate-line-item{
  display: inline;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ra-estimate-grid td:last-child,
.ra-estimate-grid th:last-child{
  text-align: right;
}

#rwVendorEstimateEdit .ra-estimate-grid th,
#rwAgentEstimateToOwner .ra-estimate-grid th,
#rwVendorInvoicePreview .ra-estimate-grid th,
#rwVendorInvoiceBody .ra-estimate-grid th,
#rwAgentInvoiceBody .ra-estimate-grid th,
#rwAgentOwnerInvoicePreview .ra-estimate-grid th,
#rwAgentOwnerInvoiceBody .ra-estimate-grid th,
#rwOwnerLedgerInvoiceBody .ra-estimate-grid th{
  text-align: left;
}

#rwVendorEstimateEdit .ra-estimate-block,
#rwAgentEstimateToOwner .ra-estimate-block,
#rwVendorInvoiceEdit .ra-estimate-block,
#rwAgentOwnerInvoiceEdit .ra-estimate-block{
  text-align: center;
}

#rwVendorEstimateEdit .ra-estimate-grid th:nth-child(1),
#rwVendorEstimateEdit .ra-estimate-grid td:nth-child(1),
#rwAgentEstimateToOwner .ra-estimate-grid th:nth-child(1),
#rwAgentEstimateToOwner .ra-estimate-grid td:nth-child(1),
#rwVendorEstimatePreview .ra-estimate-grid th:nth-child(1),
#rwVendorEstimatePreview .ra-estimate-grid td:nth-child(1),
#rwAgentEstimateVendorPreview .ra-estimate-grid th:nth-child(1),
#rwAgentEstimateVendorPreview .ra-estimate-grid td:nth-child(1),
#rwVendorInvoicePreview .ra-estimate-grid th:nth-child(1),
#rwVendorInvoicePreview .ra-estimate-grid td:nth-child(1),
#rwVendorInvoiceBody .ra-estimate-grid th:nth-child(1),
#rwVendorInvoiceBody .ra-estimate-grid td:nth-child(1),
#rwAgentInvoiceBody .ra-estimate-grid th:nth-child(1),
#rwAgentInvoiceBody .ra-estimate-grid td:nth-child(1),
#rwAgentOwnerInvoicePreview .ra-estimate-grid th:nth-child(1),
#rwAgentOwnerInvoicePreview .ra-estimate-grid td:nth-child(1),
#rwAgentOwnerInvoiceBody .ra-estimate-grid th:nth-child(1),
#rwAgentOwnerInvoiceBody .ra-estimate-grid td:nth-child(1),
#rwOwnerLedgerInvoiceBody .ra-estimate-grid th:nth-child(1),
#rwOwnerLedgerInvoiceBody .ra-estimate-grid td:nth-child(1){
  width: 28.4%;
}

#rwVendorEstimateEdit .ra-estimate-grid th:nth-child(2),
#rwVendorEstimateEdit .ra-estimate-grid td:nth-child(2),
#rwAgentEstimateToOwner .ra-estimate-grid th:nth-child(2),
#rwAgentEstimateToOwner .ra-estimate-grid td:nth-child(2),
#rwVendorEstimatePreview .ra-estimate-grid th:nth-child(2),
#rwVendorEstimatePreview .ra-estimate-grid td:nth-child(2),
#rwAgentEstimateVendorPreview .ra-estimate-grid th:nth-child(2),
#rwAgentEstimateVendorPreview .ra-estimate-grid td:nth-child(2),
#rwVendorInvoicePreview .ra-estimate-grid th:nth-child(2),
#rwVendorInvoicePreview .ra-estimate-grid td:nth-child(2),
#rwVendorInvoiceBody .ra-estimate-grid th:nth-child(2),
#rwVendorInvoiceBody .ra-estimate-grid td:nth-child(2),
#rwAgentInvoiceBody .ra-estimate-grid th:nth-child(2),
#rwAgentInvoiceBody .ra-estimate-grid td:nth-child(2),
#rwAgentOwnerInvoicePreview .ra-estimate-grid th:nth-child(2),
#rwAgentOwnerInvoicePreview .ra-estimate-grid td:nth-child(2),
#rwAgentOwnerInvoiceBody .ra-estimate-grid th:nth-child(2),
#rwAgentOwnerInvoiceBody .ra-estimate-grid td:nth-child(2),
#rwOwnerLedgerInvoiceBody .ra-estimate-grid th:nth-child(2),
#rwOwnerLedgerInvoiceBody .ra-estimate-grid td:nth-child(2){
  width: 52.1%;
}

#rwVendorEstimateEdit .ra-estimate-grid th:nth-child(3),
#rwVendorEstimateEdit .ra-estimate-grid td:nth-child(3),
#rwAgentEstimateToOwner .ra-estimate-grid th:nth-child(3),
#rwAgentEstimateToOwner .ra-estimate-grid td:nth-child(3),
#rwVendorEstimatePreview .ra-estimate-grid th:nth-child(3),
#rwVendorEstimatePreview .ra-estimate-grid td:nth-child(3),
#rwAgentEstimateVendorPreview .ra-estimate-grid th:nth-child(3),
#rwAgentEstimateVendorPreview .ra-estimate-grid td:nth-child(3),
#rwVendorInvoicePreview .ra-estimate-grid th:nth-child(3),
#rwVendorInvoicePreview .ra-estimate-grid td:nth-child(3),
#rwVendorInvoiceBody .ra-estimate-grid th:nth-child(3),
#rwVendorInvoiceBody .ra-estimate-grid td:nth-child(3),
#rwAgentInvoiceBody .ra-estimate-grid th:nth-child(3),
#rwAgentInvoiceBody .ra-estimate-grid td:nth-child(3),
#rwAgentOwnerInvoicePreview .ra-estimate-grid th:nth-child(3),
#rwAgentOwnerInvoicePreview .ra-estimate-grid td:nth-child(3),
#rwAgentOwnerInvoiceBody .ra-estimate-grid th:nth-child(3),
#rwAgentOwnerInvoiceBody .ra-estimate-grid td:nth-child(3),
#rwOwnerLedgerInvoiceBody .ra-estimate-grid th:nth-child(3),
#rwOwnerLedgerInvoiceBody .ra-estimate-grid td:nth-child(3){
  width: 19.5%;
  text-align: left;
}

#rwVendorEstimateEdit [data-rw-line-amount],
#rwAgentEstimateToOwner [data-rw-line-amount],
#rwVendorInvoicePreview [data-rw-estimate-line-amount],
#rwVendorInvoiceBody [data-rw-estimate-line-amount],
#rwAgentInvoiceBody [data-rw-estimate-line-amount],
#rwAgentOwnerInvoicePreview [data-rw-estimate-line-amount],
#rwAgentOwnerInvoiceBody [data-rw-estimate-line-amount],
#rwOwnerLedgerInvoiceBody [data-rw-estimate-line-amount]{
  text-align: left;
}

.ra-estimate-grid input{
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px;
  font: inherit;
}

.ra-estimate-grid td[colspan="3"]{
  text-align: left;
  white-space: pre-wrap;
}

.ra-estimate-check{
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
  font-weight: 700;
}

.ra-estimate-footer{
  display: flex;
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  gap: 0;
  margin: 0;
  padding: 0;
  min-height: 52px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #102d4e;
}

.ra-estimate-footer button[hidden],
.ra-estimate-footer[hidden],
#rwAgentEstimateDetail[data-rw-can-send="0"] #rwAgentEstimateSaveLines{
  display: none !important;
}

.ra-estimate-footer button{
  flex: 1 1 0;
  height: 52px;
  min-height: 52px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ra-estimate-footer button + button{
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.28);
}

.ra-estimate-footer--start{
  justify-content: flex-start;
}

.ra-estimate-footer--start button{
  flex: 0 0 auto;
  padding: 0 18px;
}

body:has([data-rw-agent-page="invoices"]:not([hidden]) #rwAgentInvoiceListView:not([hidden])) .ra-owner__pages,
body:has(.ra-estimate-card:not([hidden]) .ra-estimate-footer:not([hidden])) .ra-owner__pages,
body:has(#rwOwnerEstimateDetail:not([hidden]) .ra-estimate-footer:not([hidden])) .ra-owner__pages,
body:has(#rwOwnerDetailFooter:not([hidden])) .ra-owner__pages,
body:has(#rwTenantLeasesFooter:not([hidden])) .ra-owner__pages,
body:has(#rwPeopleForm:not([hidden])) .ra-owner__pages{
  /* Footer, plus two rows so the last line clears it. */
  padding-bottom: calc(72px + var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 720px){
  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="estimates"]:not([hidden])),
  body.ra-portal--vendor .ra-owner__pages:has([data-rw-vendor-page="estimates"]:not([hidden])),
  body.ra-portal--owner .ra-owner__pages:has([data-rw-owner-page="estimates"]:not([hidden])),
  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="invoices"]:not([hidden])),
  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="owner-invoices"]:not([hidden])),
  body.ra-portal--vendor .ra-owner__pages:has([data-rw-vendor-page="invoices"]:not([hidden])),
  body.ra-portal--vendor .ra-owner__pages:has([data-rw-vendor-page="ledger"]:not([hidden])){
    padding-left: calc(5px + env(safe-area-inset-left, 0px));
    padding-right: calc(12px + env(safe-area-inset-right, 0px));
  }
}

.ra-owner__pages.ra-owner__pages--line{
  padding-top: 0;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: calc(8px + env(safe-area-inset-right, 0px));
  padding-bottom: calc(72px + var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
}

.ra-owner__property .ra-rowhead > strong,
.ra-people__row .ra-rowhead > strong{
  min-width: 0;
  flex: 1 1 auto;
}

.ra-mobile-back{
  display: none;
}

.ra-property__meta{
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 0.78rem;
}

.ra-portal__idle-item-meta{
  min-width: 0;
  max-width: 100%;
  font-weight: 400;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.68);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ra-portal__unread-dot,
.ra-portal__closed-dot{
  margin-top: 5px;
}

.ra-portal__idle-item-empty{
  margin: 0;
  padding: 8px 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  text-align: center;
}

.ra-portal__unread-dot{
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
}

.ra-portal__closed-dot{
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.22);
}

.ra-portal__unread-dot[hidden],
.ra-portal__closed-dot[hidden]{
  display: none !important;
}

.ra-portal__idle-actions{
  display: flex;
  flex-direction: column;
  flex: 0 0 76px;
  width: 76px;
  max-width: 76px;
  gap: 4px;
}

.ra-portal__idle-toggle{
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.ra-portal__idle-toggle:hover{
  background: rgba(255, 255, 255, 0.18);
}

.ra-portal__composer[hidden],
.ra-portal__chat-main--idle .ra-portal__composer,
.ra-portal__chat-main--handoff .ra-portal__composer,
.ra-portal__closed-bar[hidden],
.ra-portal__chat-main--idle .ra-portal__closed-bar,
.ra-portal__chat-main--handoff .ra-portal__closed-bar,
.ra-portal__pending-bar[hidden],
.ra-portal__chat-main--idle .ra-portal__pending-bar{
  display: none !important;
}

.ra-portal__pending-bar{
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.ra-portal__closed-bar{
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #dc2626;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  overflow: hidden;
  user-select: none;
}

.ra-portal__footer{
  position: sticky;
  bottom: 0;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: var(--rw-chat-width);
  padding-top: 4px;
  background: transparent;
  overflow: hidden;
}

.ra-portal__footer[hidden]{
  display: none !important;
}

.ra-portal__conversation-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  min-height: 0;
  flex: 1;
}

.ra-portal__conversation-item{
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.94);
  font: inherit;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  line-height: 1.35;
}

.ra-portal__conversation-item:hover{
  background: rgba(255, 255, 255, 0.1);
}

.ra-portal__conversation-item.is-active{
  border-color: rgba(56, 189, 248, 0.75);
  background: rgba(14, 165, 233, 0.24);
}

.ra-portal__conversation-item-title{
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ra-portal__conversation-item-time{
  display: block;
  margin-top: 3px;
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.62);
}

.ra-portal__chat-main{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 16px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  padding-left: calc(10px + env(safe-area-inset-left, 0px));
  padding-right: calc(10px + env(safe-area-inset-right, 0px));
  gap: 10px;
}

.ra-portal__chat-main--handoff{
  justify-content: center;
}

.ra-portal__handoff-notice{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--rw-chat-width);
  flex: 1;
}

.ra-portal__handoff-notice[hidden]{
  display: none !important;
}

.ra-portal__handoff-notice-card{
  width: 100%;
  padding: 28px 24px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  text-align: center;
}

.ra-portal__handoff-notice-text{
  margin: 0 0 18px;
  line-height: 1.45;
  font-size: 1rem;
  color: var(--rw-text);
}

.ra-portal__handoff-notice-card .ra-portal__primary-btn{
  min-width: 120px;
}

.ra-portal__chat[hidden]{
  display: none !important;
}

.ra-portal__chat--active{
  flex: 1;
  min-height: 0;
}

.ra-portal__conversation-box{
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-width: var(--rw-chat-width);
  width: 100%;
  margin: 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.ra-portal__conversation-box[hidden]{
  display: none !important;
}

.ra-portal__chat-title-bar{
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 12px;
  background: #d1d5db;
  border: 0;
  border-bottom: 1px solid var(--rw-gray-border);
  border-radius: 0;
  text-align: center;
}

.ra-portal__chat-title-bar:has(#rwChatCloseBtn:not([hidden])){
  padding-left: 84px;
  padding-right: 84px;
}

.ra-portal__chat-title-close{
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  padding: 6px 10px;
  background: #1d4ed8;
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
}

.ra-portal__chat-title-close[hidden]{
  display: none !important;
}

.ra-portal__chat-title-text{
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: #4b5563;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ra-portal__chat-title-place{
  display: block;
  width: 100%;
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  color: #4b5563;
}

.ra-portal__chat-title-place[hidden]{
  display: none !important;
}

.ra-portal__chat-scroll{
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.ra-portal__chat-messages{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px calc(12px + env(safe-area-inset-right, 0px)) calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px));
}

.ra-portal__row{
  display: flex;
  width: 100%;
}

.ra-portal__row--right{
  justify-content: flex-end;
}

.ra-portal__row--center{
  justify-content: center;
}

.ra-portal__vendor-added{
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(88%, 320px);
  margin: 4px 0;
  padding: 4px 10px;
  border: 1px solid var(--rw-gray-border);
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-size: 0.58rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.ra-portal__vendor-added-text{
  margin: 0;
  font-size: 0.58rem;
}

.ra-portal__vendor-added-time{
  display: block;
  margin-top: 2px;
  font-size: 0.58rem;
  font-weight: 500;
  color: #64748b;
}

.ra-portal__bubble{
  max-width: min(72%, 300px);
  padding: 6px 9px;
  border-radius: 12px 12px 12px 3px;
  border: 1px solid var(--rw-chat-assistant-border);
  background: var(--rw-chat-assistant);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

.ra-portal__bubble--assistant{
  border-color: var(--rw-chat-assistant-border);
  background: var(--rw-chat-assistant);
}

.ra-portal__bubble--user{
  border-color: var(--rw-chat-user-border);
  background: var(--rw-chat-user);
}

.ra-portal__bubble--agent{
  border-color: var(--rw-chat-agent-border);
  background: var(--rw-chat-agent);
}

.ra-portal__bubble--vendor{
  border-color: var(--rw-chat-vendor-border);
  background: var(--rw-chat-vendor);
}

.ra-portal__row--right .ra-portal__bubble{
  border-radius: 12px 12px 3px 12px;
}

.ra-portal__bubble-meta{
  display: block;
  margin-bottom: 1px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #0f172a;
}

.ra-portal__bubble-text{
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
  font-size: 0.88rem;
}

.ra-portal__bubble--welcome .ra-portal__bubble-text{
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.ra-portal__bubble-time{
  display: block;
  margin-top: 2px;
  font-size: 0.58rem;
  color: #1e293b;
}

.ra-portal__lead-panel{
  margin: 0 auto;
  width: 100%;
  max-width: var(--rw-chat-width);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  backdrop-filter: blur(10px);
}

.ra-portal__lead-copy{
  margin: 0 0 12px;
  line-height: 1.45;
}

.ra-portal__composer{
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  max-width: var(--rw-chat-width);
  margin: 0 auto;
  min-height: var(--rw-composer-h);
  padding: 0;
  border: 0;
  background: transparent;
}

.ra-portal__chat-scroll .ra-portal__card-lead{
  font-size: 0.75rem;
}

.ra-portal__composer input{
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  font: inherit;
  font-size: 16px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
}

.ra-portal__send-btn{
  min-width: 64px;
  padding: 9px 12px;
  font-size: 0.75rem;
  border-radius: 999px;
}

.ra-portal__composer-hint{
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(100% + 4px);
  color: #fde68a;
}

@media (max-width: 860px){
  .ra-portal__chat-main{
    min-height: 0;
    padding-top: 12px;
  }

  .ra-portal--signed-in .ra-portal__header{
    grid-template-columns: auto 1fr auto;
  }

  .ra-portal--signed-in .ra-portal__brand{
    grid-column: 1;
    grid-row: 1;
  }

  .ra-portal--signed-in .ra-portal__mode-label{
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    font-size: 1.05rem;
  }

  .ra-portal--signed-in .ra-portal__header-actions{
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .ra-portal__brand-title{
    font-size: 0.95rem;
    line-height: 1.1;
  }

  .ra-portal__card{
    padding: 22px 16px;
  }
}

@media (max-width: 520px){
  :root{
    --rw-header-h: 50px;
  }

  .ra-portal__role{
    flex: 1 1 0;
    padding: 7px 8px;
    font-size: 0.72rem;
  }

  .ra-portal__user-chip{
    max-width: min(58vw, 14rem);
    font-size: 0.72rem;
    padding: 4px 8px;
  }

  .ra-portal__bubble{
    max-width: 88%;
  }
}

.ra-portal__modal-overlay{
  position: fixed;
  inset: 0;
  top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px) + 5px);
  z-index: 10;
  display: grid;
  place-items: start center;
  align-content: start;
  width: 100%;
  max-width: 100%;
  padding: var(--rw-gutter);
  padding-top: 0;
  padding-left: calc(var(--rw-gutter) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--rw-gutter) + env(safe-area-inset-right, 0px));
  background: transparent;
  overflow-x: hidden;
}

.ra-portal__modal-overlay[hidden]{
  display: none !important;
}

.ra-portal__modal-overlay--dim{
  z-index: 40;
  background: rgba(15, 23, 42, 0.45);
}

.ra-portal--modal-open{
  overflow: hidden;
}

.ra-portal__modal{
  width: 50vw;
  max-width: 50vw;
  padding: 22px;
  border-radius: var(--rw-radius);
  border: 2px solid #334155;
  background: var(--rw-panel);
  box-shadow: var(--rw-shadow);
}

.ra-portal__modal--compact{
  width: 50vw;
  max-width: 50vw;
  padding: 16px 14px 1lh;
}

.ra-portal__modal--compact .ra-portal__modal-title{
  margin: 0 0 8px;
  font-size: 0.82rem;
}

.ra-portal__modal--compact .ra-portal__card-lead{
  margin: 0 0 10px;
  font-size: 0.68rem;
  line-height: 1.35;
}

.ra-portal__modal--compact .ra-portal__card-lead--compact{
  margin-top: -4px;
  margin-bottom: 8px;
  font-size: 0.62rem;
}

.ra-portal__modal--compact .ra-portal__field{
  gap: 4px;
  font-size: 0.64rem;
}

.ra-portal__modal--compact .ra-portal__field input,
.ra-portal__modal--compact .ra-portal__field select{
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 16px;
}

.ra-portal__modal--compact .ra-portal__primary-btn,
.ra-portal__modal--compact .ra-portal__ghost-btn--on-dark{
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 600;
}

.ra-portal__modal--compact .ra-portal__modal-actions{
  gap: 6px;
  margin-top: 10px;
}

.ra-portal__modal--compact .ra-portal__modal-link-btn{
  margin-top: 8px;
  font-size: 0.64rem;
  padding: 6px 8px;
}

.ra-portal__modal--compact .ra-portal__hint{
  font-size: 0.64rem;
}

.ra-portal__modal-title{
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.ra-portal__modal-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ra-portal__warn-row{
  display: flex;
  align-items: center;
  gap: 12px;
}

#rwEstimateReadyText,
#rwEstimateCommissionText,
#rwAppConfirmText,
#rwAgentInvoiceBatchText{
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: inherit;
  white-space: pre-line;
}

#rwAppConfirm{
  z-index: 120;
}

#rwAppConfirm .ra-portal__warn-row{
  display: block;
}

#rwAppConfirm .ra-portal__modal-actions{
  margin-top: 16px;
}

#rwEstimateReadyModal .ra-portal__modal-title,
#rwEstimateCommissionModal .ra-portal__modal-title{
  font-size: 1.05rem;
}

.ra-portal__warn-row .ra-portal__card-lead{
  margin: 0;
  flex: 1 1 auto;
}

.ra-portal__warn-row .ra-portal__modal-actions{
  margin: 0 0 0 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.ra-portal__modal-link-btn{
  margin-top: 12px;
  width: 100%;
}

.ra-portal__recent-list{
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  max-height: 220px;
  overflow: auto;
}

.ra-portal__recent-item{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--rw-panel-border);
  border-radius: 12px;
  background: #fff;
  color: var(--rw-text);
  text-align: left;
  cursor: pointer;
}

.ra-portal__recent-item:hover{
  border-color: var(--rw-accent);
}

.ra-portal__ghost-btn--on-dark{
  color: var(--rw-muted);
  border-color: var(--rw-panel-border);
  background: transparent;
}

.ra-portal__card-lead--compact{
  margin-top: -8px;
  margin-bottom: 12px;
  font-size: 0.78rem;
}

.ra-portal__conversation-item-badge{
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.18);
  color: #0369a1;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.ra-portal__recent-item-badge{
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  font-size: 0.68rem;
  font-weight: 700;
}

.ra-portal__title-suggestions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ra-portal__title-chip{
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--rw-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.25;
}

.ra-portal__title-chip:hover,
.ra-portal__title-chip.is-selected{
  border-color: var(--rw-accent);
  background: rgba(14, 165, 233, 0.1);
  color: var(--rw-accent-dark);
}

.ra-portal__admin[hidden]{
  display: none !important;
}

.ra-portal__admin{
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 0 var(--rw-gutter) calc(12px + env(safe-area-inset-bottom, 0px));
}

.ra-portal__admin-page{
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--rw-chat-width);
  margin: 0 auto;
  min-height: 0;
  flex: 1;
}

.ra-portal__admin-scroll{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 0 calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
}

.ra-portal__admin-hero{
  margin-bottom: 12px;
}

.ra-portal__admin-auth-actions{
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.ra-portal__admin-auth-actions .ra-portal__primary-btn,
.ra-portal__admin-auth-actions .ra-portal__ghost-btn{
  flex: 1 1 0;
}

.ra-portal__admin-manage-title{
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.05rem;
}

.ra-portal__admin-toolbar{
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.ra-portal__admin-select{
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--rw-text);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  box-sizing: border-box;
}

.ra-portal__admin-select:disabled{
  cursor: not-allowed;
  opacity: 0.7;
}

.ra-portal__admin-add{
  min-width: 72px;
  padding: 10px 14px;
  font-size: 1rem;
  line-height: 1;
}

.ra-portal__admin-row-actions{
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.ra-portal__admin-row-actions .ra-portal__ghost-btn{
  flex: 1 1 0;
}

.ra-portal__admin-id{
  margin: 0 0 8px;
  color: var(--rw-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.ra-portal__admin-footer{
  flex-shrink: 0;
  padding-top: 10px;
}

.ra-portal__admin-footer .ra-portal__ghost-btn{
  width: 100%;
}

.ra-portal__photo-btn{
  border: 1px solid var(--rw-gray-border);
  border-radius: 999px;
  padding: 9px 10px;
  background: #fff;
  color: var(--rw-text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.ra-portal__photo-btn[hidden]{
  display: none;
}

/* Disabled (waiting for staff) keeps its place, so the message box and Send keep their size. */
.ra-portal__photo-btn:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}

.ra-portal__photo-thumb-btn{
  display: block;
  margin: 4px 0 2px;
  padding: 0;
  border: 0;
  background: #e5e7eb;
  border-radius: 8px;
  cursor: zoom-in;
}

.ra-portal__photo-thumb{
  display: block;
  flex: 0 0 3cm;
  width: 3cm;
  height: 3cm;
  min-width: 3cm;
  min-height: 3cm;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid var(--rw-gray-border);
}

.ra-portal__photo-lightbox{
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  padding: 24px 12px;
}

.ra-portal__photo-lightbox[hidden]{
  display: none !important;
}

.ra-portal__photo-lightbox-stage{
  position: relative;
  max-width: min(92vw, 720px);
  max-height: 86vh;
  overflow: auto;
  touch-action: pinch-zoom;
}

.ra-portal__photo-lightbox-stage img{
  display: block;
  max-width: 92vw;
  max-height: 82vh;
  transform-origin: center center;
  transition: transform 0.12s ease;
}

.ra-portal__photo-lightbox-close{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

/* Start a conversation: one drop list whose first line is the search. */
.ra-direct-pick{
  display: flex;
  flex-direction: column;
  margin: 8px 0 0;
  overflow: hidden;
  border: 1px solid #6d8299;
  border-radius: 10px;
  background: #fff;
}
.ra-direct-pick__search{
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid var(--rw-gray-border);
  border-radius: 0;
  background: #fff;
  font: inherit;
  font-size: 16px;
  outline: none;
}
.ra-direct-pick__list{
  display: block !important;
  min-height: 44px;
  max-height: min(50vh, 420px);
  overflow: auto;
}
.ra-direct-pick__row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  background: #fff;
  color: var(--rw-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ra-direct-pick__row:hover,
.ra-direct-pick__row:focus-visible{
  background: #eef4fb;
}
.ra-direct-pick__name{
  font-weight: 600;
}
.ra-direct-pick__email{
  min-width: 0;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ra-direct-pick__list .ra-portal__idle-item-empty{
  margin: 0;
  padding: 12px;
}

.ra-portal__vendor-pick-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 42vh;
  overflow: auto;
  margin: 8px 0 12px;
}

.ra-portal__vendor-pick{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rw-gray-border);
  border-radius: 10px;
  background: #fff;
  color: var(--rw-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ra-portal__vendor-pick:disabled{
  opacity: 0.55;
  cursor: default;
}

.ra-portal__vendor-pick-name{
  font-weight: 600;
  font-size: 0.9rem;
}

.ra-portal__vendor-pick-meta{
  color: var(--rw-muted);
  font-size: 0.75rem;
}

.ra-portal__activity[hidden]{
  display: none !important;
}

.ra-portal__activity{
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 0 var(--rw-gutter) calc(12px + env(safe-area-inset-bottom, 0px));
  /* background: #f8fafc; */
  /* background: #eef2f6; */
  background: #e2e8f0;
  color: #0f172a;
}

.ra-portal__activity-page{
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--rw-chat-width);
  margin: 0 auto;
  min-height: 0;
  flex: 1;
}

.ra-portal__activity-scroll{
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 0 calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
}

.ra-portal__activity-toggle{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
}

.ra-tt-log{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ra-tt-log__bubble{
  display: grid;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ra-tt-log__line{
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 8px;
}

.ra-tt-log__line span:first-child{
  font-weight: 700;
}

.ra-tt-log__data{
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.65rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.ra-portal__activity-pre{
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.65rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 12rem;
}

.ra-portal__activity-line{
  display: block;
}

.ra-portal__activity-time{
  font-weight: 700;
  color: #166534;
}

.ra-portal__activity-date{
  color: #dc2626;
  font-weight: 700;
}

.ra-portal__activity-footer{
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 10px;
}

.ra-portal__activity-footer .ra-portal__ghost-btn,
.ra-portal__activity-footer .ra-portal__primary-btn{
  flex: 1 1 0;
}

.ra-vendor[hidden]{
  display: none !important;
}

.ra-vendor{
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100dvh - var(--rw-header-h));
  background: #fff;
  color: #0f172a;
}

.ra-vendor__scroll{
  flex: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 16px var(--rw-gutter) calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
}

.ra-vendor__title{
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.ra-vendor__hint{
  margin: 0 0 12px;
  color: #b45309;
}

.ra-vendor__filters{
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.ra-vendor__filters label,
.ra-vendor__card label{
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.ra-vendor__filters input,
.ra-vendor__filters select,
.ra-vendor__card input,
.ra-vendor__card select,
.ra-vendor__card textarea{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 500;
}

#rwVendorAddBtn{
  width: 100%;
}

.ra-vendor__btn{
  flex: 1 1 0;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  background: #d1d5db;
  color: #1f2937;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ra-vendor__rows{
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ra-vendor__row{
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ra-vendor__row strong{
  font-size: 1rem;
}

.ra-vendor__empty{
  margin: 12px 0;
  color: #64748b;
}

.ra-vendor__form{
  display: grid;
  gap: 12px;
}

.ra-vendor__card{
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.ra-vendor__card h3{
  margin: 0 0 12px;
  font-size: 1rem;
}

.ra-vendor__card label + label,
.ra-vendor__added{
  margin-top: 10px;
}

.ra-vendor__added{
  margin-bottom: 0;
  color: #64748b;
  font-size: 0.85rem;
}

.ra-vendor__checks{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.ra-vendor__checks label{
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.ra-vendor__checks input{
  width: auto;
}

.ra-vendor__footer{
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 12px var(--rw-gutter) calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.ra-owner__nav[hidden],
.ra-owner__pages[hidden]{
  display: none !important;
}

body.ra-portal--owner .ra-portal__main,
body.ra-portal--tenant .ra-portal__main,
body.ra-portal--agent .ra-portal__main,
body.ra-portal--vendor .ra-portal__main{
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}

body.ra-portal--owner .ra-owner__nav,
body.ra-portal--tenant .ra-owner__nav,
body.ra-portal--agent .ra-owner__nav,
body.ra-portal--vendor .ra-owner__nav{
  grid-column: 1;
  grid-row: 1;
}

body.ra-portal--agent.ra-portal--agent-directory #rwAgentPages{
  display: none !important;
}

body.ra-portal--agent.ra-portal--agent-directory #rwAdminPanel,
body.ra-portal--agent.ra-portal--agent-directory #rwVendorPage{
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  overflow: auto;
  /* background: #f8fafc; */
  /* background: #eef2f6; */
  background: #e2e8f0;
  color: #0f172a;
}

body.ra-portal--agent.ra-portal--agent-directory #rwAdminPanel .ra-portal__admin-hero,
body.ra-portal--agent.ra-portal--agent-directory #rwAdminAuth,
body.ra-portal--agent.ra-portal--agent-directory .ra-portal__admin-footer{
  display: none !important;
}

body.ra-portal--agent.ra-portal--agent-directory .ra-portal__admin-manage-title{
  color: #0f172a;
}

body.ra-portal--agent.ra-portal--agent-directory #rwVendorPage{
  min-height: 0;
  height: auto;
}

body.ra-portal--owner .ra-owner__pages,
body.ra-portal--owner #rwChatPanel,
body.ra-portal--owner #rwActivityPanel,
body.ra-portal--tenant .ra-owner__pages,
body.ra-portal--tenant #rwChatPanel,
body.ra-portal--tenant #rwActivityPanel,
body.ra-portal--agent .ra-owner__pages,
body.ra-portal--agent #rwChatPanel,
body.ra-portal--agent #rwActivityPanel,
body.ra-portal--vendor .ra-owner__pages,
body.ra-portal--vendor #rwChatPanel,
body.ra-portal--vendor #rwActivityPanel,
body.ra-portal--owner #rwBankAccounts:not([hidden]),
body.ra-portal--tenant #rwBankAccounts:not([hidden]),
body.ra-portal--agent #rwBankAccounts:not([hidden]),
body.ra-portal--vendor #rwBankAccounts:not([hidden]),
body.ra-portal--owner #rwAccountPage:not([hidden]),
body.ra-portal--tenant #rwAccountPage:not([hidden]),
body.ra-portal--agent #rwAccountPage:not([hidden]),
body.ra-portal--vendor #rwAccountPage:not([hidden]){
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
}

body.ra-portal--owner #rwChatPanel,
body.ra-portal--tenant #rwChatPanel,
body.ra-portal--agent #rwChatPanel,
body.ra-portal--vendor #rwChatPanel{
  overflow: hidden;
  /* background: #f8fafc; */
  /* background: #eef2f6; */
  background: #e2e8f0;
  color: #0f172a;
}

body.ra-portal--owner #rwChatPanel .ra-portal__chat-main,
body.ra-portal--tenant #rwChatPanel .ra-portal__chat-main,
body.ra-portal--agent #rwChatPanel .ra-portal__chat-main,
body.ra-portal--vendor #rwChatPanel .ra-portal__chat-main{
  align-items: stretch;
  padding: 24px calc(20px + env(safe-area-inset-right, 0px)) calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px)) calc(20px + env(safe-area-inset-left, 0px));
}

body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread .ra-portal__chat-main,
body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread .ra-portal__chat-main,
body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread .ra-portal__chat-main,
body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread .ra-portal__chat-main{
  padding: 0 calc(12px + env(safe-area-inset-right, 0px)) calc(52px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px));
}

body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread .ra-portal__footer,
body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread .ra-portal__footer,
body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread .ra-portal__footer,
body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread .ra-portal__footer{
  padding-left: 12px;
  padding-right: 12px;
}

body.ra-portal--owner #rwChatPanel .ra-portal__idle-home,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-home,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-home,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-home,
body.ra-portal--owner #rwChatPanel .ra-portal__conversation-box,
body.ra-portal--tenant #rwChatPanel .ra-portal__conversation-box,
body.ra-portal--agent #rwChatPanel .ra-portal__conversation-box,
body.ra-portal--vendor #rwChatPanel .ra-portal__conversation-box{
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

body.ra-portal--owner #rwChatPanel .ra-portal__chat-scroll,
body.ra-portal--tenant #rwChatPanel .ra-portal__chat-scroll,
body.ra-portal--agent #rwChatPanel .ra-portal__chat-scroll,
body.ra-portal--vendor #rwChatPanel .ra-portal__chat-scroll,
body.ra-portal--owner #rwChatPanel .ra-portal__footer,
body.ra-portal--tenant #rwChatPanel .ra-portal__footer,
body.ra-portal--agent #rwChatPanel .ra-portal__footer,
body.ra-portal--vendor #rwChatPanel .ra-portal__footer{
  background: transparent;
}

body.ra-portal--owner #rwChatPanel .ra-portal__chat-title-bar,
body.ra-portal--tenant #rwChatPanel .ra-portal__chat-title-bar,
body.ra-portal--agent #rwChatPanel .ra-portal__chat-title-bar,
body.ra-portal--vendor #rwChatPanel .ra-portal__chat-title-bar{
  position: sticky;
  top: 0;
  z-index: 3;
  background: #d1d5db;
  border: 0;
  border-bottom: 1px solid #9ca3af;
  border-radius: 0;
  box-shadow: none;
}

body.ra-portal--owner #rwChatPanel .ra-portal__idle-item,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-item,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-item,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-item{
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

body.ra-portal--owner #rwChatPanel .ra-portal__idle-item:hover,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-item:hover,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-item:hover,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-item:hover{
  background: #f8fafc;
}

body.ra-portal--owner #rwChatPanel .ra-portal__idle-item.is-selected,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-item.is-selected,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-item.is-selected,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-item.is-selected{
  border-color: #7dd3fc;
  background: #e0f2fe;
}

body.ra-portal--owner #rwChatPanel .ra-portal__idle-item-meta,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-item-meta,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-item-meta,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-item-meta,
body.ra-portal--owner #rwChatPanel .ra-portal__idle-item-empty,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-item-empty,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-item-empty,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-item-empty{
  color: #64748b;
}

body.ra-portal--owner #rwChatPanel .ra-portal__idle-hint,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-hint,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-hint,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-hint,
body.ra-portal--owner #rwChatPanel .ra-portal__composer-hint,
body.ra-portal--tenant #rwChatPanel .ra-portal__composer-hint,
body.ra-portal--agent #rwChatPanel .ra-portal__composer-hint,
body.ra-portal--vendor #rwChatPanel .ra-portal__composer-hint{
  color: #b45309;
}

body.ra-portal--owner #rwChatPanel .ra-portal__idle-toggle,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-toggle,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-toggle,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-toggle{
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #0f172a;
}

body.ra-portal--owner #rwChatPanel .ra-portal__idle-toggle:hover,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-toggle:hover,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-toggle:hover,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-toggle:hover{
  background: #f8fafc;
}

body.ra-portal--owner #rwChatPanel .ra-portal__idle-btn,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-btn,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-btn,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-btn{
  border: 0;
  background: #102d4e;
  color: #fff;
}

body.ra-portal--owner #rwChatPanel .ra-portal__idle-btn:hover:not(:disabled),
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-btn:hover:not(:disabled),
body.ra-portal--agent #rwChatPanel .ra-portal__idle-btn:hover:not(:disabled),
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-btn:hover:not(:disabled){
  background: #1c4471;
}

body.ra-portal--owner #rwChatPanel .ra-portal__composer input,
body.ra-portal--tenant #rwChatPanel .ra-portal__composer input,
body.ra-portal--agent #rwChatPanel .ra-portal__composer input,
body.ra-portal--vendor #rwChatPanel .ra-portal__composer input{
  border: 1px solid #6d8299;
  box-shadow: none;
}

.ra-owner__nav{
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  overflow: visible;
}

.ra-owner__nav-row{
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.ra-owner__nav-row > .ra-owner__nav-btn,
.ra-owner__nav-row > .ra-owner__nav-group{
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
}

.ra-owner__page.ra-people-on > :not(#rwPeople){
  display: none;
}

.ra-people{
  max-width: 420px;
}

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

.ra-people__bar-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.ra-people__bar h2,
.ra-people__form h2{
  margin: 0;
  font-size: 1.25rem;
  color: #0f172a;
}

#rwPeopleAddedBy{
  margin: 0;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 600;
}

#rwPeopleInactiveSince{
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.ra-people__bar h2.ra-owner__title{
  font-size: 1.35rem;
}

#rwOwnerPropertiesForm > .ra-people__bar{
  margin-top: 18px;
}

#rwOwnerPropertiesForm > .ra-people__bar h3{
  margin: 0;
  font-size: 1.25rem;
  color: #0f172a;
  font-weight: 600;
}

.ra-owner-profile{
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ra-owner-profile[hidden]{
  display: none;
}

/* The owner's terms: one card, two groups, each term a number over its name. */
.ra-owner-terms-card{
  display: flex;
  flex-wrap: wrap;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.ra-owner-terms-card__group{
  flex: 1 1 auto;
  padding: 14px 20px 16px;
}

.ra-owner-terms-card__group + .ra-owner-terms-card__group{
  flex: 0 1 auto;
  border-left: 1px solid #e2e8f0;
}

.ra-owner-terms-card__head{
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.ra-owner-terms-card__row{
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}

.ra-owner-term{
  display: flex;
  flex-direction: column;
  min-width: 96px;
}

.ra-owner-term__value{
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.ra-owner-term__value--in{ color: #15803d; }

.ra-owner-term__label{
  margin-top: 2px;
  font-size: 0.85rem;
  color: #334155;
}

.ra-owner-term__hint{
  font-size: 0.75rem;
  color: #94a3b8;
}

.ra-owner-term__hint:empty{ display: none; }

@media (max-width: 640px){
  .ra-owner-terms-card__group + .ra-owner-terms-card__group{
    border-left: 0;
    border-top: 1px solid #e2e8f0;
  }
}

.ra-owner-profile__bar{
  margin: 32px 0 12px; /* room between the terms card and the properties */
}

.ra-owner-profile__bar h3{
  margin: 0;
  font-size: 1.25rem;
  color: #0f172a;
  font-weight: 600;
}

.ra-people__plus{
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 0;
  border-radius: 10px;
  background: #102d4e;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ra-people__plus:disabled{
  opacity: 0.35;
  cursor: default;
}

.ra-bank-help{
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #102d4e;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
}

.ra-bank-intro{
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid #d6e0ea;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.5;
}

.ra-bank-intro__ok,
.ra-bank-intro__next{
  display: block;
}

.ra-bank-intro__ok{
  color: #166534;
  font-weight: 700;
}

.ra-bank-intro__next{
  color: #b91c1c;
}

.ra-dash__bank.ra-dash__bank--ready{
  border-color: #15803d;
  background: #f0fdf4;
}

/* Bank accounts > Help: a one-page explainer. Numbered parts, fund cards with a color edge
   (rent navy, security teal, operating gold), and a side-by-side "why" comparison. */
.ra-bank-guide{
  --guide-ink: #0f1b2d;
  --guide-mute: #5f6b7b;
  --guide-line: #e4dfd5;
  --guide-navy: #102d4e;
  --guide-soft: #fbfaf7;
  position: relative;
  max-width: 980px;
  margin: 0;
  padding: 0 0 24px;
  color: var(--guide-ink);
}

.ra-bank-guide__head{
  margin: 0 0 28px;
}

.ra-bank-guide__kicker{
  margin: 0 0 6px;
  color: var(--guide-mute);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ra-bank-guide h3{
  margin: 0 0 10px;
  color: var(--guide-navy);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.ra-bank-guide__lead{
  margin: 0;
  max-width: 62ch;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.55;
}

.ra-bank-guide__part{
  padding: 24px 0;
  border-top: 1px solid var(--guide-line);
}

.ra-bank-guide__h{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  color: var(--guide-navy);
  font-size: 1.15rem;
  font-weight: 700;
}

.ra-bank-guide__h span{
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--guide-navy);
  color: #fff;
  font-size: 0.8rem;
}

.ra-bank-guide__sub{
  margin: 0 0 16px 36px;
  max-width: 62ch;
  color: var(--guide-mute);
  font-size: 0.95rem;
  line-height: 1.5;
}

.ra-bank-guide__grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.ra-bank-guide__card{
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 0;
  padding: 18px 18px 16px;
  border: 1px solid var(--guide-line);
  border-top: 4px solid var(--guide-navy);
  border-radius: 14px;
  background: #fff;
}

.ra-bank-guide__card--security{ border-top-color: #0f766e; }
.ra-bank-guide__card--operating{ border-top-color: #b8862b; }

.ra-bank-guide__tag{
  margin: 0;
  color: var(--guide-mute);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ra-bank-guide__whose{
  margin: 0;
  color: var(--guide-navy);
  font-size: 1.1rem;
  font-weight: 700;
}

.ra-bank-guide__io{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.45;
}

.ra-bank-guide__io dt{
  color: var(--guide-mute);
  font-weight: 650;
}

.ra-bank-guide__io dd{
  margin: 0;
  color: #334155;
}

.ra-bank-guide__name{
  margin: 4px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--guide-line);
  color: var(--guide-mute);
  font-size: 0.86rem;
}

.ra-bank-guide__name strong{
  color: var(--guide-ink);
  font-weight: 650;
}

.ra-bank-guide__rows{
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--guide-line);
  border-radius: 14px;
  background: #fff;
}

.ra-bank-guide__rows li{
  display: grid;
  grid-template-columns: minmax(150px, 200px) 1fr;
  gap: 4px 16px;
  padding: 14px 18px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ra-bank-guide__rows li + li{
  border-top: 1px solid var(--guide-line);
}

.ra-bank-guide__rows strong{
  color: var(--guide-navy);
}

.ra-bank-guide__rows span{
  color: #334155;
}

.ra-bank-guide__note{
  margin: 12px 0 0;
  color: var(--guide-mute);
  font-size: 0.9rem;
}

.ra-bank-guide__compare{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.ra-bank-guide__compare section{
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border-radius: 14px;
  background: var(--guide-soft);
  border: 1px solid var(--guide-line);
}

.ra-bank-guide__compare p{
  margin: 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.55;
}

.ra-bank-guide__compare p.ra-bank-guide__tag{
  color: var(--guide-navy);
  font-size: 0.74rem;
  line-height: 1.4;
}

.ra-bank-guide__steps{
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}

.ra-bank-guide__steps li{
  position: relative;
  padding: 0 0 0 36px;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.55;
  counter-increment: guide-step;
}

.ra-bank-guide__steps li::before{
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--guide-navy);
  border-radius: 50%;
  color: var(--guide-navy);
  font-size: 0.78rem;
  font-weight: 700;
}

.ra-bank-guide__steps strong{
  color: var(--guide-ink);
}

.ra-bank-guide__tips{
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0 0 0 36px;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.55;
}

.ra-bank-guide__tips li::marker{
  color: #b8862b;
}

@media (max-width: 640px){
  .ra-bank-guide__sub{ margin-left: 0; }
  .ra-bank-guide__rows li{ grid-template-columns: 1fr; }
  .ra-bank-guide__tips{ padding-left: 20px; }
}

#rwBankRows[hidden],
#rwBankSlotsBlock[hidden],
#rwBankLists[hidden],
#rwBankTreasuryBlock[hidden],
#rwBankPrivateHead[hidden],
#rwBankLedger[hidden],
#rwBankOnboarding[hidden]{
  display: none !important;
}

/* Withdraw from Payments: how much is free to move, above the form. */
.ra-bank-withdraw__free{
  margin: 0 0 10px;
  color: #475569;
  font-size: 0.9rem;
}

/* Stripe accounts sit under the PM's own banks, three lines down. */
#rwBankTreasuryBlock{
  margin-top: 4.5em;
  margin-bottom: 18px;
}

/* The section titles on Bank accounts scroll away with the page. */
#rwBankLists .ra-invoice-toolbar{
  position: static;
}

/* A PM sees their banks in Your bank accounts; the Other bank accounts table stays hidden. */
#rwBankPrivateHead:not([hidden]),
#rwBankPrivateHead:not([hidden]) + #rwBankRows{
  display: none !important;
}

#rwBankLedger,
#rwBankOnboarding{
  position: relative;
}

#rwBankLedger > #rwBankLedgerTitle{
  margin: 0;
}

#rwBankLedgerHead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 1.25em 0;
  margin: 1lh 0;
}

#rwBankList > .ra-people__bar[hidden]{
  display: none !important;
}

#rwBankLedgerHead .ra-owner__title{
  margin: 0;
  justify-self: start;
}

.ra-bank-ledger__start{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#rwBankLedgerRange,
#rwBankLedgerUseBtn{
  width: auto;
  min-width: 11rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 8px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: left;
}

.ra-bank-ledger-use{
  position: relative;
}

.ra-bank-ledger-use__menu{
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.ra-bank-ledger-use__menu[hidden]{
  display: none !important;
}

.ra-bank-ledger-use__menu button{
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 6px 8px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.ra-bank-ledger-use__menu button[aria-pressed="true"]{
  background: #f1f5f9;
}

.ra-bank-ledger-use__menu button[aria-pressed="true"]::before{
  content: "✓";
  width: 1em;
  color: #15803d;
  font-weight: 700;
}

.ra-bank-ledger-use__menu button[aria-pressed="false"]::before{
  content: "";
  width: 1em;
}

.ra-bank-ledger__end{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

#rwBankLedgerClose{
  position: static;
  top: auto;
  right: auto;
  margin: 0;
  align-self: center;
}

#rwBankLedgerDelete{
  background: #b91c1c;
}

#rwBankLedgerDelete[hidden]{
  display: none !important;
}

#rwBankLedger .ra-ledger__money{
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#rwBankTreasuryRows > table,
#rwBankRows > table,
#rwBankSlots > table,
#rwBankLedgerTable > table{
  table-layout: fixed;
}

#rwBankTreasuryRows th,
#rwBankTreasuryRows td,
#rwBankRows th,
#rwBankRows td,
#rwBankSlots th,
#rwBankSlots td,
#rwBankLedgerTable th,
#rwBankLedgerTable td{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rwBankTreasuryRows td:nth-child(2){
  white-space: normal !important;
  overflow: visible;
  text-overflow: clip;
}

.ra-bank-uses{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.ra-bank-uses .ra-bank-card__default{
  display: inline-flex;
}

.ra-bank-treasury-uses{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.ra-bank-treasury-uses__note{
  float: left;
  width: 100%;
  margin: 0 0 4px;
  padding: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.4;
}

.ra-bank-treasury-uses label{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 700;
}

.ra-bank-treasury-uses input{
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  margin: 0;
  border: 1.5px solid #102d4e;
  border-radius: 2px;
  background: #fff;
  flex: 0 0 auto;
}

.ra-bank-treasury-uses input:checked{
  background: #102d4e;
  box-shadow: inset 0 0 0 3px #fff;
}

#rwBankTreasuryRows th:nth-child(2),
#rwBankTreasuryRows td:nth-child(2){
  width: 16%;
}

#rwBankTreasuryRows .ra-bank-card__default{
  margin-left: 0;
}

#rwBankTreasuryRows th:nth-child(5),
#rwBankTreasuryRows td:nth-child(5){
  width: calc(100% / 6 * 0.7);
  text-align: center;
}

#rwBankLedgerTable th:nth-child(1),
#rwBankLedgerTable td:nth-child(1){
  width: calc(20% * 0.6);
}

#rwBankLedgerTable th:nth-child(3),
#rwBankLedgerTable td:nth-child(3){
  width: calc(20% * 1.3);
}

#rwBankLedgerTable th:nth-child(4),
#rwBankLedgerTable td:nth-child(4),
#rwBankLedgerTable th:nth-child(5),
#rwBankLedgerTable td:nth-child(5){
  width: calc(20% * 0.7);
}

#rwBankTreasuryRows td.ra-ledger__in,
#rwBankLedger td.ra-ledger__in{
  color: #15803d !important;
}

#rwBankTreasuryRows td.ra-ledger__out,
#rwBankLedger td.ra-ledger__out{
  color: #b91c1c !important;
}

#rwBankOnboarding{
  max-width: 760px;
}

#rwOnboardCompany[hidden]{
  display: none !important;
}

#rwBankRestricted{
  margin: 0 0 12px;
  color: #991b1b;
}

.ra-bank-onboarding__status{
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid #b91c1c;
  border-radius: 10px;
  color: #991b1b;
  background: #fef2f2;
}

.ra-bank-onboarding__status.is-ready{
  border-color: #15803d;
  color: #166534;
  background: #f0fdf4;
}

.ra-bank-onboarding__status p,
.ra-bank-onboarding__status ul{
  margin: 8px 0 0;
}

.ra-bank-onboarding__status ul{
  padding-left: 18px;
}

.ra-bank-onboarding__section{
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 12px;
  margin: 0 0 28px;
}

/* Stripe Settings on a desktop: three fields a row, the form 10% wider. */
@media (min-width: 1025px){
  #rwBankOnboarding{
    max-width: 836px;
  }

  .ra-bank-onboarding__section{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ra-bank-onboarding__section h3,
.ra-bank-onboarding__section-head,
.ra-bank-onboarding__wide{
  grid-column: 1 / -1;
  margin: 0;
  color: #102d4e;
  font-size: 1rem;
}

.ra-bank-onboarding__note{
  grid-column: 1 / -1;
  margin: -6px 0 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.4;
}

.ra-bank-id__sent{
  display: block;
  margin-top: 4px;
  color: #166534;
  font-size: 0.8rem;
}

.ra-bank-id__sent[hidden]{
  display: none;
}

.ra-bank-onboarding__note.ra-bank-id__ok{
  color: #166534;
  font-weight: 600;
}

.ra-bank-onboarding__note.ra-bank-id__problem{
  color: #b91c1c;
}

.ra-bank-onboarding__section-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ra-bank-onboarding__section-head h3{
  margin: 0;
}

#rwOnboardSame{
  border: 0;
  background: transparent;
  color: #0369a1;
  font-weight: 650;
  cursor: pointer;
}

#rwBankAccounts .ra-bank-card__default{
  margin-left: 8px;
}

.ra-bank-cards{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
}

.ra-bank-cards > li{
  min-width: 0;
}

.ra-bank-card{
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #102d4e;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.ra-bank-card__head{
  display: flex;
  align-items: center;
  gap: 8px;
}

.ra-bank-card__name{
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
}

.ra-bank-card__default{
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #bbf7d0;
  color: #14532d;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

/* Something still to do (e.g. not connected for payments): soft red, not green. */
.ra-bank-card__default.ra-bank-card__default--off{
  background: #fee2e2;
  color: #991b1b;
}

.ra-bank-card__comment{
  margin: 10px 0 0;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ra-bank-card__facts{
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 4px 12px;
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.ra-bank-card__facts div{
  display: contents;
}

.ra-bank-card__facts dt{
  margin: 0;
  color: #64748b;
  font-weight: 600;
}

.ra-bank-card__facts dd{
  margin: 0;
  overflow-wrap: anywhere;
}

#rwBankModal,
#rwBankDeposit,
#rwBankWithdraw{
  top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px) + 5px);
  place-items: start center;
  padding-top: 0;
  overflow-y: auto;
}

.ra-bank-modal{
  position: relative;
  width: 50vw;
  max-width: 50vw;
  max-height: 50vh;
  overflow: auto;
  padding: 32px 18px 1lh;
  background: #e2e8f0;
  color: #0f172a;
  border: 2px solid #334155;
}

#rwBankModal .ra-people__field input,
#rwBankModal .ra-people__field select,
#rwBankModal .ra-people__field textarea,
#rwBankRename .ra-people__field input{
  background: #fff;
  color: #0f172a;
  border: 1px solid #6d8299;
}

#rwBankRenameStripe{
  cursor: default;
}

@media (min-width: 1025px){
  .ra-bank-modal,
  .ra-portal__modal{
    height: auto;
    max-height: none;
    overflow: visible;
    padding-bottom: 1.25em;
    padding-bottom: 1lh;
  }
}

.ra-bank-modal .ra-portal__modal-title{
  margin-bottom: 8px;
}

.ra-bank-modal .ra-people__field textarea{
  min-height: 48px;
}

.ra-bank-modal .ra-portal__modal-actions{
  margin-top: 10px;
}

.ra-bank-modal__x{
  position: absolute;
  top: 8px;
  right: 8px;
}

.ra-bank-modal__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 16px;
}

.ra-bank-modal__actions{
  display: flex;
}

#rwBankForm .ra-bank-only.is-held{
  visibility: hidden;
}

.ra-bank-modal__actions .ra-portal__ghost-btn,
.ra-bank-modal__actions .ra-portal__primary-btn{
  flex: 1 1 0;
  min-height: 44px;
  border-radius: 10px;
}

.ra-bank-default{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f172a;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Connect bank also opens from inside a Pay dialog: it sits above it. */
#rwPullBankModal{
  z-index: 11;
}

/* Full-row checkbox with a sentence (e.g. debit authorization): wrap, box stays at the top */
.ra-bank-default.ra-bank-modal__wide{
  display: flex;
  align-items: flex-start;
  white-space: normal;
  line-height: 1.35;
  min-width: 0;
}

.ra-bank-default.ra-bank-modal__wide input{
  flex: none;
  margin-top: 2px;
}

.ra-bank-use{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  color: #0f172a;
  font-size: 0.9rem;
}

#rwBankTreasuryUseField[hidden],
#rwBankUseField[hidden],
#rwBankEnabledField[hidden],
#rwOwnerFeeAmountField[hidden],
.ra-bank-use[hidden],
.ra-bank-default[hidden]{
  display: none !important;
}

.ra-bank-use legend{
  font-size: 0.8rem;
  font-weight: 700;
}

.ra-bank-use label{
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

@media (min-width: 641px){
  .ra-bank-cards{
    grid-template-columns: 1fr 1fr;
  }

  .ra-bank-modal__grid{
    grid-template-columns: 1fr 1fr;
  }

  .ra-bank-modal__wide,
  #rwBankKindField{
    grid-column: 1 / -1;
  }
}

@media (max-width: 800px){
  .ra-portal__modal,
  .ra-bank-modal{
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: 50vh;
  }

  #rwAppConfirm .ra-portal__modal,
  #rwVerifyMailModal .ra-portal__modal,
  #rwPeopleMailModal .ra-portal__modal,
  #rwOwnerTxStripeModal .ra-portal__modal,
  #rwEstimateReadyModal:not(.is-review) .ra-portal__modal{
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    height: 25vh !important;
    max-height: 25vh !important;
  }

  #rwAgentInvoiceBatchModal .ra-portal__modal{
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    height: 50vh !important;
    max-height: 50vh !important;
  }

  #rwEstimateReadyModal.is-review .ra-portal__modal{
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
}

@media (min-width: 801px){
  #rwAppConfirm .ra-portal__modal,
  #rwVerifyMailModal .ra-portal__modal,
  #rwPeopleMailModal .ra-portal__modal,
  #rwOwnerTxStripeModal .ra-portal__modal,
  #rwEstimateReadyModal:not(.is-review) .ra-portal__modal{
    width: 25vw !important;
    max-width: 25vw !important;
    height: 25vh !important;
    max-height: 25vh !important;
    overflow: auto;
    box-sizing: border-box;
  }

  #rwAgentInvoiceBatchModal .ra-portal__modal{
    width: 50vw !important;
    max-width: 50vw !important;
    height: 50vh !important;
    max-height: 50vh !important;
    overflow: auto;
    box-sizing: border-box;
  }
}

#rwAgentOwnerInvoiceEstimatePick:not([hidden]),
#rwVendorInvoiceEstimatePick:not([hidden]){
  z-index: 95 !important;
}

[data-rw-invoice-empty]{
  color: #b91c1c !important;
}

#rwAgentInvoiceBatchModal .ra-portal__modal{
  position: relative;
  padding-top: 40px;
}

#rwAgentInvoiceBatchModal #rwAgentInvoiceBatchCancel{
  position: absolute;
  top: 6px;
  right: 8px;
}

.ra-portal__modal [role="status"],
.ra-bank-modal [role="status"],
#rwAgentOwnerInvoiceHint,
#rwVendorInvoiceHint,
#rwAgentOwnerInvoiceEstimateHint,
#rwVendorInvoiceEstimateHint,
#rwAgentOwnerInvoiceLineHint,
#rwVendorInvoiceLineHint{
  min-height: 1lh;
}

.ra-portal__modal [role="status"][hidden],
.ra-bank-modal [role="status"][hidden]{
  display: block !important;
  visibility: hidden;
}

.ra-portal__modal [role="status"]:not([hidden]):not(:empty):not(.is-ok),
.ra-bank-modal [role="status"]:not([hidden]):not(:empty):not(.is-ok),
#rwAgentOwnerInvoiceHint:not(:empty),
#rwAgentOwnerInvoiceEstimateHint:not(:empty),
#rwAgentOwnerInvoiceLineHint:not(:empty),
#rwVendorInvoiceHint.ra-estimate-alert:not(:empty),
#rwVendorInvoiceEstimateHint.ra-estimate-alert:not(:empty),
#rwVendorInvoiceLineHint.ra-estimate-alert:not(:empty){
  color: #b91c1c;
}

/* The note that the owner sees the fees: orange so the agent notices it. */
#rwOwnerTermsSeen{ margin: 0 0 12px; color: #b45309; font-family: var(--ad-sans, inherit); line-height: 1.5; }

.ra-owner-terms{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ra-owner-commission-line{
  display: flex;
  align-items: center;
  gap: 8px;
}

#rwOwnerTerms .ra-owner-commission-line input,
#rwOwnerFeeAmountField .ra-owner-commission-line input{
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

#rwOwnerCommissionMark,
#rwOwnerPlacementMark,
#rwOwnerRenewalMark{
  flex: 0 0 auto;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
}

#rwPeopleOwnerLayout{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 721px){
  /* 40 narrow columns (5 = one fee box). The gap is each box's right padding. */
  #rwPeopleForm.ra-people__form--owner #rwPeopleOwnerLayout{
    display: grid;
    grid-template-columns: repeat(40, minmax(0, 1fr));
    column-gap: 0;
    row-gap: 10px;
    align-items: start;
  }

  #rwPeopleForm.ra-people__form--owner #rwPeopleOwnerLayout > .ra-people__pair,
  #rwPeopleForm.ra-people__form--owner #rwOwnerTerms,
  #rwPeopleForm.ra-people__form--owner #rwOwnerTerms .ra-owner-terms,
  #rwPeopleForm.ra-people__form--owner #rwPeopleMailing:not([hidden]){
    display: contents;
  }

  #rwPeopleForm.ra-people__form--owner #rwPeopleOwnerLayout :is(.ra-people__field, #rwOwnerEntityCheck){
    min-width: 0;
    padding-right: 16px;
    box-sizing: border-box;
  }

  /* The owner's details first, then the fees. Email and mailing address 70% of half the row,
     city half of its old width, ZIP half, EIN 80%. */
  #rwPeopleForm.ra-people__form--owner #rwPeopleFirstField{ grid-row: 1; grid-column: 1 / span 10; }
  #rwPeopleForm.ra-people__form--owner #rwPeopleLastField{ grid-row: 1; grid-column: 11 / span 10; }
  #rwPeopleForm.ra-people__form--owner #rwPeoplePhoneField{ grid-row: 1; grid-column: 21 / span 10; }
  #rwPeopleForm.ra-people__form--owner #rwPeopleActiveField{ grid-row: 1; grid-column: 31 / span 10; }

  #rwPeopleForm.ra-people__form--owner #rwPeopleEmailField{ grid-row: 2; grid-column: 1 / span 14; }
  #rwPeopleForm.ra-people__form--owner #rwPeopleAddressField{ grid-row: 2; grid-column: 15 / span 14; }

  #rwPeopleForm.ra-people__form--owner #rwPeopleCityField{ grid-row: 3; grid-column: 1 / span 10; }
  #rwPeopleForm.ra-people__form--owner #rwPeopleStateField{ grid-row: 3; grid-column: 11 / span 10; }
  #rwPeopleForm.ra-people__form--owner #rwPeopleZipField{ grid-row: 3; grid-column: 21 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwPeopleCountryField{ grid-row: 3; grid-column: 26 / span 10; }

  #rwPeopleForm.ra-people__form--owner #rwOwnerEntityCheck{ grid-row: 4; grid-column: 1 / span 10; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerEntityNameField{ grid-row: 4; grid-column: 11 / span 20; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerEntityEinField{ grid-row: 4; grid-column: 31 / span 8; }

  #rwPeopleForm.ra-people__form--owner #rwOwnerCommissionField{ grid-row: 5; grid-column: 1 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerCommissionAmountField{ grid-row: 5; grid-column: 6 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerPlacementField{ grid-row: 5; grid-column: 11 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerPlacementAmountField{ grid-row: 5; grid-column: 16 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerRenewalField{ grid-row: 5; grid-column: 21 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerRenewalAmountField{ grid-row: 5; grid-column: 26 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerMinField{ grid-row: 5; grid-column: 31 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerMaxFixField{ grid-row: 5; grid-column: 36 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerOnboardingField{ grid-row: 6; grid-column: 1 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerOnboardingUnitsField{ grid-row: 6; grid-column: 6 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerOnboardingExtraField{ grid-row: 6; grid-column: 11 / span 5; }
  #rwPeopleForm.ra-people__form--owner #rwOwnerFeeOnField{ grid-row: 7; grid-column: 1 / -1; }
  /* One line beside the onboarding boxes, level with them. */
  #rwPeopleForm.ra-people__form--owner #rwOwnerTermsSeen{ grid-row: 6; grid-column: 16 / -1; align-self: end; margin: 0; padding-bottom: 10px; }

  #rwPeopleForm.ra-people__form--owner #rwOwnerEntityCheck{ align-self: center; min-height: 40px; }
  /* Fee labels may wrap to two lines; the boxes line up at the bottom. */
  #rwPeopleForm.ra-people__form--owner :is(#rwOwnerCommissionField, #rwOwnerCommissionAmountField, #rwOwnerPlacementField, #rwOwnerPlacementAmountField, #rwOwnerRenewalField, #rwOwnerRenewalAmountField, #rwOwnerMinField, #rwOwnerMaxFixField, #rwOwnerOnboardingField, #rwOwnerOnboardingUnitsField, #rwOwnerOnboardingExtraField){ align-self: end; }
}

/* Owner form: the hint inside each box names it, so the labels above are hidden (kept for screen
   readers). The fee row keeps its labels: Percent/Fixed and the amounts need them. */
#rwPeopleForm.ra-people__form--owner :is(#rwPeopleFirstField, #rwPeopleLastField, #rwPeoplePhoneField, #rwPeopleActiveField, #rwPeopleEmailField, #rwPeopleAddressField, #rwPeopleCityField, #rwPeopleStateField, #rwPeopleZipField, #rwPeopleCountryField, #rwOwnerEntityNameField, #rwOwnerEntityEinField) > span:first-child{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* One row: the title on the left, the onboarding note centered in the space before the close X. */
.ra-people__head{
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  min-width: 0;
}
.ra-people__head > h2{ margin: 0; }
.ra-people__head .ra-onboard-badge{ margin: 0; justify-self: center; }
#rwPeopleForm.ra-people__form--sheet:not([hidden]) > .ra-people__head{
  grid-column: 1;
  grid-row: 1;
}

#rwOwnerFeeModal .ra-bank-modal{
  background: #e2e8f0;
}

.ra-owner-tabs{
  display: flex;
  gap: 40px;
  margin: 8px 0 1lh;
  border-bottom: 1px solid #cbd5e1;
}

.ra-owner-tabs button{
  appearance: none;
  margin: 0;
  min-height: 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
  box-shadow: none;
  cursor: pointer;
}

.ra-owner-tabs button[aria-selected="true"]{
  background: transparent;
  color: #0f172a;
  border-bottom-color: #102d4e;
}

[data-rw-owner-pane][hidden],
[data-rw-vendor-pane][hidden]{
  display: none !important;
}

#rwOwnerPayPane,
#rwVendorPayPane{
  display: flex;
  flex-direction: column;
  gap: 1lh;
}

.ra-owner-pay-tools,
.ra-owner-pay-bar{
  display: flex;
  align-items: flex-end;
  flex-wrap: nowrap;
  gap: 16px;
  min-width: 0;
}

.ra-owner-pay-tools .ra-people__field{
  flex: 0.7 1 0;
  min-width: 0;
  margin: 0;
}

.ra-owner-pay-tools .ra-people__field:last-child{
  flex: 1.6 1 0;
}

#rwOwnerPayDraft{
  flex: 0 0 auto;
  margin-left: auto;
  min-height: 44px;
}

#rwOwnerPayDraft:disabled{
  opacity: 0.45;
}

#rwOwnerPayHint,
#rwVendorPayHint{
  min-width: 0;
  margin: 0;
  color: #b91c1c;
  font-weight: 700;
}

#rwOwnerPayHint:empty,
#rwVendorPayHint:empty{
  display: none;
}

.ra-owner-pay-above{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 16px;
}

.ra-owner-pay-selected{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 700;
}

.ra-owner-pay-above .ra-portal__primary-btn{
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  white-space: nowrap;
}

#rwOwnerPayPane table.ra-invoice-grid,
#rwOwnerFeeModal table.ra-invoice-grid,
#rwVendorPayPane table.ra-invoice-grid{
  table-layout: fixed;
  width: 100%;
}

#rwOwnerPayPane table.ra-invoice-grid .ra-pay-check,
#rwOwnerFeeModal table.ra-invoice-grid .ra-pay-check,
#rwVendorPayPane table.ra-invoice-grid .ra-pay-check{
  width: 36px;
  max-width: 36px;
}
#rwOwnerPayPane table.ra-invoice-grid .ra-pay-owner,
#rwOwnerFeeModal table.ra-invoice-grid .ra-pay-owner,
#rwVendorPayPane table.ra-invoice-grid .ra-pay-owner{ width: 14%; }
/* Pay to owners: the tax withheld from this owner's draw, under the name; amber when the company does not withhold. */
.ra-pay-withhold{ display: block; margin-top: 2px; color: #475569; font-size: 0.75rem; line-height: 1.3; white-space: normal; }
.ra-pay-withhold.is-warn{ color: #b45309; }
/* The Owners list Status under the name on Pay / Charge owners: quiet grey lines, not chips. */
.ra-pay-status{ display: block; margin-top: 2px; color: #c2620a; font-size: 0.75rem; line-height: 1.3; white-space: normal; }
.ra-pay-status.is-block{ color: #c24a4a; }
.ra-pay-status.is-good{ color: #2f7d4f; }
.ra-pay-status.is-muted{ color: #64748b; }
/* Pay to owners and Charge owners: a red line stops the action, so the row cannot be picked or typed in;
   the name (and "I have it") still work. */
#rwOwnerTxAccountRows tr.is-blocked td,
#rwOwnerFeeRows tr.is-blocked td{ pointer-events: none; }
#rwOwnerTxAccountRows tr.is-blocked td.ra-pay-owner [data-rw-open-owner],
#rwOwnerFeeRows tr.is-blocked td.ra-pay-owner [data-rw-open-owner],
#rwOwnerTxAccountRows tr.is-blocked .ra-pay-status-fix,
#rwOwnerFeeRows tr.is-blocked .ra-pay-status-fix{ pointer-events: auto; }
#rwOwnerTxAccountRows tr.is-blocked .ra-pay-check,
#rwOwnerTxAccountRows tr.is-blocked .ra-pay-address,
#rwOwnerTxAccountRows tr.is-blocked .ra-pay-balance,
#rwOwnerTxAccountRows tr.is-blocked .ra-pay-drawable,
#rwOwnerTxAccountRows tr.is-blocked .ra-pay-memo,
#rwOwnerTxAccountRows tr.is-blocked .ra-pay-amount,
#rwOwnerFeeRows tr.is-blocked .ra-pay-check,
#rwOwnerFeeRows tr.is-blocked .ra-pay-address,
#rwOwnerFeeRows tr.is-blocked .ra-pay-balance,
#rwOwnerFeeRows tr.is-blocked .ra-pay-memo,
#rwOwnerFeeRows tr.is-blocked .ra-pay-amount,
#rwOwnerFeeRows tr.is-blocked .ra-pay-invoice{ opacity: 0.5; }
.ra-pay-status-fix{
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #2563eb;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
#rwOwnerPayPane table.ra-invoice-grid .ra-pay-address,
#rwOwnerFeeModal table.ra-invoice-grid .ra-pay-address,
#rwVendorPayPane table.ra-invoice-grid .ra-pay-address{ width: 25.82%; }
#rwOwnerPayPane table.ra-invoice-grid .ra-pay-balance,
#rwOwnerPayPane table.ra-invoice-grid .ra-pay-amount,
#rwOwnerFeeModal table.ra-invoice-grid .ra-pay-balance,
#rwOwnerFeeModal table.ra-invoice-grid .ra-pay-amount,
#rwVendorPayPane table.ra-invoice-grid .ra-pay-balance,
#rwVendorPayPane table.ra-invoice-grid .ra-pay-amount{
  width: 7.8%;
  max-width: 7.8%;
}
#rwOwnerPayPane table.ra-invoice-grid .ra-pay-drawable,
#rwOwnerFeeModal table.ra-invoice-grid .ra-pay-drawable,
#rwVendorPayPane table.ra-invoice-grid .ra-pay-drawable{
  width: 8.58%;
  max-width: 8.58%;
}
#rwOwnerPayPane table.ra-invoice-grid .ra-pay-memo,
#rwOwnerFeeModal table.ra-invoice-grid .ra-pay-memo,
#rwVendorPayPane table.ra-invoice-grid .ra-pay-memo{ width: 36%; }

#rwOwnerPayPane table.ra-invoice-grid th,
#rwOwnerPayPane table.ra-invoice-grid td,
#rwOwnerFeeModal table.ra-invoice-grid th,
#rwOwnerFeeModal table.ra-invoice-grid td,
#rwVendorPayPane table.ra-invoice-grid th,
#rwVendorPayPane table.ra-invoice-grid td{
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rwOwnerPayPane table.ra-invoice-grid tbody td,
#rwOwnerFeeModal table.ra-invoice-grid tbody td,
#rwVendorPayPane table.ra-invoice-grid tbody td{
  box-sizing: border-box;
  height: 32px;
  padding: 4px 8px;
  line-height: 1.25;
  vertical-align: middle;
}

#rwOwnerTxAccountRows input:not(.ra-invoice-batch-check),
#rwOwnerFeeRows input:not(.ra-invoice-batch-check),
#rwVendorPayRows input:not(.ra-invoice-batch-check){
  display: block;
  width: 100%;
  height: 24px;
  min-height: 0;
  margin: 0;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 0 6px;
  font: inherit;
  font-size: 12.5px;
  line-height: 22px;
}

#rwOwnerPayPane .ra-invoice-batch-check,
#rwOwnerFeeModal .ra-invoice-batch-check,
#rwOwnerPaySelectedOnly,
#rwOwnerFeeSelectedOnly,
#rwOwnerFeeHideUnpaid,
#rwVendorPayPane .ra-invoice-batch-check,
#rwVendorPaySelectedOnly{
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  margin: 0;
  padding: 0;
  border: 1.5px solid #102d4e;
  border-radius: 2px;
  background: #fff;
  flex: 0 0 16px;
}

#rwOwnerPayPane .ra-invoice-batch-check:checked,
#rwOwnerFeeModal .ra-invoice-batch-check:checked,
#rwOwnerPaySelectedOnly:checked,
#rwOwnerFeeSelectedOnly:checked,
#rwOwnerFeeHideUnpaid:checked,
#rwVendorPayPane .ra-invoice-batch-check:checked,
#rwVendorPaySelectedOnly:checked{
  background: #102d4e;
  box-shadow: inset 0 0 0 3px #fff;
}

#rwOwnerPaySummary.is-short,
#rwVendorPaySummary.is-short{
  color: #b91c1c;
  font-weight: 700;
}

#rwOwnerPaySummary.is-ok,
#rwOwnerPayHint.is-ok,
#rwVendorPaySummary.is-ok,
#rwVendorPayHint.is-ok{
  color: #15803d;
  font-weight: 700;
}

#rwOwnerFeeModal{
  display: flex;
  flex-direction: column;
  gap: 1lh;
}

#rwOwnerFeeModal .ra-owner-pay-tools .ra-people__field{
  flex: 0 1 23%;
  max-width: 23%;
}

#rwOwnerFeeSummary{
  flex: 0 1 auto;
  min-height: 1.4em;
  margin: 0;
}

#rwOwnerFeeSummary.is-short{
  color: #b91c1c;
  font-weight: 700;
}

#rwOwnerFeeSummary.is-ok,
#rwOwnerFeeHint.is-ok{
  color: #15803d;
  font-weight: 700;
}

.ra-owner-fee-filters{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  min-width: 0;
}

#rwOwnerFeeHideUnpaidLabel[hidden]{
  display: none !important;
}

#rwOwnerFeeModal .ra-owner__list{
  margin: 0;
}

#rwOwnerFeeDraft{
  flex: 0 0 auto;
  min-height: 44px;
}

.ra-owner-fee-actions{
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-left: auto;
  flex: 0 0 auto;
}

.ra-owner-fee-actions .ra-portal__primary-btn{
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  white-space: nowrap;
}

.ra-owner-fee-status{
  display: flex;
  flex-direction: column;
  min-height: 1lh;
  margin-top: calc(4px - 1lh);
}

.ra-owner-fee-status p{
  margin: 0;
}

.ra-owner-fee-status #rwOwnerFeeHint:empty,
.ra-owner-fee-status #rwOwnerFeeSummary:empty{
  display: none;
}

#rwOwnerFeeModal table.ra-invoice-grid .ra-pay-memo{ width: 40%; }
#rwOwnerFeeModal table.ra-invoice-grid .ra-pay-invoice{
  width: 64px;
  max-width: 64px;
  text-align: center;
}

.ra-owner-fee-invoice{
  border: 0;
  background: transparent;
  padding: 0 8px;
  color: #102d4e;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

#rwOwnerFeeDraft:disabled{
  opacity: 0.45;
}

#rwOwnerPaySummary,
#rwVendorPaySummary{
  flex: 0 1 auto;
  min-height: 1.4em;
  margin: 0;
  white-space: nowrap;
}

.ra-owner-pay-bar{
  min-height: 1.4em;
}

/* The Pay dialog's money flow: boxes, arrows with days on them, the sum at the end. */
.ra-pay-flow{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 6px 0 2px;
  font: 600 0.8rem/1.2 var(--ad-sans, inherit);
  color: var(--ad-ink, #102d4e);
}

.ra-pay-flow[hidden]{
  display: none;
}

.ra-pay-flow__box{
  padding: 3px 8px;
  border: 1px solid var(--ad-line, #cbd5e1);
  border-radius: 6px;
  background: var(--ad-paper, #fff);
  white-space: nowrap;
}

/* The days sit on the line; the arrowhead is drawn at its right end. */
.ra-pay-flow__arrow{
  position: relative;
  display: inline-flex;
  justify-content: center;
  min-width: 52px;
  padding-bottom: 8px;
}

.ra-pay-flow__arrow::after{
  content: "";
  position: absolute;
  left: 0;
  right: 6px;
  bottom: 3px;
  border-top: 1.5px solid currentColor;
}

.ra-pay-flow__arrow::before{
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  border-left: 7px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* Right to left: the money starts on the right, the arrows point left, the sum ends on the left. */
.ra-pay-flow--rtl{
  flex-direction: row-reverse;
  justify-content: flex-end;
  margin: 10px 0 0;
}

.ra-pay-flow--rtl .ra-pay-flow__arrow::after{
  left: 6px;
  right: 0;
}

.ra-pay-flow--rtl .ra-pay-flow__arrow::before{
  left: 0;
  right: auto;
  border-left: 0;
  border-right: 7px solid currentColor;
}

.ra-pay-flow--rtl .ra-pay-flow__sum{
  margin-left: 0;
  margin-right: 8px;
}

.ra-pay-flow__days{
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--ad-ink-2, #475569);
}

.ra-pay-flow__sum{
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ad-ink, #102d4e);
  color: #fff;
  white-space: nowrap;
}

.ra-owner-pay-tools .ra-people__field{
  align-self: stretch;
}

#rwOwnerPayAccount[hidden],
#rwVendorPayAccount[hidden]{
  display: none !important;
}

.ra-owner-pay-pick{
  position: relative;
  width: 100%;
  min-width: 0;
}

#rwOwnerPayAccountBtn,
.ra-owner-pay-option,
#rwVendorPayAccountBtn{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  background: #fff;
  color: #0f172a;
  text-align: left;
}

#rwOwnerPayAccountBtn,
#rwVendorPayAccountBtn{
  height: 40px;
  min-height: 40px;
  border: 1px solid #6d8299;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Banks loading from Stripe: a small ring in the "Pay from" button, the page stays usable. */
.ra-pick-spin{
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 2px solid #cbd5e1;
  border-top-color: #102d4e;
  border-radius: 50%;
  animation: ra-spin 0.7s linear infinite;
}

button.is-loading{
  cursor: progress;
}

.ra-owner-pay-menu{
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #334155;
  border-radius: 8px;
  overflow: auto;
  max-height: 240px;
}

.ra-owner-pay-menu[hidden]{
  display: none !important;
}

.ra-owner-pay-option{
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 10px;
}

.ra-owner-pay-name{
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ra-owner-pay-bar .ra-portal__primary-btn{
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  white-space: nowrap;
}

#rwOwnerPayPane .ra-owner__list,
#rwVendorPayPane .ra-owner__list{
  margin: 0;
}

#rwOwnerFeeHint.is-error{
  color: #b91c1c;
}

#rwOwnerFeeHint:empty{
  display: none;
}

.ra-bank-deposit{
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #102d4e;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.ra-bank-row-btn{
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #102d4e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.ra-bank-move{
  white-space: nowrap;
}

.ra-bank-move__btn{
  width: 32px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.ra-bank-move__btn + .ra-bank-move__btn{
  margin-left: 4px;
}

.ra-bank-move__btn--in{
  color: #16a34a;
}

.ra-bank-move__btn--out{
  color: #dc2626;
}

body:has(#rwBankForm:not([hidden])) #rwBankAccounts{
  padding-bottom: calc(72px + var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
}

#rwBankAccounts:not([hidden]){
  max-width: none;
  background: #e2e8f0;
  color: #0f172a;
}

#rwAccountPage:not([hidden]){
  display: block;
  box-sizing: border-box;
  max-width: none;
  width: auto;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: auto;
  background: #e2e8f0;
  color: #0f172a;
  padding: 24px calc(20px + env(safe-area-inset-right, 0px)) calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px)) calc(20px + env(safe-area-inset-left, 0px));
}

#rwAccountPage[hidden]{
  display: none !important;
}

.ra-people__form[hidden],
#rwOwnerDetail[hidden],
#rwPropertyForm[hidden],
#rwTenantLeases[hidden],
#rwOwnerMenu[hidden],
#rwTenantMenu[hidden],
#rwAgentEstimateMenu[hidden],
#rwIdleStartMenu[hidden],
#rwVendorInvoiceMenu[hidden],
#rwAgentOwnerInvoiceMenu[hidden],
#rwVendorInvoiceEstimatePick[hidden],
#rwAgentOwnerInvoiceEstimatePick[hidden],
#rwAgentOwnerEstimateHead[hidden],
#rwPropertyLease.is-unused[hidden]{
  display: none !important;
}

#rwPropertyLease{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ra-people__menu{
  position: fixed;
  z-index: 40;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}

.ra-people__menu[hidden]{
  display: none !important;
}

#rwAgentEstimateMenu{
  background: #fff;
}

.ra-people__menu button{
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ra-people__menu button:hover{
  background: #e0f2fe;
}

.ra-people__line{
  display: flex;
  gap: 6px;
  align-items: stretch;
}

.ra-people__line .ra-people__row{
  flex: 1;
  width: auto;
}

.ra-people__more{
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  flex: 0 0 36px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.ra-people__more span{
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: #0f172a;
}

.ra-people__add-prop{
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #102d4e;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.ra-people__meta{
  margin: 0 0 12px;
  color: #475569;
  font-size: 0.85rem;
}

.ra-people__hint{
  margin: 0 0 8px;
  color: #b45309;
  font-size: 0.85rem;
}

.ra-people__rows{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ra-people__row{
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ra-people__row strong{
  display: block;
}

.ra-people__titleline{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ra-people__who{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ra-people__corner{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.ra-people__corner .ra-people__units,
.ra-people__corner .ra-status-chip{
  margin-left: 0;
}

.ra-status-chip--inactive{
  background: #e5e7eb;
}

.ra-people__row span.ra-status-chip.ra-status-chip--rate-excellent{
  background: #4ade80;
  color: #000;
}

.ra-people__row span.ra-status-chip.ra-status-chip--rate-good{
  background: #bbf7d0;
  color: #000;
}

.ra-people__row span.ra-status-chip.ra-status-chip--rate-not-good{
  background: #eab308;
  color: #000;
}

.ra-people__row span.ra-status-chip.ra-status-chip--rate-bad{
  background: #dc2626;
  color: #000;
}

.ra-people__fact{
  display: block;
}

.ra-people__id{
  font-size: 0.72rem;
  font-weight: 500;
  color: #64748b;
}

.ra-people__row .ra-people__name,
.ra-vendor__row .ra-rowhead > strong{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.ra-people__tag{
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
}

.ra-people__tag--area{
  background: #fff;
  color: #000;
  border: 1px solid #000;
}

.ra-people__tag--tech{
  background: #e5e7eb;
}

.ra-people__row .ra-people__units{
  margin-left: auto;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.ra-people__row span{
  color: #64748b;
  font-size: 0.8rem;
}

.ra-people__row span.ra-status-chip{
  color: #000;
  font-size: 0.72rem;
  font-weight: 800;
}

.ra-people__status{
  display: flex;
  align-items: center;
  gap: 6px;
}

.ra-people__dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.ra-people__dot--vacant{
  background: #dc2626;
}

.ra-people__dot--leased{
  background: #eab308;
}

.ra-people__dot--occupied,
.ra-people__dot--active,
.ra-people__dot--rate-excellent{
  background: #16a34a;
}

.ra-people__dot--rate-good{
  background: #4ade80;
}

.ra-people__dot--rate-not-good{
  background: #eab308;
}

.ra-people__dot--rate-bad{
  background: #dc2626;
}

.ra-people__dot--inactive,
.ra-people__dot--unread{
  background: #dc2626;
}

.ra-people__row:disabled,
.ra-people__row--static{
  cursor: default;
}

.ra-people__row:disabled{
  opacity: 0.72;
}

.ra-people__form{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ra-people__field{
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

.ra-people__field[hidden],
.ra-portal__field[hidden]{
  display: none !important;
}

.ra-people__picks{
  display: flex;
  flex-direction: column;
  max-height: 160px;
  overflow: auto;
  border: 1px solid #6d8299;
  border-radius: 10px;
  background: #fff;
}

.ra-people__pick{
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  height: 40px;
}

.ra-people__gap,
.ra-property-form-gap{
  height: 40px;
}

.ra-people__pick-name,
.ra-people__pick-delete{
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.ra-people__pick-name{
  flex: 1;
  text-align: left;
  padding: 6px 8px;
}

.ra-people__pick-name:hover,
.ra-people__pick-delete:hover{
  background: #e0f2fe;
}

.ra-people__pick-delete{
  padding: 6px 8px;
  color: #b91c1c;
}

.ra-people__other-row{
  display: flex;
  align-items: center;
  gap: 8px;
}

.ra-people__other-row input{
  flex: 1;
  min-width: 0;
}

.ra-people__other-row button{
  flex: 0 0 auto;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #102d4e;
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.ra-people__tech{
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ra-people__tech[hidden]{
  display: none !important;
}

.ra-people__tech button,
.ra-people__row .ra-people__chip{
  border: 0;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e0f2fe;
  color: #0f172a;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
}

.ra-people__tech button{
  cursor: pointer;
}

/* State list or a free state / province box, by the owner's country. */
#rwPeopleStateField > [hidden]{
  display: none;
}

.ra-people__field input,
.ra-people__field select,
.ra-people__field textarea{
  width: 100%;
  box-sizing: border-box;
  height: 40px;
  padding: 8px 10px;
  border: 1px solid #6d8299;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
}

.ra-people__other-row input{
  width: auto;
}

.ra-people__field textarea{
  height: auto;
  min-height: 72px;
  resize: vertical;
}

.ra-people__field input[readonly]{
  background: #f1f5f9;
  color: #475569;
}

.ra-people__actions{
  display: flex;
  gap: 8px;
}

.ra-people__actions button{
  flex: 1 1 0;
  height: 40px;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ra-people__actions button[type="submit"]{
  border: 0;
  background: #102d4e;
  color: #fff;
}

.ra-people__actions button.is-busy,
#rwPeopleSave.is-busy,
#rwAgentInvoicePay.is-busy,
#rwAgentInvoiceBatchTop.is-busy,
#rwAgentInvoiceBatchMini.is-busy,
#rwAgentInvoiceBatchConfirm.is-busy,
#rwAgentEstimateSaveLines.is-busy{
  position: relative;
  color: transparent;
  pointer-events: none;
}

.ra-people__actions button.is-busy::after,
#rwPeopleSave.is-busy::after,
#rwAgentInvoicePay.is-busy::after,
#rwAgentInvoiceBatchTop.is-busy::after,
#rwAgentInvoiceBatchMini.is-busy::after,
#rwAgentInvoiceBatchConfirm.is-busy::after,
#rwAgentEstimateSaveLines.is-busy::after{
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ra-spin 0.7s linear infinite;
}

.ra-spinner{
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #fff;
}

.ra-spinner.is-modal{
  background: rgba(15, 23, 42, 0.45);
}

/* Opening an estimate: the page stays as it is, only the spinner shows. */
.ra-spinner.is-quiet{
  background: transparent;
  pointer-events: none;
}

/* Sending: above every sheet and dialog, so the wait always shows. */
.ra-spinner.is-sending{
  z-index: 100000;
}

.ra-spinner__card{
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
}

.ra-spinner.is-modal .ra-spinner__card{
  width: auto;
  height: auto;
  min-width: 220px;
  padding: 22px 24px 18px;
  gap: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
}

.ra-spinner__label{
  margin: 0;
  color: #102d4e;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}

.ra-spinner[hidden]{
  display: none !important;
}

table.ra-invoice-grid thead th,
table.ra-list-grid thead th{
  position: sticky;
}

.ra-col-resize{
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.ra-col-resize::after{
  content: "";
  position: absolute;
  top: 20%;
  right: 3px;
  bottom: 20%;
  width: 2px;
  background: transparent;
}

thead th:hover .ra-col-resize::after{
  background: #94a3b8;
}

.ra-spinner__ring{
  width: 36px;
  height: 36px;
  border: 3px solid #d6dee8;
  border-top-color: #102d4e;
  border-radius: 50%;
  animation: ra-spin 0.7s linear infinite;
}

@keyframes ra-spin{
  to{ transform: rotate(360deg); }
}

.ra-people__actions button[type="button"]{
  border: 1px solid #6d8299;
  background: #fff;
  color: #0f172a;
}

.ra-nav-desk{
  display: none;
}

.ra-owner__nav-btn[hidden],
.ra-owner__nav-group[hidden],
.ra-owner__nav-sub[hidden]{
  display: none !important;
}

.ra-owner__nav-group{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ra-owner__nav-sub{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.ra-owner__nav-btn--sub{
  padding-left: 10px;
  font-size: 0.88rem;
  font-weight: 500;
}

.ra-owner__nav-sub.is-modal{
  position: fixed;
  z-index: 40;
  width: min(220px, calc(100vw - 16px));
  margin: 0;
}

.ra-owner__nav-btn,
.ra-owner__subnav-btn,
.ra-owner__back{
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ra-owner__nav-btn{
  text-align: center;
  white-space: nowrap;
}

.ra-owner__nav-btn.is-active,
.ra-owner__subnav-btn.is-active{
  background: #e0f2fe;
  color: #0369a1;
}

.ra-owner__pages{
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  /* background: #f8fafc; */
  /* background: #eef2f6; */
  background: #e2e8f0;
  padding: 24px calc(20px + env(safe-area-inset-right, 0px)) calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px)) calc(20px + env(safe-area-inset-left, 0px));
}

.ra-owner__page[hidden],
.ra-owner__custom[hidden],
#rwOwnerLedgerInvoice[hidden],
#rwTenantPropertyDetail[hidden],
#rwTenantLedgerDoc[hidden],
#rwAgentPropertyDetail[hidden],
#rwAgentMaintDetail[hidden],
#rwAgentOwnerDetail[hidden],
#rwAgentTenantDetail[hidden],
#rwAgentVendorPick[hidden],
#rwAgentInvoiceDetail[hidden],
#rwVendorLedgerInvoice[hidden]{
  display: none !important;
}

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

.ra-invoice-toolbar{
  position: sticky;
  top: 0;
  z-index: 6;
  background: #e2e8f0;
  padding-bottom: 0;
}

#rwAgentInvoiceBatchListHint:empty{
  display: none;
}

.ra-invoice-head__actions{
  display: flex;
  align-items: center;
  gap: 8px;
}

.ra-invoice-head .ra-invoice-reset{
  flex: 0 0 auto;
  height: 32px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--rw-navy-shine);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.ra-invoice-head .ra-owner__title{
  margin: 0;
}

.ra-invoice-filter{
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #102d4e;
  color: #fff;
  cursor: pointer;
}

.ra-invoice-filter svg{
  display: block;
}

.ra-invoice-filters,
#rwAgentInvoiceFilters{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 26px;
}

.ra-invoice-filters .ra-owner__field,
#rwAgentInvoiceFilters .ra-owner__field{
  margin-bottom: 0;
}

.ra-invoice-filters .ra-owner__field select,
#rwAgentInvoiceFilters .ra-owner__field select,
#rwAgentInvoiceReset{
  height: 40px;
  box-sizing: border-box;
  padding: 0 12px;
}

#rwAgentInvoiceDrafts{
  width: 168px;
  min-width: 168px;
  flex: 0 0 168px;
  justify-content: center;
  box-sizing: border-box;
  font-size: 0.78rem;
}

.ra-invoice-title--draft{
  font-size: 1.01rem;
}

.ra-invoice-filter-property{
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.ra-invoice-filter-property .ra-owner__field{
  margin-bottom: 0;
}

.ra-invoice-reset{
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 14px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ra-invoice-page__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ra-invoice-page__head .ra-owner__title{
  margin: 0;
}

.ra-invoice-paystate{
  margin: 0;
  font-weight: 700;
}

.ra-invoice-paystate--full{
  color: #16a34a;
}

.ra-invoice-paystate--due{
  color: #b91c1c;
}

.ra-invoice-addpay{
  border: 0;
  background: none;
  padding: 0;
  color: #1c4471;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.ra-invoice-payform{
  display: grid;
  gap: 8px;
  max-width: 280px;
  margin-top: 8px;
}

.ra-invoice-payform[hidden]{
  display: none !important;
}

.ra-invoice-payform input{
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

#rwAgentInvoiceListView[hidden]{
  display: none !important;
}

.ra-invoice-filters[hidden],
.ra-invoice-reset[hidden]{
  display: none !important;
}

.ra-owner__title{
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.ra-dash__version{
  margin: -8px 0 14px;
  color: #64748b;
  font-size: 0.8rem;
}

.ra-billing-return{
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #e7c27a;
  border-radius: 12px;
  background: #fff8eb;
}

.ra-dash__bank{
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid #e7c27a;
  border-radius: 12px;
  background: #fff8eb;
  font-size: 1.45rem;
  line-height: 1.4;
}

.ra-dash__plan--bad{
  border-color: #f0b4b4;
  background: #fdecec;
}

.ra-dash__bank button,
.ra-account__choose button,
#rwAccountUpdatePayment{
  margin-top: 8px;
  margin-right: 8px;
  border: 0;
  border-radius: 10px;
  background: #263e5a;
  color: #fff;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.ra-dash__bank button{
  display: inline-block;
  margin-top: 12px;
  padding: 12px 18px;
  font-size: 1.25rem;
  font-weight: 650;
}

.ra-account{
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.ra-account div{
  display: grid;
  gap: 2px;
}

.ra-account dt{
  color: #64748b;
  font-size: 0.8rem;
}

.ra-account dd{
  margin: 0;
  font-weight: 650;
}

.ra-account__choose{
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.ra-account__notice{
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #e7c27a;
  border-radius: 10px;
  background: #fff8eb;
}

.ra-account__notice--bad{
  border-color: #f0b4b4;
  background: #fdecec;
}

.ra-account__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ra-account__actions button,
.ra-account__plan button{
  border: 0;
  border-radius: 10px;
  background: #263e5a;
  color: #fff;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.ra-account__actions .ra-account__quiet{
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #263e5a;
}

.ra-account__plan button:disabled{
  background: #e2e8f0;
  color: #64748b;
  cursor: default;
}

.ra-account__interval{
  display: flex;
  gap: 16px;
}

.ra-account__plans{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.ra-account__plan{
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}

.ra-account__plan h3,
.ra-account__plan p{
  margin: 0;
}

.ra-account__plan-price{
  font-weight: 700;
}

.ra-owner__lead,
.ra-owner__muted{
  margin: 0 0 12px;
  color: #64748b;
}

.ra-owner__field{
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  max-width: 280px;
  font-weight: 600;
}

.ra-invoice-filters .ra-owner__field[hidden]{
  display: none !important;
}

.ra-owner__field input,
.ra-owner__field select{
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

.ra-owner__custom{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Range, Property, Search + Send money sit on the title row, pushed to its right end. */
#rwOwnerLedgerFilters,
#rwOwnerReportFilters{
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

/* No field bottom margin here, or Range / Property ride higher than Search + Send money. */
#rwOwnerLedgerFilters > .ra-owner__field,
#rwOwnerReportFilters > .ra-owner__field{
  margin-bottom: 0;
}

#rwOwnerLedgerActions input.ra-owner-tx-search{
  flex: 0 1 168px;
  width: 168px;
  min-width: 0;
}

/* Custom range: From / To get their own row under the title, right-aligned. */
#rwOwnerLedgerCustom,
#rwOwnerReportCustom{
  justify-content: flex-end;
  margin-bottom: 12px;
}

/* Desktop: Date range, then its From/To, then Property — each sized to its content. */
@media (min-width: 1024px){
  #rwOwnerLedgerFilters > .ra-owner__field,
  #rwOwnerReportFilters > .ra-owner__field{
    flex: 0 0 140px;
    min-width: 0;
  }

  #rwOwnerLedgerFilters > .ra-owner__field:has(#rwOwnerLedgerProperty),
  #rwOwnerReportFilters > .ra-owner__field:has(#rwOwnerReportProperty){
    flex-basis: 196px;
  }

  #rwOwnerLedgerCustom > .ra-owner__field,
  #rwOwnerReportCustom > .ra-owner__field{
    flex: 0 0 170px;
    min-width: 0;
  }
}

#rwOwnerLedgerFilters .ra-owner__field select,
#rwOwnerLedgerFilters .ra-owner__field input,
#rwOwnerReportFilters .ra-owner__field select,
#rwOwnerReportFilters .ra-owner__field input,
#rwOwnerLedgerCustom .ra-owner__field input,
#rwOwnerReportCustom .ra-owner__field input{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1023px){
  #rwOwnerLedgerFilters > .ra-owner__field,
  #rwOwnerReportFilters > .ra-owner__field,
  #rwOwnerLedgerCustom > .ra-owner__field,
  #rwOwnerReportCustom > .ra-owner__field{
    flex: 1 1 calc(50% - 12px);
    width: calc(50% - 12px);
    max-width: calc(50% - 12px);
  }

  /* Narrow: title on its own line, Range | Property (| Search, Send money) below it. */
  [data-rw-owner-page="ledger"] > .ra-invoice-toolbar > .ra-invoice-head,
  [data-rw-owner-page="reports"] > .ra-invoice-toolbar > .ra-invoice-head{
    flex-wrap: wrap;
  }

  #rwOwnerLedgerFilters,
  #rwOwnerReportFilters{
    flex: 1 1 100%;
    flex-wrap: wrap;
  }
}

.ra-owner__card{
  margin-top: 12px;
  padding: 16px;
  border: 1px solid #6d8299;
  border-radius: 16px;
  background: #fff;
}

.ra-owner__card h3{
  margin: 0 0 8px;
}

.ra-owner__card p{
  margin: 0 0 8px;
}

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

.ra-dash__bubble{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  height: 112px;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #102d4e;
  border-radius: 20px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ra-dash__bubble--soon{
  cursor: default;
  pointer-events: none;
}

.ra-dash__label{
  font-weight: 600;
}

.ra-dash__count{
  font-size: 1.75rem;
  line-height: 1;
}

.ra-dash__activity{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: 10px;
}

.ra-dash__activity span{
  color: #64748b;
  font-size: 0.85rem;
}

.ra-dash__link{
  border: 0;
  padding: 0;
  background: transparent;
  color: #0369a1;
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}

.ra-owner__subnav{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ra-owner__list{
  display: grid;
  gap: 8px;
}

.ra-owner__property{
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ra-invoice-numbers{
  display: block;
  white-space: pre-line;
}

.ra-owner__property--line{
  cursor: default;
}

.ra-owner__ledger{
  width: calc(100% + 32px);
  margin-left: -16px;
  margin-right: -16px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.ra-owner__ledger td[data-rw-ledger-date],
.ra-owner__ledger td[data-rw-tx-date]{
  white-space: nowrap;
}

.ra-owner__ledger th,
.ra-owner__ledger td{
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

[data-rw-owner-page="ledger"] > .ra-owner__ledger th,
[data-rw-owner-page="ledger"] > .ra-owner__ledger td{
  box-sizing: border-box;
  height: 32px;
  padding: 4px 8px;
  vertical-align: middle;
  white-space: nowrap;
}

[data-rw-owner-page="ledger"] > .ra-owner__ledger thead th{
  background: #456888;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.ra-owner__ledger th{
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ra-owner__ledger th:first-child,
.ra-owner__ledger td:first-child,
.ra-owner__ledger td[data-rw-ledger-date],
.ra-owner__ledger td[data-rw-tx-date]{
  width: 6.4rem;
  padding-left: 8px;
  padding-right: 6px;
}

[data-rw-owner-page="ledger"] > .ra-owner__ledger th:first-child,
[data-rw-owner-page="ledger"] > .ra-owner__ledger td:first-child,
[data-rw-owner-page="ledger"] > .ra-owner__ledger td[data-rw-ledger-date]{
  padding: 4px 8px;
}

.ra-owner__ledger .ra-ledger__money{
  width: 5.2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ra-owner__ledger th[data-rw-ledger-property-col],
.ra-owner__ledger td[data-rw-ledger-property]{
  width: 18%;
}

.ra-owner__ledger th[data-rw-ledger-category-col],
.ra-owner__ledger td[data-rw-ledger-category]{
  width: 16%;
  white-space: nowrap;
}

.ra-tax-report{
  width: 100%;
  margin-top: 12px;
}

.ra-tax-report__grid thead th:not(:first-child),
.ra-tax-report__grid td.ra-tax-report__money{
  text-align: center;
}

.ra-tax-report__grid tbody tr{
  cursor: default;
}

.ra-tax-report__grid tbody th{
  font-size: 12.5px;
  font-weight: 400;
  color: #0f172a;
  text-align: left;
}

.ra-tax-report__address{
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ra-tax-report__toggle{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.ra-tax-report__toggle::before{
  content: "▾ ";
}

.ra-tax-report__toggle[aria-expanded="false"]::before{
  content: "▸ ";
}

/* A non-zero amount opens the lines that make it up. */
.ra-tax-report__drill{
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ra-tax-report__drill:hover{
  text-decoration-style: solid;
}

#rwOwnerReportGrid[hidden],
#rwOwnerReportDrill[hidden],
#rwOwnerReportDrillBar[hidden]{
  display: none !important;
}

/* Property · range in the middle between the title and Back. */
#rwOwnerReportDrillBar{
  flex: 1 1 auto;
  min-width: 0;
  align-self: stretch;
  align-items: center;
}

#rwOwnerReportDrillWhere{
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rwOwnerReportDrill tr.ra-tax-report__lines-total td{
  font-weight: 700;
}

#rwOwnerReportBody[data-rw-tax-closed~="income"] [data-rw-tax-section="income"][data-rw-tax-part="line"],
#rwOwnerReportBody[data-rw-tax-closed~="expenses"] [data-rw-tax-section="expenses"][data-rw-tax-part="line"]{
  display: none;
}

.ra-tax-report__grid td.ra-tax-report__money{
  font-variant-numeric: tabular-nums;
}

.ra-tax-report__grid tr.ra-tax-report__section th{
  background: #e2e8f0;
  font-weight: 700;
  color: #0f172a;
}

.ra-tax-report__grid tr.ra-tax-report__group th{
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
}

.ra-tax-report__grid tr.ra-tax-report__sum--in th,
.ra-tax-report__grid tr.ra-tax-report__sum--in td{
  color: #15803d;
  font-weight: 700;
}

.ra-tax-report__grid tr.ra-tax-report__sum--out th,
.ra-tax-report__grid tr.ra-tax-report__sum--out td{
  color: #b91c1c;
  font-weight: 700;
}

.ra-owner__ledger th[data-rw-ledger-details-col],
.ra-owner__ledger td[data-rw-ledger-details],
.ra-owner__ledger .ra-ledger__clip{
  width: auto;
}

.ra-owner__ledger tfoot td{
  font-weight: 700;
  border-bottom: 0;
}

.ra-owner__ledger th[hidden]{
  display: none;
}

.ra-owner__ledger tr[data-rw-tenant-bill],
.ra-owner__ledger tr[data-rw-vendor-payment],
#rwVendorLedgerHost tr[data-rw-vendor-payment]{
  cursor: pointer;
}

.ra-owner__ledger .ra-ledger__clip{
  overflow: hidden;
  max-width: 0;
}

.ra-owner__ledger .ra-ledger__clip span{
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ra-ledger__in{
  color: #15803d;
}

.ra-ledger__out{
  color: #b91c1c;
}

@media (max-width: 720px){
  .ra-mobile-back:not([hidden]){
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 52px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border: 0;
    background: #102d4e;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
  }

  .ra-owner__back{
    display: none !important;
  }

  .ra-estimate-footer,
  .ra-vendor__footer{
    z-index: 60;
  }

  body:has(#rwPeopleForm:not([hidden])) #rwMobileBack,
  body:has(#rwVendorForm:not([hidden])) #rwMobileBack,
  body:has(#rwInvoiceForm:not([hidden])) #rwMobileBack{
    display: none !important;
  }

  body:has(#rwMobileBack:not([hidden])) .ra-owner__pages,
  body:has(#rwMobileBack:not([hidden])) .ra-vendor__scroll,
  body:has(#rwMobileBack:not([hidden])) .ra-portal__admin-scroll{
    padding-bottom: calc(72px + var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
  }

  body.ra-portal--owner .ra-portal__main,
  body.ra-portal--tenant .ra-portal__main,
  body.ra-portal--agent .ra-portal__main,
  body.ra-portal--vendor .ra-portal__main{
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.ra-portal--owner .ra-owner__nav,
  body.ra-portal--tenant .ra-owner__nav,
  body.ra-portal--agent .ra-owner__nav,
  body.ra-portal--vendor .ra-owner__nav{
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  body.ra-portal--owner .ra-owner__pages,
  body.ra-portal--owner #rwChatPanel,
  body.ra-portal--owner #rwActivityPanel,
  body.ra-portal--tenant .ra-owner__pages,
  body.ra-portal--tenant #rwChatPanel,
  body.ra-portal--tenant #rwActivityPanel,
  body.ra-portal--agent .ra-owner__pages,
  body.ra-portal--agent #rwChatPanel,
  body.ra-portal--agent #rwActivityPanel,
  body.ra-portal--agent.ra-portal--agent-directory #rwAdminPanel,
  body.ra-portal--agent.ra-portal--agent-directory #rwVendorPage,
  body.ra-portal--vendor .ra-owner__pages,
  body.ra-portal--vendor #rwChatPanel,
  body.ra-portal--vendor #rwActivityPanel,
  body.ra-portal--owner #rwBankAccounts:not([hidden]),
  body.ra-portal--tenant #rwBankAccounts:not([hidden]),
  body.ra-portal--agent #rwBankAccounts:not([hidden]),
  body.ra-portal--vendor #rwBankAccounts:not([hidden]),
  body.ra-portal--owner #rwAccountPage:not([hidden]),
  body.ra-portal--tenant #rwAccountPage:not([hidden]),
  body.ra-portal--agent #rwAccountPage:not([hidden]),
  body.ra-portal--vendor #rwAccountPage:not([hidden]){
    grid-column: 1;
    grid-row: 2;
  }

  .ra-owner__nav-btn{
    padding: 8px 6px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
}

@media (max-width: 1023px) and (orientation: landscape){
  body.ra-portal--owner .ra-owner__nav,
  body.ra-portal--tenant .ra-owner__nav,
  body.ra-portal--agent .ra-owner__nav,
  body.ra-portal--vendor .ra-owner__nav{
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
  }

  body.ra-portal--owner .ra-owner__nav-row,
  body.ra-portal--tenant .ra-owner__nav-row,
  body.ra-portal--agent .ra-owner__nav-row,
  body.ra-portal--vendor .ra-owner__nav-row{
    display: contents;
  }

  .ra-owner__nav-row > .ra-owner__nav-btn,
  .ra-owner__nav-row > .ra-owner__nav-group{
    flex: 1 1 auto;
    min-width: max-content;
  }

  .ra-owner__nav .ra-owner__nav-btn{
    white-space: nowrap;
    padding-left: 14px;
    padding-right: 14px;
  }
}

#rwNewConvModal .ra-portal__card-lead{
  margin: 0;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
}

@media (min-width: 1024px){
  body.ra-portal--owner,
  body.ra-portal--tenant,
  body.ra-portal--agent,
  body.ra-portal--vendor{
    --rw-side-nav: 144px;
  }

  *{
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.22) transparent;
  }

  *::-webkit-scrollbar{
    width: 3px;
    height: 3px;
  }

  *::-webkit-scrollbar-track{
    background: transparent;
  }

  *::-webkit-scrollbar-thumb{
    background: rgba(15, 23, 42, 0.22);
    border-radius: 3px;
  }

  #rwNewConvModal .ra-portal__modal,
  #rwDirectChatModal .ra-portal__modal{
    width: 50vw;
    max-width: 50vw;
    max-height: none;
    background: #e2e8f0;
    border: 2px solid #334155;
    padding-bottom: 1.25em;
    padding-bottom: 1lh;
  }

  #rwDirectChatModal .ra-portal__field input{
    background: #fff;
    border: 1px solid #6d8299;
    border-radius: 10px;
  }

  body.ra-portal--owner .ra-portal__main,
  body.ra-portal--tenant .ra-portal__main,
  body.ra-portal--agent .ra-portal__main,
  body.ra-portal--vendor .ra-portal__main{
    grid-template-columns: var(--rw-side-nav) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  body.ra-portal--owner .ra-owner__nav,
  body.ra-portal--tenant .ra-owner__nav,
  body.ra-portal--agent .ra-owner__nav,
  body.ra-portal--vendor .ra-owner__nav{
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    height: 100%;
    min-height: 0;
    overflow: auto;
    flex-direction: column;
    gap: 4px;
    padding: 12px 10px;
    border-bottom: 0;
    border-right: 1px solid #081628;
    background-color: #0e243d;
    background-image: var(--rw-navy-shine);
    background-repeat: no-repeat;
    background-size: 100% var(--rw-header-h);
    background-position: top;
    color: #fff;
  }

  body.ra-portal--owner .ra-owner__nav-row,
  body.ra-portal--tenant .ra-owner__nav-row,
  body.ra-portal--agent .ra-owner__nav-row,
  body.ra-portal--vendor .ra-owner__nav-row{
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
  }

  .ra-owner__nav .ra-owner__nav-row > .ra-owner__nav-btn,
  .ra-owner__nav .ra-owner__nav-row > .ra-owner__nav-group,
  .ra-owner__nav .ra-owner__nav-group{
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
  }

  .ra-owner__nav .ra-owner__nav-btn{
    width: 100%;
    padding: 8px 8px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
    text-align: left;
    white-space: normal;
  }

  .ra-owner__nav .ra-owner__nav-btn:hover{
    background: rgba(255, 255, 255, 0.1);
  }

  .ra-owner__nav .ra-owner__nav-btn.is-active{
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
  }

  .ra-owner__nav .ra-owner__nav-sub,
  .ra-owner__nav .ra-owner__nav-sub.is-modal{
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100%;
    margin: 0;
    padding: 0 0 4px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .ra-owner__nav .ra-owner__nav-btn--sub{
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.7rem;
  }

  :is(#rwAgentNav, #rwTenantNav, #rwOwnerNav, #rwVendorNav) .ra-nav-desk{
    display: block;
  }

  :is(#rwAgentNav, #rwTenantNav, #rwOwnerNav, #rwVendorNav) .ra-nav-gap{
    height: 1lh;
    margin: 0;
    padding: 0;
  }

  :is(#rwAgentNav, #rwTenantNav, #rwOwnerNav, #rwVendorNav) .ra-nav-label{
    margin: 0;
    padding: 8px 8px 2px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    pointer-events: none;
  }

  :is(#rwAgentNav, #rwTenantNav, #rwOwnerNav, #rwVendorNav) .ra-nav-phone{
    display: none !important;
  }

  #rwAgentNav #rwAgentFinancialSub,
  #rwAgentNav #rwAgentFinancialSub[hidden],
  #rwTenantNav #rwTenantFinancialSub,
  #rwTenantNav #rwTenantFinancialSub[hidden],
  #rwOwnerNav #rwOwnerFinancialSub,
  #rwOwnerNav #rwOwnerFinancialSub[hidden],
  #rwVendorNav #rwVendorFinancialSub,
  #rwVendorNav #rwVendorFinancialSub[hidden]{
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    position: static !important;
    width: 100%;
    margin: 0;
    padding: 0 !important;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  :is(#rwAgentNav, #rwTenantNav, #rwOwnerNav, #rwVendorNav) .ra-owner__nav-btn--sub{
    padding-left: 8px;
    font-size: 0.78rem;
  }

  body.ra-portal--owner .ra-owner__pages,
  body.ra-portal--owner #rwChatPanel,
  body.ra-portal--owner #rwActivityPanel,
  body.ra-portal--tenant .ra-owner__pages,
  body.ra-portal--tenant #rwChatPanel,
  body.ra-portal--tenant #rwActivityPanel,
  body.ra-portal--agent .ra-owner__pages,
  body.ra-portal--agent #rwChatPanel,
  body.ra-portal--agent #rwActivityPanel,
  body.ra-portal--agent.ra-portal--agent-directory #rwAdminPanel,
  body.ra-portal--agent.ra-portal--agent-directory #rwVendorPage,
  body.ra-portal--vendor .ra-owner__pages,
  body.ra-portal--vendor #rwChatPanel,
  body.ra-portal--vendor #rwActivityPanel,
  body.ra-portal--owner #rwBankAccounts:not([hidden]),
  body.ra-portal--tenant #rwBankAccounts:not([hidden]),
  body.ra-portal--agent #rwBankAccounts:not([hidden]),
  body.ra-portal--vendor #rwBankAccounts:not([hidden]),
  body.ra-portal--owner #rwAccountPage:not([hidden]),
  body.ra-portal--tenant #rwAccountPage:not([hidden]),
  body.ra-portal--agent #rwAccountPage:not([hidden]),
  body.ra-portal--vendor #rwAccountPage:not([hidden]){
    grid-column: 2;
    grid-row: 1;
  }

  #rwBankAccounts:not([hidden]){
    display: block;
    padding: 24px calc(52px + env(safe-area-inset-right, 0px)) calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px)) calc(52px + env(safe-area-inset-left, 0px));
    max-width: none;
    min-width: 0;
    height: 100%;
    min-height: 0;
    overflow: auto;
    background: #e2e8f0;
    color: #0f172a;
  }

  #rwBankAccounts[hidden]{
    display: none !important;
  }

  #rwBankAccounts > #rwBankList{
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: none;
    width: 100%;
    min-height: 0;
  }

  #rwBankAccounts .ra-bank-cards{
    width: 100%;
    max-width: none;
  }

  #rwBankAccounts .ra-estimate-footer{
    position: sticky;
    bottom: 0;
    left: auto;
    right: auto;
    width: 100%;
    margin-top: auto;
    z-index: 2;
    display: flex !important;
  }

  .ra-owner__title,
  .ra-people__bar h2,
  .ra-people__bar h2.ra-owner__title{
    font-size: 2rem;
  }

  .ra-dash,
  .ra-dash-recent{
    width: 50%;
    margin-inline: auto;
  }

  .ra-people{
    max-width: 432px;
  }

  .ra-owner__list,
  .ra-people__rows,
  .ra-vendor__rows,
  body.ra-portal--owner #rwChatPanel .ra-portal__idle-home,
  body.ra-portal--tenant #rwChatPanel .ra-portal__idle-home,
  body.ra-portal--agent #rwChatPanel .ra-portal__idle-home,
  body.ra-portal--vendor #rwChatPanel .ra-portal__idle-home{
    width: min(432px, 100%);
    max-width: 432px;
    margin-inline: 0;
  }

  .ra-owner__list,
  .ra-people__rows,
  .ra-vendor__rows{
    gap: 0;
    border: 0;
    background: transparent;
    align-content: start;
  }

  .ra-people__rows{
    justify-content: flex-start;
  }

  .ra-owner__list,
  .ra-vendor__rows{
    justify-content: stretch;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
  }

  body.ra-portal--owner #rwChatPanel .ra-portal__idle-list,
  body.ra-portal--tenant #rwChatPanel .ra-portal__idle-list,
  body.ra-portal--agent #rwChatPanel .ra-portal__idle-list,
  body.ra-portal--vendor #rwChatPanel .ra-portal__idle-list{
    gap: 0;
    border: 0;
    background: transparent;
    align-content: start;
    justify-content: flex-start;
  }

  body.ra-portal--owner #rwChatPanel .ra-portal__idle-row,
  body.ra-portal--tenant #rwChatPanel .ra-portal__idle-row,
  body.ra-portal--agent #rwChatPanel .ra-portal__idle-row,
  body.ra-portal--vendor #rwChatPanel .ra-portal__idle-row{
    gap: 0;
    width: 100%;
    max-width: none;
  }

  body.ra-portal--owner #rwChatPanel .ra-portal__idle-actions,
  body.ra-portal--tenant #rwChatPanel .ra-portal__idle-actions,
  body.ra-portal--agent #rwChatPanel .ra-portal__idle-actions,
  body.ra-portal--vendor #rwChatPanel .ra-portal__idle-actions{
    display: none;
  }

  .ra-people__row,
  .ra-owner__property,
  .ra-vendor__row,
  body.ra-portal--owner #rwChatPanel .ra-portal__idle-item,
  body.ra-portal--tenant #rwChatPanel .ra-portal__idle-item,
  body.ra-portal--agent #rwChatPanel .ra-portal__idle-item,
  body.ra-portal--vendor #rwChatPanel .ra-portal__idle-item{
    border-radius: 0;
    box-shadow: none;
  }

  .ra-people__row,
  .ra-owner__property,
  .ra-vendor__row,
  body.ra-portal--owner #rwChatPanel .ra-portal__idle-item,
  body.ra-portal--tenant #rwChatPanel .ra-portal__idle-item,
  body.ra-portal--agent #rwChatPanel .ra-portal__idle-item,
  body.ra-portal--vendor #rwChatPanel .ra-portal__idle-item{
    border-right: 0;
    border-left: 0;
    border-top: 0;
    border-bottom: 1px solid #94a3b8;
  }

  .ra-people__line,
  .ra-owner__property,
  .ra-vendor__row,
  body.ra-portal--owner #rwChatPanel .ra-portal__idle-row,
  body.ra-portal--tenant #rwChatPanel .ra-portal__idle-row,
  body.ra-portal--agent #rwChatPanel .ra-portal__idle-row,
  body.ra-portal--vendor #rwChatPanel .ra-portal__idle-row{
    flex: 0 0 auto;
    width: 100%;
    height: auto;
  }

  .ra-people__row.is-selected,
  .ra-owner__property.is-selected,
  .ra-vendor__row.is-selected{
    background: #dbeafe;
    box-shadow: inset 4px 0 0 #1c4471;
  }

  [data-rw-owner-page="properties"],
  [data-rw-owner-page="estimates"],
  [data-rw-tenant-page="leases"],
  [data-rw-tenant-page="conversations"],
  [data-rw-agent-page="properties"],
  [data-rw-agent-page="owners"],
  [data-rw-agent-page="agents"],
  [data-rw-agent-page="tenants"],
  [data-rw-agent-page="estimates"],
  [data-rw-agent-page="invoices"],
  [data-rw-agent-page="owner-invoices"],
  [data-rw-agent-page="vendors"],
  [data-rw-vendor-page="estimates"],
  [data-rw-vendor-page="invoices"]{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    column-gap: 32px;
    padding-left: 32px;
    padding-right: 32px;
    min-width: 0;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  [data-rw-owner-page="dashboard"],
  [data-rw-tenant-page="dashboard"],
  [data-rw-agent-page="dashboard"]{
    padding-left: 32px;
    padding-right: 32px;
  }

  #rwAccountPage:not([hidden]){
    padding-left: calc(52px + env(safe-area-inset-left, 0px));
    padding-right: calc(52px + env(safe-area-inset-right, 0px));
  }

  [data-rw-tenant-page="leases"] > #rwTenantLeaseListView,
  [data-rw-tenant-page="conversations"] > #rwTenantConvList{
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  [data-rw-tenant-page="leases"] .ra-people__rows,
  [data-rw-tenant-page="conversations"] .ra-people__rows{
    width: 100%;
    max-width: none;
  }

  [data-rw-owner-page="properties"] .ra-owner__list,
  [data-rw-owner-page="estimates"] .ra-owner__list,
  [data-rw-agent-page="properties"] .ra-owner__list,
  [data-rw-agent-page="owners"] .ra-owner__list,
  [data-rw-agent-page="agents"] .ra-owner__list,
  [data-rw-agent-page="tenants"] .ra-owner__list,
  [data-rw-agent-page="estimates"] .ra-owner__list,
  [data-rw-agent-page="invoices"] .ra-owner__list,
  [data-rw-agent-page="owner-invoices"] .ra-owner__list,
  [data-rw-agent-page="vendors"] .ra-owner__list,
  [data-rw-vendor-page="estimates"] .ra-owner__list,
  [data-rw-vendor-page="invoices"] .ra-owner__list{
    width: 100%;
    max-width: none;
  }

  [data-rw-agent-page="vendors"] > h2,
  [data-rw-agent-page="vendors"] > #rwAgentVendorList{
    grid-column: 1;
  }

  [data-rw-agent-page="vendors"] > #rwAgentVendorPick{
    grid-column: 2;
    grid-row: 1 / span 8;
  }

  .ra-owner__page:has(#rwOwnerEstimateDetail:not([hidden])),
  .ra-owner__page:has(#rwAgentPropertyDetail:not([hidden])),
  .ra-owner__page:has(#rwAgentOwnerDetail:not([hidden])),
  .ra-owner__page:has(#rwAgentTenantDetail:not([hidden])),
  .ra-owner__page:has(#rwAgentEstimateForm:not([hidden])),
  .ra-owner__page:has(#rwAgentEstimateDetail:not([hidden])),
  .ra-owner__page:has(#rwAgentEstimateLinePage:not([hidden])),
  .ra-owner__page:has(#rwAgentInvoiceDetail:not([hidden])),
  .ra-owner__page:has(#rwAgentInvoiceEstimatePick:not([hidden])),
  .ra-owner__page:has(#rwAgentInvoicePayPage:not([hidden])),
  .ra-owner__page:has(#rwAgentOwnerInvoiceForm:not([hidden])),
  .ra-owner__page:has(#rwAgentOwnerInvoiceDetail:not([hidden])),
  .ra-owner__page:has(#rwAgentOwnerInvoiceLinePage:not([hidden])),
  .ra-owner__page:has(#rwAgentOwnerInvoiceEstimatePick:not([hidden])),
  .ra-owner__page:has(#rwVendorEstimateForm:not([hidden])),
  .ra-owner__page:has(#rwVendorEstimateDetail:not([hidden])),
  .ra-owner__page:has(#rwVendorEstimateLinePage:not([hidden])),
  .ra-owner__page:has(#rwVendorInvoiceForm:not([hidden])),
  .ra-owner__page:has(#rwVendorInvoiceDetail:not([hidden])),
  .ra-owner__page:has(#rwVendorInvoiceLinePage:not([hidden])),
  .ra-owner__page:has(#rwVendorInvoiceEstimatePick:not([hidden])){
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    column-gap: 32px;
    padding-left: 32px;
    padding-right: 32px;
    min-width: 0;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .ra-owner__page:has(#rwOwnerEstimateDetail:not([hidden])) #rwOwnerEstimateListPane,
  .ra-owner__page:has(#rwAgentPropertyDetail:not([hidden])) #rwAgentPropertyListView,
  .ra-owner__page:has(#rwAgentOwnerDetail:not([hidden])) #rwAgentOwnerListView,
  .ra-owner__page:has(#rwAgentTenantDetail:not([hidden])) #rwAgentTenantListView,
  .ra-owner__page:has(#rwAgentEstimateForm:not([hidden])) #rwAgentEstimateListPane,
  .ra-owner__page:has(#rwAgentEstimateDetail:not([hidden])) #rwAgentEstimateListPane,
  .ra-owner__page:has(#rwAgentEstimateLinePage:not([hidden])) #rwAgentEstimateListPane,
  .ra-owner__page:has(#rwAgentInvoiceDetail:not([hidden])) #rwAgentInvoiceListView,
  .ra-owner__page:has(#rwAgentInvoiceEstimatePick:not([hidden])) #rwAgentInvoiceListView,
  .ra-owner__page:has(#rwAgentInvoicePayPage:not([hidden])) #rwAgentInvoiceListView,
  .ra-owner__page:has(#rwAgentOwnerInvoiceForm:not([hidden])) #rwAgentOwnerInvoiceListPane,
  .ra-owner__page:has(#rwAgentOwnerInvoiceDetail:not([hidden])) #rwAgentOwnerInvoiceListPane,
  .ra-owner__page:has(#rwAgentOwnerInvoiceLinePage:not([hidden])) #rwAgentOwnerInvoiceListPane,
  .ra-owner__page:has(#rwAgentOwnerInvoiceEstimatePick:not([hidden])) #rwAgentOwnerInvoiceListPane,
  .ra-owner__page:has(#rwVendorEstimateForm:not([hidden])) #rwVendorEstimateListPane,
  .ra-owner__page:has(#rwVendorEstimateDetail:not([hidden])) #rwVendorEstimateListPane,
  .ra-owner__page:has(#rwVendorEstimateLinePage:not([hidden])) #rwVendorEstimateListPane,
  .ra-owner__page:has(#rwVendorInvoiceForm:not([hidden])) #rwVendorInvoiceListPane,
  .ra-owner__page:has(#rwVendorInvoiceDetail:not([hidden])) #rwVendorInvoiceListPane,
  .ra-owner__page:has(#rwVendorInvoiceLinePage:not([hidden])) #rwVendorInvoiceListPane,
  .ra-owner__page:has(#rwVendorInvoiceEstimatePick:not([hidden])) #rwVendorInvoiceListPane{
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: auto;
    max-height: 100%;
    overflow: hidden;
    grid-column: 1;
    grid-row: 1;
  }

  .ra-owner__page:has(#rwOwnerEstimateDetail:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentPropertyDetail:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentOwnerDetail:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentTenantDetail:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentEstimateForm:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentEstimateDetail:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentEstimateLinePage:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentInvoiceDetail:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentInvoiceEstimatePick:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentInvoicePayPage:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentOwnerInvoiceForm:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentOwnerInvoiceDetail:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentOwnerInvoiceLinePage:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwAgentOwnerInvoiceEstimatePick:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwVendorEstimateForm:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwVendorEstimateDetail:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwVendorEstimateLinePage:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwVendorInvoiceForm:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwVendorInvoiceDetail:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwVendorInvoiceLinePage:not([hidden])) > :not([hidden]),
  .ra-owner__page:has(#rwVendorInvoiceEstimatePick:not([hidden])) > :not([hidden]){
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    max-width: none;
    width: auto;
    min-width: 0;
    max-height: 100%;
    overflow: auto;
    grid-row: 1;
  }

  [data-rw-owner-page="estimates"] > #rwOwnerEstimateDetail,
  [data-rw-agent-page="properties"] > #rwAgentPropertyDetail,
  [data-rw-agent-page="owners"] > #rwAgentOwnerDetail,
  [data-rw-agent-page="tenants"] > #rwAgentTenantDetail,
  [data-rw-agent-page="estimates"] > #rwAgentEstimateForm,
  [data-rw-agent-page="estimates"] > #rwAgentEstimateDetail,
  [data-rw-agent-page="estimates"] > #rwAgentEstimateLinePage,
  [data-rw-agent-page="invoices"] > :not(#rwAgentInvoiceListView),
  [data-rw-agent-page="owner-invoices"] > :not(#rwAgentOwnerInvoiceListPane),
  [data-rw-vendor-page="estimates"] > :not(#rwVendorEstimateListPane),
  [data-rw-vendor-page="invoices"] > :not(#rwVendorInvoiceListPane){
    grid-column: 2;
    grid-row: 1;
  }

  #rwPeople > #rwPeopleList{
    grid-column: 1;
    grid-row: 1;
  }

  #rwPeople > #rwOwnerDetail,
  #rwPeople > #rwTenantLeases,
  #rwPeople > #rwPeopleForm,
  #rwPeople > #rwPropertyForm{
    grid-column: 2;
    grid-row: 1;
  }

  [data-rw-agent-page="vendors"]:has(#rwAgentVendorPick:not([hidden])){
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    padding-left: 32px;
    padding-right: 32px;
    align-items: start;
    justify-content: stretch;
  }

  [data-rw-agent-page="vendors"]:has(#rwAgentVendorPick:not([hidden])) > h2{
    grid-column: 1;
  }

  [data-rw-vendor-page="ledger"]{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 0;
    overflow: hidden;
    padding-left: 32px;
    padding-right: 32px;
  }

  [data-rw-vendor-page="ledger"] > .ra-owner__title,
  [data-rw-vendor-page="ledger"] > .ra-invoice-toolbar,
  [data-rw-vendor-page="ledger"] > #rwVendorLedgerHost,
  [data-rw-vendor-page="ledger"] > .ra-owner__ledger{
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }

  [data-rw-vendor-page="ledger"] > #rwVendorLedgerHost{
    overflow-x: auto;
    overflow-y: auto;
  }

  [data-rw-vendor-page="ledger"] #rwVendorLedgerHost > table.ra-invoice-grid{
    width: 100%;
    min-width: 0;
    margin: 0;
    border-radius: 0;
    table-layout: fixed;
  }

  [data-rw-vendor-page="ledger"] > #rwVendorLedgerDetail:not([hidden]){
    width: min(720px, 100%);
    margin: 12px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  [data-rw-vendor-page="ledger"] > #rwVendorLedgerDetail:not([hidden]) .ra-owner__back{
    display: block;
    width: fit-content;
    margin: 16px auto 0;
    padding: 10px 18px;
    border-radius: 10px;
    background: #102d4e;
    color: #fff;
  }

  [data-rw-owner-page="ledger"] > .ra-owner__ledger{
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }


  [data-rw-owner-page="ledger"] > #rwOwnerLedgerInvoice:not([hidden]){
    width: min(864px, 100%);
    margin: 12px auto 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  [data-rw-owner-page="ledger"] > [data-rw-owner-bill-back]:not([hidden]){
    display: block;
    width: fit-content;
    margin: 16px auto 0;
    padding: 10px 18px;
    border-radius: 10px;
    background: #102d4e;
    color: #fff;
  }

  [data-rw-agent-page="owner-transactions"],
  [data-rw-owner-page="ledger"],
  [data-rw-owner-page="reports"],
  [data-rw-agent-page="invoices"]{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-left: 32px;
    padding-right: 32px;
  }

  [data-rw-owner-page="ledger"]:not([hidden]):not(:has(#rwOwnerLedgerInvoice:not([hidden]))),
  [data-rw-owner-page="reports"]:not([hidden]),
  [data-rw-agent-page="owner-transactions"]:not([hidden]):has(> #rwOwnerTxList:not([hidden])),
  [data-rw-agent-page="invoices"]:not([hidden]):has(> #rwVendorTxList:not([hidden])){
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  [data-rw-owner-page="ledger"] > :not(#rwOwnerLedgerList),
  [data-rw-owner-page="reports"] > :not(#rwOwnerReportScroll),
  [data-rw-agent-page="owner-transactions"] > :not(#rwOwnerTxList),
  [data-rw-agent-page="owner-transactions"] > #rwOwnerTxList > :not(.ra-owner__list),
  [data-rw-agent-page="invoices"] > :not(#rwVendorTxList),
  [data-rw-agent-page="invoices"] > #rwVendorTxList > :not(.ra-owner__list){
    flex: 0 0 auto;
  }

  [data-rw-agent-page="owner-transactions"] > #rwOwnerTxList:not([hidden]),
  [data-rw-agent-page="invoices"] > #rwVendorTxList:not([hidden]){
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  #rwOwnerReportScroll{
    margin-top: 0;
  }

  [data-rw-agent-page="owner-transactions"] > #rwOwnerTxList,
  [data-rw-agent-page="owner-transactions"] #rwOwnerTxList .ra-owner__list,
  [data-rw-agent-page="owner-transactions"] #rwOwnerTxList .ra-invoice-grid,
  [data-rw-agent-page="invoices"] > #rwVendorTxList,
  [data-rw-agent-page="invoices"] #rwVendorTxList .ra-owner__list,
  [data-rw-agent-page="invoices"] #rwVendorTxList .ra-invoice-grid{
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }

  [data-rw-agent-page="owner-transactions"] #rwOwnerTxList .ra-invoice-grid,
  [data-rw-agent-page="invoices"] #rwVendorTxList .ra-invoice-grid{
    table-layout: fixed;
  }


  #rwPeople:not([hidden]),
  #rwPeople:not([hidden]):has(#rwOwnerDetail:not([hidden])),
  #rwPeople:not([hidden]):has(#rwTenantLeases:not([hidden])),
  #rwPeople:not([hidden]):has(#rwPeopleForm:not([hidden])),
  #rwPeople:not([hidden]):has(#rwPropertyForm:not([hidden])){
    display: contents;
  }

  #rwPeople[hidden]{
    display: none !important;
  }

  body.ra-portal--agent .ra-owner__pages:has(.ra-owner__page:not([hidden]).ra-people-on){
    overflow: hidden;
  }

  .ra-owner__page.ra-people-on:not([hidden]){
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #rwPeople > .ra-people__gap{
    display: none;
  }

  #rwPeople > #rwPeopleList,
  #rwPeople > #rwOwnerDetail,
  #rwPeople > #rwTenantLeases,
  #rwPeople > #rwPeopleForm,
  #rwPeople > #rwPropertyForm{
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: none;
    min-height: 0;
    max-height: 100%;
  }

  #rwPeople > #rwPeopleList{
    overflow: hidden;
  }

  #rwPeople > #rwOwnerDetail,
  #rwPeople > #rwTenantLeases,
  #rwPeople > #rwPeopleForm,
  #rwPeople > #rwPropertyForm{
    overflow: auto;
  }

  #rwPeople .ra-people__rows{
    width: 100%;
    max-width: none;
  }

  #rwPeople:not([hidden]):has(#rwOwnerDetail:not([hidden])) > #rwPeopleList,
  #rwPeople:not([hidden]):has(#rwOwnerDetail:not([hidden])) > #rwOwnerDetail,
  #rwPeople:not([hidden]):has(#rwTenantLeases:not([hidden])) > #rwPeopleList,
  #rwPeople:not([hidden]):has(#rwTenantLeases:not([hidden])) > #rwTenantLeases,
  #rwPeople:not([hidden]):has(#rwPeopleForm:not([hidden])) > #rwPeopleList,
  #rwPeople:not([hidden]):has(#rwPeopleForm:not([hidden])) > #rwPeopleForm,
  #rwPeople:not([hidden]):has(#rwPropertyForm:not([hidden])) > #rwPeopleList,
  #rwPeople:not([hidden]):has(#rwPropertyForm:not([hidden])) > #rwPropertyForm{
    max-width: none;
    width: 100%;
  }

  #rwPeople > #rwOwnerDetail,
  #rwPeople > #rwTenantLeases,
  #rwPeople > #rwPeopleForm,
  #rwPeople > #rwPropertyForm{
    margin-left: 0;
  }

  .ra-owner__page:not([hidden]) #rwPeople:not([hidden]):has(#rwOwnerDetail:not([hidden])) #rwPeopleList,
  .ra-owner__page:not([hidden]) #rwPeople:not([hidden]):has(#rwPeopleForm:not([hidden])) #rwPeopleList,
  .ra-owner__page:not([hidden]) #rwPeople:not([hidden]):has(#rwTenantLeases:not([hidden])) #rwPeopleList,
  .ra-owner__page:not([hidden]) #rwPeople:not([hidden]):has(#rwPropertyForm:not([hidden])) #rwPeopleList{
    display: flex !important;
    flex-direction: column;
  }

  .ra-owner__page:not([hidden]) #rwPeople:not([hidden]):has(#rwPropertyForm:not([hidden])) #rwPropertyForm{
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: start;
    align-items: center;
    column-gap: 8px;
  }

  #rwAgentPropertyHeading,
  #rwTenantLeasesName,
  #rwOwnerDetailName,
  #rwPropertyTitle,
  #rwPeopleFormTitle,
  #rwTenantRentalsTitle,
  #rwBankFormTitle{
    font-size: 1.15rem;
    font-weight: 600;
  }

  #rwAgentPropertyDetail > .ra-owner__back,
  #rwAgentOwnerDetail > .ra-owner__back,
  #rwOwnerDetail > .ra-owner__back{
    display: none;
  }

  .ra-owner__pages .ra-estimate-footer{
    position: sticky;
    bottom: 0;
    left: auto;
    right: auto;
    width: 100%;
    margin-top: auto;
    z-index: 2;
  }

  body:has([data-rw-agent-page="invoices"]:not([hidden]) #rwAgentInvoiceListView:not([hidden])) .ra-owner__pages,
  body:has(.ra-estimate-card:not([hidden]) .ra-estimate-footer:not([hidden])) .ra-owner__pages,
  body:has(#rwOwnerEstimateDetail:not([hidden]) .ra-estimate-footer:not([hidden])) .ra-owner__pages,
  body:has(#rwOwnerDetailFooter:not([hidden])) .ra-owner__pages,
  body:has(#rwTenantLeasesFooter:not([hidden])) .ra-owner__pages,
  body:has(#rwPeopleForm:not([hidden])) .ra-owner__pages{
    padding-bottom: calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
  }

  #rwOwnerDetail:not([hidden]),
  #rwTenantLeases:not([hidden]),
  #rwPeopleForm:not([hidden]){
    display: flex;
    flex-direction: column;
  }

  #rwOwnerDetail,
  #rwTenantLeases{
    position: relative;
  }

  #rwOwnerDetail > .ra-people__bar h2{
    margin-right: 0;
  }

  #rwTenantLeases > .ra-people__bar h2{
    margin-right: 48px;
  }

  #rwOwnerDetailFooter,
  #rwTenantLeasesFooter{
    position: absolute;
    top: 0;
    right: 44px;
    bottom: auto;
    left: auto;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    z-index: 3;
  }

  #rwTenantLeasesFooter{
    right: 0;
  }

  #rwTenantLeasesEdit{
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #102d4e;
    color: #fff;
    box-shadow: none;
    font-size: 0;
    line-height: 1;
  }

  #rwTenantLeasesEdit::before{
    content: "···";
    font-size: 1.35rem;
    line-height: 1;
    color: #fff;
  }

  .ra-owner__pages .ra-estimate-footer{
    display: none !important;
  }

  #rwOwnerDetailFooter:not([hidden]),
  #rwTenantLeasesFooter:not([hidden]),
  .ra-owner__pages .ra-estimate-footer:has(#rwPeopleSave, #rwOwnerEstimateApprove, #rwOwnerEstimateReject, #rwAgentEstimateLineSave, #rwAgentInvoicePay, #rwAgentInvoiceBatch, #rwAgentOwnerInvoicePost, #rwAgentOwnerInvoiceLineSave, #rwVendorEstimateStart, #rwVendorEstimateLineSave, #rwVendorInvoiceLineSave){
    display: flex !important;
  }

  [data-rw-delete-toggle],
  #rwAgentEstimateDelete{
    display: none !important;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread .ra-portal__chat-main,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread .ra-portal__chat-main,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread .ra-portal__chat-main,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread .ra-portal__chat-main{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    padding: 12px 0 0;
    position: relative;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread #rwIdlePanel,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread #rwIdlePanel,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwIdlePanel,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread #rwIdlePanel{
    display: none !important;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread #rwConversationBox,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread #rwConversationBox,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwConversationBox,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread #rwConversationBox{
    flex: 1 1 auto;
    width: calc(100% - 280px);
    min-width: 0;
    max-width: none;
    min-height: 0;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread #rwChatFooter,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread #rwChatFooter,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwChatFooter,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread #rwChatFooter{
    width: calc(100% - 280px);
    max-width: none;
    flex: 0 0 auto;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread{
    position: relative;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread #rwConversationBox,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread #rwConversationBox,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwConversationBox,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread #rwConversationBox{
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    box-shadow: none;
    overflow: hidden;
    margin: 0;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread #rwChatFooter,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread #rwChatFooter,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwChatFooter,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread #rwChatFooter{
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 0;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    padding: 8px 12px 12px;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread #rwChatScroll,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread #rwChatScroll,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwChatScroll,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread #rwChatScroll{
    background: #fff;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread:has(#rwAddVendorBtn:not([hidden])) .ra-portal__chat-title-bar,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread:has(#rwAddVendorBtn:not([hidden])) .ra-portal__chat-title-bar,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread:has(#rwAddVendorBtn:not([hidden])) .ra-portal__chat-title-bar,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread:has(#rwAddVendorBtn:not([hidden])) .ra-portal__chat-title-bar{
    padding-left: 108px;
    padding-right: 108px;
  }

  #rwChatPanel.ra-portal__chat--thread #rwChatBackFooter:not([hidden]){
    display: flex !important;
    position: static;
    justify-content: center;
    align-self: center;
    width: calc(100% - 280px);
    min-height: 0;
    margin: 12px auto 12px;
    padding: 0;
    background: transparent;
    z-index: 6;
  }

  #rwChatPanel.ra-portal__chat--thread #rwChatBackBtn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: #102d4e;
    color: #fff;
    box-shadow: none;
    font-weight: 700;
  }

  #rwChatPanel.ra-portal__chat--thread #rwAddVendorBtn[hidden],
  #rwChatPanel.ra-portal__chat--thread #rwChatCloseBtn[hidden]{
    display: none !important;
  }

  #rwChatPanel.ra-portal__chat--thread #rwAddVendorBtn,
  #rwChatPanel.ra-portal__chat--thread #rwChatCloseBtn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.7rem;
    height: 2.7rem;
    min-height: 2.7rem;
    padding: 6px 8px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--rw-accent), var(--rw-accent-dark));
    color: #fff;
    box-shadow: none;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  #rwChatPanel.ra-portal__chat--thread #rwAddVendorBtn{
    position: absolute;
    top: 20px;
    right: calc(140px + 16px);
  }

  #rwChatPanel.ra-portal__chat--thread .ra-portal__chat-title-bar{
    position: relative;
    min-height: 3.5rem;
    box-sizing: border-box;
  }

  #rwChatPanel.ra-portal__chat--thread:has(#rwChatCloseBtn:not([hidden])) .ra-portal__chat-title-bar{
    padding-left: 6.2rem;
  }

  #rwChatPanel.ra-portal__chat--thread #rwChatCloseBtn{
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread .ra-portal__idle-home,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread .ra-portal__idle-home,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread .ra-portal__idle-home,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread .ra-portal__idle-home{
    width: 100%;
    max-width: none;
  }

  body.ra-portal--owner #rwChatPanel:not(.ra-portal__chat--thread),
  body.ra-portal--tenant #rwChatPanel:not(.ra-portal__chat--thread),
  body.ra-portal--agent #rwChatPanel:not(.ra-portal__chat--thread),
  body.ra-portal--vendor #rwChatPanel:not(.ra-portal__chat--thread){
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 32px;
    align-items: stretch;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding-top: 24px;
    padding-bottom: calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px));
    padding-left: calc(20px + 32px + env(safe-area-inset-left, 0px));
    padding-right: calc(20px + 32px + env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    scrollbar-gutter: stable;
    overflow-x: hidden;
  }

  body.ra-portal--owner #rwChatPanel:not(.ra-portal__chat--thread) #rwChatFooter,
  body.ra-portal--tenant #rwChatPanel:not(.ra-portal__chat--thread) #rwChatFooter,
  body.ra-portal--agent #rwChatPanel:not(.ra-portal__chat--thread) #rwChatFooter,
  body.ra-portal--vendor #rwChatPanel:not(.ra-portal__chat--thread) #rwChatFooter{
    display: none;
  }

  body.ra-portal--owner #rwChatPanel:not(.ra-portal__chat--thread) #rwChatMain,
  body.ra-portal--tenant #rwChatPanel:not(.ra-portal__chat--thread) #rwChatMain,
  body.ra-portal--agent #rwChatPanel:not(.ra-portal__chat--thread) #rwChatMain,
  body.ra-portal--vendor #rwChatPanel:not(.ra-portal__chat--thread) #rwChatMain{
    display: contents;
  }

  body.ra-portal--owner #rwChatPanel:not(.ra-portal__chat--thread) #rwIdlePanel,
  body.ra-portal--tenant #rwChatPanel:not(.ra-portal__chat--thread) #rwIdlePanel,
  body.ra-portal--agent #rwChatPanel:not(.ra-portal__chat--thread) #rwIdlePanel,
  body.ra-portal--vendor #rwChatPanel:not(.ra-portal__chat--thread) #rwIdlePanel{
    grid-column: 1;
    grid-row: 1;
    width: auto;
    max-width: none;
    min-width: 0;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.ra-portal--owner #rwChatPanel:not(.ra-portal__chat--thread) .ra-portal__idle-home,
  body.ra-portal--tenant #rwChatPanel:not(.ra-portal__chat--thread) .ra-portal__idle-home,
  body.ra-portal--agent #rwChatPanel:not(.ra-portal__chat--thread) .ra-portal__idle-home,
  body.ra-portal--vendor #rwChatPanel:not(.ra-portal__chat--thread) .ra-portal__idle-home{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    gap: 0;
    overflow: hidden;
  }

  body.ra-portal--owner #rwChatPanel .ra-portal__idle-list,
  body.ra-portal--tenant #rwChatPanel .ra-portal__idle-list,
  body.ra-portal--agent #rwChatPanel .ra-portal__idle-list,
  body.ra-portal--vendor #rwChatPanel .ra-portal__idle-list{
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    align-self: stretch;
    overflow-y: auto;
    padding-bottom: 0;
  }

  body.ra-portal--owner #rwChatPanel .ra-portal__idle-item,
  body.ra-portal--tenant #rwChatPanel .ra-portal__idle-item,
  body.ra-portal--agent #rwChatPanel .ra-portal__idle-item,
  body.ra-portal--vendor #rwChatPanel .ra-portal__idle-item{
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    height: auto;
    box-sizing: border-box;
  }

  #rwOwnerPropertyListView,
  #rwOwnerEstimateListPane,
  #rwAgentPropertyListView,
  #rwAgentOwnerListView,
  #rwAgentTenantListView,
  #rwAgentEstimateListPane,
  #rwAgentInvoiceListView,
  #rwAgentOwnerInvoiceListPane,
  #rwVendorEstimateListPane,
  #rwVendorInvoiceListPane,
  #rwPeopleList,
  #rwOwnerDetail,
  #rwTenantLeases,
  #rwTenantLeaseListView,
  #rwTenantConvList,
  #rwIdlePanel{
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }

  .ra-people__rows,
  .ra-portal__idle-list{
    justify-content: flex-start;
  }

  .ra-owner__list,
  .ra-vendor__rows{
    justify-content: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .ra-owner__list,
  .ra-people__rows,
  .ra-vendor__rows,
  .ra-portal__idle-list{
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, 0.18) transparent;
    scrollbar-gutter: auto;
  }

  .ra-owner__list::-webkit-scrollbar,
  .ra-people__rows::-webkit-scrollbar,
  .ra-vendor__rows::-webkit-scrollbar,
  .ra-portal__idle-list::-webkit-scrollbar,
  #rwOwnerPropertyListView::-webkit-scrollbar,
  #rwOwnerEstimateListPane::-webkit-scrollbar,
  #rwAgentPropertyListView::-webkit-scrollbar,
  #rwAgentOwnerListView::-webkit-scrollbar,
  #rwAgentTenantListView::-webkit-scrollbar,
  #rwAgentEstimateListPane::-webkit-scrollbar,
  #rwAgentInvoiceListView::-webkit-scrollbar,
  #rwAgentOwnerInvoiceListPane::-webkit-scrollbar,
  #rwVendorEstimateListPane::-webkit-scrollbar,
  #rwVendorInvoiceListPane::-webkit-scrollbar,
  #rwPeopleList::-webkit-scrollbar,
  #rwOwnerDetail::-webkit-scrollbar,
  #rwTenantLeases::-webkit-scrollbar,
  #rwIdlePanel::-webkit-scrollbar{
    width: 2px;
    height: 2px;
    background: transparent;
  }
}

.ra-stripe-form{
  display: grid;
  gap: 10px;
  margin: 12px 0 4px;
  max-width: 420px;
}
.ra-stripe-form label{
  display: grid;
  gap: 4px;
}
.ra-stripe-form input,
.ra-stripe-form select{
  font: inherit;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.ra-stripe-row{
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}
.ra-stripe-id{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}

@media (min-width: 1024px){
  [data-rw-agent-page="email-invoices"]:has(#rwEmailInvoiceForm:not([hidden])),
  [data-rw-agent-page="email-invoices"]:has(#rwEmailInvoiceLinePage:not([hidden])){
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    column-gap: 32px;
    padding-left: 32px;
    padding-right: 32px;
    min-width: 0;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  [data-rw-agent-page="email-invoices"]:has(#rwEmailInvoiceForm:not([hidden])) #rwEmailInvoiceListPane,
  [data-rw-agent-page="email-invoices"]:has(#rwEmailInvoiceLinePage:not([hidden])) #rwEmailInvoiceListPane{
    display: flex !important;
    flex-direction: column;
    min-width: 0;
    max-width: none;
    width: auto;
    max-height: 100%;
    overflow: auto;
    grid-column: 1;
    grid-row: 1;
  }

  [data-rw-agent-page="email-invoices"] > #rwEmailInvoiceForm:not([hidden]),
  [data-rw-agent-page="email-invoices"] > #rwEmailInvoiceLinePage:not([hidden]){
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    height: 100%;
    overflow: auto;
  }

  .ra-owner__pages .ra-estimate-footer:has(#rwEmailInvoiceLineSave){
    display: flex !important;
    position: static;
    width: auto;
    margin: 16px 16px 0;
    left: auto;
    right: auto;
    bottom: auto;
  }
}

#rwAgentInvoiceBatchTop,
#rwAgentInvoiceBatchApprove,
#rwAgentInvoiceDrafts,
.ra-invoice-filter__label{
  display: none;
}

.ra-invoice-tool{
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--rw-navy-shine);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.ra-owner-tx-search{
  flex: 0 1 240px;
  min-width: 0;
  box-sizing: border-box;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #6d8299;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.85rem;
}

.ra-owner-tx-filter{
  flex-basis: 170px;
  padding-right: 4px;
}

#rwOwnerTxRows tr[data-rw-owner-tx-more-row] > td,
#rwVendorTxRows tr[data-rw-owner-tx-more-row] > td,
#rwTenantTxRows tr[data-rw-owner-tx-more-row] > td,
tr[data-rw-list-more] > td{
  text-align: center;
}

.ra-owner-tx-more{
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--rw-navy-shine);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.ra-invoice-mini{
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.ra-invoice-mini.is-on{
  box-shadow: inset 0 0 0 2px #fff;
}

.ra-invoice-grid{
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12.5px;
  background: #fff;
  border: 1px solid #e4ebf2;
}

.ra-invoice-grid th{
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  padding: 4px 8px;
  border: 1px solid #e4ebf2;
  white-space: nowrap;
}

table.ra-invoice-grid th[hidden],
table.ra-invoice-grid td[hidden]{
  display: none !important;
}

@media (max-width: 1024px){
  [data-rw-agent-page="owner-transactions"]:has(#rwOwnerTxDetail:not([hidden])) #rwOwnerTxList,
  [data-rw-agent-page="invoices"]:has(#rwOwnerTxDetail:not([hidden])) #rwVendorTxList{
    display: none;
  }
}

.ra-invoice-grid td{
  padding: 8px 10px;
  border: 1px solid #e4ebf2;
  vertical-align: middle;
  line-height: 1.25;
}

.ra-invoice-grid .ra-status-chip{
  margin-left: 0;
}

.ra-invoice-grid .ra-invoice-money{
  text-align: center;
  white-space: nowrap;
}

.ra-invoice-money--short{
  color: #b91c1c;
}

.ra-invoice-money--full{
  color: #15803d;
}

.ra-invoice-grid .ra-inv-check{
  width: 22px;
  max-width: 22px;
  padding: 4px 3px;
  box-sizing: border-box;
  text-align: center;
}

.ra-invoice-file-col,
.ra-invoice-grid .ra-inv-file{
  width: 36px;
  max-width: 36px;
  padding: 4px 2px;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}

.ra-invoice-files{
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0;
}

.ra-invoice-grid .ra-invoice-download{
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.ra-invoice-files .ra-invoice-download svg{
  width: 14px;
  height: 14px;
}

.ra-invoice-files{
  gap: 4px;
}

.ra-invoice-grid td.ra-inv-file,
.ra-invoice-grid th.ra-inv-file{
  padding: 2px;
  text-align: center;
}

.ra-invoice-download{
  display: inline-grid;
  place-items: center;
  margin-left: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: #102d4e;
  cursor: pointer;
  vertical-align: middle;
}

.ra-invoice-grid--draft .ra-inv-file{
  width: 36px;
  max-width: 36px;
}

.ra-invoice-grid--draft .ra-inv-x{
  width: 22px;
  max-width: 22px;
  text-align: center;
  padding: 2px 0;
}

.ra-invoice-row-x{
  border: 0;
  background: transparent;
  color: #b91c1c;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  width: 18px;
  padding: 0;
  cursor: pointer;
}

@media (max-width: 1024px){
  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="invoices"]:not([hidden]) #rwAgentInvoiceListView:not([hidden])):not(:has(#rwAgentInvoicePayPage:not([hidden]))):not(:has(#rwAgentInvoiceEstimatePick:not([hidden]))){
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    touch-action: pan-x pan-y;
  }

  .ra-owner__page[data-rw-agent-page="invoices"]:not([hidden]):not(:has(#rwAgentInvoicePayPage:not([hidden]))):not(:has(#rwAgentInvoiceEstimatePick:not([hidden]))):not(:has(#rwAgentInvoiceDetail:not([hidden]))){
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  .ra-owner__page[data-rw-agent-page="invoices"]:has(#rwAgentInvoiceDetail:not([hidden])) #rwAgentInvoiceListView{
    display: none !important;
  }

  .ra-owner__page[data-rw-agent-page="invoices"][data-rw-vendor-tab-open="drafts"]:not([hidden]) #rwAgentInvoiceListView:not([hidden]){
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  #rwAgentInvoiceListView .ra-invoice-toolbar,
  #rwAgentInvoiceListView > #rwAgentInvoiceSelectAll,
  #rwAgentInvoiceListView > #rwAgentInvoiceBatchListHint{
    position: static;
    flex: 0 0 auto;
  }

  [data-rw-agent-page="invoices"] #rwAgentInvoiceSplit{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  #rwAgentInvoices:has(.ra-invoice-grid){
    display: block;
    flex: 0 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    background: #fff;
  }

  .ra-invoice-grid thead th{
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
  }

  #rwAgentInvoices .ra-invoice-grid--pay{
    width: 949px;
    min-width: 949px;
    max-width: none;
    margin: 0;
    table-layout: fixed;
  }

  #rwAgentInvoices .ra-invoice-grid--draft{
    width: 498px;
    min-width: 498px;
    max-width: none;
    margin: 0;
    table-layout: fixed;
  }

  .ra-invoice-grid--pay .ra-inv-check,
  .ra-invoice-grid--draft .ra-inv-check{ width: 22px; max-width: 22px; }
  .ra-invoice-grid--pay .ra-inv-date{ width: 156px; }
  .ra-invoice-grid--pay .ra-inv-name{ width: 123px; }
  .ra-invoice-grid--pay .ra-inv-address{ width: 218px; }
  .ra-invoice-grid--pay .ra-inv-source{ width: 97px; }
  .ra-invoice-grid--pay .ra-inv-paid,
  .ra-invoice-grid--pay .ra-inv-total{ width: 101px; }
  .ra-invoice-grid--pay .ra-inv-status{ width: 153px; }
  .ra-invoice-grid--pay .ra-inv-file,
  .ra-invoice-grid--draft .ra-inv-file{ width: 36px; max-width: 36px; }
  .ra-invoice-grid--draft .ra-inv-x{ width: 22px; max-width: 22px; }
  .ra-invoice-grid--draft .ra-inv-date,
  .ra-invoice-grid--draft .ra-inv-address,
  .ra-invoice-grid--draft .ra-inv-name,
  .ra-invoice-grid--draft .ra-inv-amount{
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .ra-invoice-grid--draft .ra-inv-date{ width: 92px; }
  .ra-invoice-grid--draft .ra-inv-address{ width: 140px; }
  .ra-invoice-grid--draft .ra-inv-name{ width: 110px; }
  .ra-invoice-grid--draft .ra-inv-amount{ width: 76px; }

  #rwAgentInvoiceListView.is-draft-open .ra-invoice-toolbar,
  #rwAgentInvoiceListView.is-draft-open > #rwAgentInvoiceSelectAll,
  #rwAgentInvoiceListView.is-draft-open > #rwAgentInvoiceBatchListHint,
  #rwAgentInvoiceListView.is-draft-open #rwAgentInvoices{
    display: none !important;
  }

  #rwAgentInvoiceListView.is-draft-open #rwAgentInvoiceDraftPane{
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }

  #rwAgentInvoiceBatchFooter{
    display: none !important;
  }
}

@media (min-width: 1025px){
  .ra-invoice-grid--pay,
  .ra-invoice-grid--draft{
    table-layout: fixed;
  }

  .ra-invoice-grid--pay .ra-inv-check,
  .ra-invoice-grid--draft .ra-inv-check{ width: 22px; max-width: 22px; }
  .ra-invoice-grid--pay .ra-inv-date{ width: 15.9%; }
  .ra-invoice-grid--pay .ra-inv-name{ width: calc(18.3% - 25px); }
  .ra-invoice-grid--pay .ra-inv-address{ width: calc(24.3% - 20px); }
  .ra-invoice-grid--pay .ra-inv-source{ width: 9.9%; }
  .ra-invoice-grid--pay .ra-inv-paid,
  .ra-invoice-grid--pay .ra-inv-total{ width: 10.3%; }
  .ra-invoice-grid--pay .ra-inv-status{ width: calc(11% + 45px); }
  .ra-invoice-grid--pay .ra-inv-file,
  .ra-invoice-grid--draft .ra-inv-file{ width: 36px; max-width: 36px; }

  .ra-invoice-grid--draft .ra-inv-x{ width: 22px; max-width: 22px; }
  .ra-invoice-grid--draft .ra-inv-date{ width: 11%; }
  .ra-invoice-grid--draft .ra-inv-address{ width: calc(42.5% - 2px); }
  .ra-invoice-grid--draft .ra-inv-name{ width: calc(31.5% - 20px); }
  .ra-invoice-grid--draft .ra-inv-amount{ width: 15%; }
  .ra-invoice-grid--draft .ra-inv-file{ width: 36px; max-width: 36px; }

  .ra-invoice-grid .ra-inv-name,
  .ra-invoice-grid .ra-inv-address,
  .ra-invoice-grid .ra-inv-date,
  .ra-invoice-grid .ra-inv-source,
  .ra-invoice-grid .ra-inv-status{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/*
 * Every invoice icon has one look: a small tinted square with the invoice mark. The color matches
 * the invoice paper it opens: blue for vendor and owner invoices (.ra-invoice-paper), beige for
 * RentWiseAI's own (.rw-pinv-btn in platform-invoice.css).
 */
.ra-invoice-file{
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 1px solid #c7d7ea;
  border-radius: 8px;
  background: #eef4fb;
  color: #203e64;
  cursor: pointer;
  font: inherit;
  box-sizing: border-box;
}

button.ra-invoice-file:hover{
  border-color: #93b4d8;
  background: #dfeaf7;
  color: #163152;
}

span.ra-invoice-file{
  opacity: 0.4;
  cursor: default;
}

.ra-invoice-file svg{
  width: 17px;
  height: 17px;
}

.ra-invoice-file-link{
  border: 0;
  padding: 0;
  background: none;
  color: #1d4ed8;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* Above the invoice viewer (100), whose Print opens it; below the confirm dialog (120). */
.ra-invoice-file-page{
  z-index: 110;
  background: #e2e8f0;
  touch-action: pan-x pan-y;
}

#rwInvoiceFilePage iframe,
#rwAgentInvoiceDraftPane,
#rwEmailInvoiceForm,
#rwAgentInvoiceModal{
  touch-action: pan-x pan-y;
}

@media (max-width: 1024px){
  input,
  select,
  textarea{
    font-size: 16px !important;
  }
}

.ra-invoice-file-page__stage{
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.ra-invoice-file-page__stage iframe{
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  border-radius: 8px;
}

.ra-invoice-file-page__stage img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}

.ra-invoice-file-page__stage:has(.ra-invoice-file-page__doc:not([hidden])){
  align-items: stretch;
  justify-content: center;
}

.ra-invoice-file-page__doc{
  width: min(100%, 840px);
  height: 100%;
  margin: 0 auto;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  padding: 28px 32px;
  color: #0f172a;
  box-sizing: border-box;
}

.ra-invoice-file-page__doc[hidden]{
  display: none !important;
}

.ra-invoice-doc p{
  margin: 0 0 8px;
}

.ra-invoice-doc img{
  max-width: 100%;
  height: auto;
}

.ra-invoice-doc table{
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
}

.ra-invoice-doc td{
  border: 1px solid #e4ebf2;
  padding: 4px 6px;
  vertical-align: top;
}

.ra-invoice-file svg{
  display: block;
}

.ra-invoice-grid tbody tr{
  cursor: pointer;
}

.ra-invoice-grid tbody tr:hover{
  background: #f8fafc;
}

.ra-invoice-grid__keep{
  width: 0;
  max-width: 0;
  padding: 0;
  border: 0;
  font-size: 0;
  line-height: 0;
  overflow: hidden;
}

.ra-invoice-sheet__x{
  display: none;
}

@media (min-width: 1025px){
  .ra-invoice-mini{
    display: none !important;
  }

  #rwAgentInvoiceBatchTop:not([hidden]),
  #rwAgentInvoiceBatchApprove:not([hidden]),
  #rwAgentInvoiceDrafts:not([hidden]){
    display: inline-flex;
    align-items: center;
  }

  .ra-invoice-filter__label{
    display: inline;
  }

  .ra-invoice-head__actions{
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  #rwAgentInvoiceFilters{
    align-items: center;
    gap: 0;
  }

  #rwAgentInvoiceFilters .ra-owner__field{
    display: grid;
    grid-template-columns: auto minmax(10rem, 16rem);
    align-items: center;
    column-gap: 10px;
    max-width: none;
    margin: 0 20px;
  }

  #rwAgentInvoiceReset{
    margin: 0 20px 0 0;
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: var(--rw-navy-shine);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
  }

  .ra-invoice-tool,
  #rwAgentInvoiceFilter{
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: var(--rw-navy-shine);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
  }

  #rwAgentInvoiceFilter{
    width: auto;
    flex: 0 0 auto;
    height: 32px;
    padding: 0 12px;
    gap: 6px;
  }

  #rwAgentInvoiceFilter svg,
  .ra-invoice-filter[data-rw-list-filter] svg{
    display: none;
  }

  .ra-invoice-filter[data-rw-list-filter]{
    width: auto;
    flex: 0 0 auto;
    height: 32px;
    padding: 0 12px;
    gap: 6px;
  }

  .ra-invoice-filters .ra-owner__field{
    display: grid;
    grid-template-columns: auto minmax(10rem, 16rem);
    align-items: center;
    column-gap: 10px;
    max-width: none;
    margin: 0 20px 0 0;
  }

  .ra-owner__page[data-rw-agent-page="invoices"]:not([hidden]):not(:has(#rwAgentInvoicePayPage:not([hidden]))):not(:has(#rwAgentInvoiceEstimatePick:not([hidden]))){
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
  }

  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="invoices"]:not([hidden]) #rwAgentInvoiceListView:not([hidden])):not(:has(#rwAgentInvoicePayPage:not([hidden]))):not(:has(#rwAgentInvoiceEstimatePick:not([hidden]))){
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 16px;
  }

  .ra-owner__page[data-rw-agent-page="invoices"][data-rw-vendor-tab-open="drafts"]:not([hidden]):not(:has(#rwAgentInvoicePayPage:not([hidden]))):not(:has(#rwAgentInvoiceEstimatePick:not([hidden]))) #rwAgentInvoiceListView{
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  #rwAgentInvoiceListView .ra-invoice-toolbar{
    position: static;
    flex: 0 0 auto;
  }

  #rwAgentInvoiceSplit{
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  #rwAgentInvoices{
    flex: 0 1 auto;
    min-height: 0;
    overflow: auto;
  }

  #rwAgentInvoiceListView:not(.is-draft-open) #rwAgentInvoices:has(.ra-invoice-grid--draft){
    width: calc(100% - 12px - (45% - 6px));
    max-width: calc(100% - 12px - (45% - 6px));
    flex: 0 0 auto;
    align-self: flex-start;
    scrollbar-gutter: stable;
  }

  #rwAgentInvoiceListView.is-draft-open #rwAgentInvoiceSplit{
    display: grid;
    grid-template-columns: minmax(0, 1fr) calc(45% - 6px);
    justify-content: stretch;
    gap: 12px;
    overflow: hidden;
  }

  #rwAgentInvoiceListView.is-draft-open #rwAgentInvoices{
    width: 100%;
    max-width: none;
    scrollbar-gutter: stable;
  }

  #rwAgentInvoiceListView.is-draft-open #rwEmailInvoiceForm,
  #rwAgentInvoiceListView.is-draft-open #rwEmailInvoiceForm > .ra-estimate-story{
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  #rwAgentInvoiceListView.is-draft-open #rwAgentInvoices,
  #rwAgentInvoiceDraftPane{
    min-height: 0;
    overflow: auto;
  }

  #rwAgentInvoiceDraftPane{
    background: transparent;
    border-radius: 0;
    padding-top: 0;
    scrollbar-gutter: stable;
  }

  #rwAgentInvoiceDraftPane[hidden]{
    display: none !important;
  }

  .ra-invoice-grid--draft tr.is-selected td,
  #rwAgentInvoices tr.is-selected td{
    background: #d4e1ee;
  }

  .ra-invoice-grid thead th{
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
  }

  #rwAgentInvoiceBatchModal,
  #rwAppConfirm,
  #rwEstimateReadyModal:not(.is-review),
  #rwOwnerTxStripeModal,
  #rwVerifyMailModal,
  #rwPeopleMailModal{
    left: 0;
    right: 0;
    width: auto;
    align-items: start;
    align-content: start;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
  }

  #rwAgentInvoiceBatchModal .ra-portal__modal,
  #rwAppConfirm .ra-portal__modal,
  #rwEstimateReadyModal:not(.is-review) .ra-portal__modal,
  #rwOwnerTxStripeModal .ra-portal__modal,
  #rwVerifyMailModal .ra-portal__modal,
  #rwPeopleMailModal .ra-portal__modal{
    font-size: 1.05rem;
  }

  #rwAppConfirm .ra-portal__modal-title,
  #rwAppConfirmText,
  #rwEstimateReadyText,
  #rwOwnerTxStripeText,
  #rwVerifyMailText,
  #rwPeopleMailText{
    font-size: 1.05rem;
  }

  #rwAgentInvoiceBatchText{
    font-size: 1.2rem;
  }

  #rwAgentInvoiceBatchModal .ra-portal__primary-btn,
  #rwAgentInvoiceBatchModal .ra-portal__ghost-btn--on-dark,
  #rwAppConfirm .ra-portal__ghost-btn--on-dark,
  #rwEstimateReadyModal:not(.is-review) .ra-portal__ghost-btn--on-dark,
  #rwOwnerTxStripeModal .ra-portal__primary-btn,
  #rwVerifyMailModal .ra-portal__primary-btn,
  #rwPeopleMailModal .ra-portal__primary-btn{
    font-size: 0.95rem;
  }

  #rwAgentInvoiceSelectAll{
    display: none !important;
  }

  #rwAgentInvoices:has(.ra-invoice-grid){
    display: block;
  }

  .ra-owner__pages .ra-estimate-footer#rwAgentInvoiceBatchFooter:not(:has(#rwAgentInvoiceBatchLeave:not([hidden]))){
    display: none !important;
  }

  #rwAgentInvoiceModal:not(.is-open){
    display: none;
  }

  #rwAgentInvoiceModal.is-open{
    position: fixed;
    z-index: 80;
    /* The dim covers the whole working page: from the header's bottom edge, right of the side menu. */
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px));
    right: 0;
    bottom: 0;
    left: var(--rw-side-nav, 144px);
    display: grid !important;
    align-items: start;
    justify-items: center;
    padding: 5px 32px 0;
    background: rgba(15, 23, 42, 0.45);
  }

  #rwAgentInvoiceModal.is-open .ra-invoice-sheet__panel{
    position: relative;
    display: flex;
    flex-direction: column;
    width: 50vw;
    max-width: 50vw;
    height: auto;
    max-height: calc(100dvh - var(--rw-header-h) - 13px);
    overflow: auto;
    background: #e2e8f0;
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 16px 20px 1lh;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  }

  #rwAgentInvoiceModal.is-open .ra-invoice-sheet__x{
    display: grid;
    place-items: center;
    position: sticky;
    top: 0;
    align-self: flex-end;
    z-index: 2;
    margin: 0 0 8px;
    background: #e2e8f0;
  }

  #rwAgentInvoiceModal.is-open #rwAgentInvoiceDetail > .ra-owner__title{
    margin-top: 0;
    padding-right: 36px;
  }

  #rwAgentInvoiceModal.is-open [data-rw-agent-invoice-back]{
    display: none !important;
  }
}

.ra-list-x{
  display: inline-grid;
  place-items: center;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}

table.ra-invoice-grid tr,
tr.ra-owner__property,
tr.ra-portal__idle-item,
tr.ra-people__row{
  display: table-row !important;
  flex: none !important;
  width: auto !important;
  height: auto !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  color: #0f172a !important;
}

table.ra-invoice-grid tr[hidden]{
  display: none !important;
}

.ra-invoice-grid .ra-people__name,
.ra-invoice-grid .ra-people__fact,
.ra-invoice-grid .ra-people__id,
.ra-invoice-grid .ra-people__units,
.ra-invoice-grid .ra-rowdate,
.ra-invoice-grid .ra-portal__idle-item-title,
.ra-invoice-grid .ra-portal__idle-item-meta,
.ra-invoice-grid strong{
  display: inline;
  margin: 0;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.25;
  color: inherit;
}

body.ra-portal--agent #rwChatPanel #rwIdleHome,
body.ra-portal--owner #rwChatPanel #rwIdleHome,
body.ra-portal--tenant #rwChatPanel #rwIdleHome,
body.ra-portal--vendor #rwChatPanel #rwIdleHome,
body.ra-portal--agent #rwChatPanel #rwIdleRecentList,
body.ra-portal--owner #rwChatPanel #rwIdleRecentList,
body.ra-portal--tenant #rwChatPanel #rwIdleRecentList,
body.ra-portal--vendor #rwChatPanel #rwIdleRecentList,
#rwTenantConvList,
#rwTenantConvRows{
  width: 100% !important;
  max-width: none !important;
}

table.ra-invoice-grid th,
table.ra-invoice-grid td{
  display: table-cell !important;
  width: auto;
  height: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.ra-owner__list:has(> table.ra-invoice-grid),
.ra-portal__idle-list:has(> table.ra-invoice-grid){
  display: block;
  width: 100%;
  max-width: none;
  overflow: auto;
  background: #fff;
}

@media (min-width: 1025px){
  .ra-owner__list,
  .ra-portal__idle-list,
  #rwPeopleRows,
  #rwIdleRecentList,
  #rwTenantConvRows,
  #rwBankTreasuryRows,
  #rwBankRows,
  #rwBankSlots,
  #rwBankLedgerTable,
  #rwAgentPropertyList,
  #rwOwnerPropertyList,
  #rwAgentEstimateList{
    overflow-x: clip;
  }
}

#rwPeopleRows,
#rwIdleRecentList,
#rwTenantConvRows{
  max-width: 100% !important;
  min-width: 0;
  overflow-x: auto;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

#rwIdleRecentList,
#rwTenantConvRows,
#rwAgentPropertyList,
#rwOwnerPropertyList,
#rwAgentEstimateList,
#rwOwnerEstimateList,
#rwVendorEstimateList,
#rwVendorBillRows,
#rwAgentOwnerInvoiceRows{
  width: 100%;
  max-width: none;
}

#rwPeopleRows > table.ra-invoice-grid,
.ra-owner__list > table.ra-invoice-grid,
.ra-portal__idle-list > table.ra-invoice-grid{
  width: 100%;
  min-width: 0;
}

#rwChatTitleBar,
#rwAgentEstimateDetail,
#rwOwnerEstimateDetail,
#rwVendorEstimateDetail,
#rwAgentPropertyDetail,
#rwVendorInvoiceDetail,
#rwAgentOwnerInvoiceDetail,
#rwOwnerTxDetail,
#rwPeopleForm,
#rwOwnerDetail,
#rwTenantLeases,
#rwAgentOwnerDetail,
#rwAgentTenantDetail{
  position: relative;
}

#rwIdleHome{
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
  color: #0f172a;
}

.ra-list-grid .ra-inv-name,
.ra-list-grid .ra-inv-address,
.ra-list-grid .ra-inv-date,
.ra-list-grid .ra-inv-source,
.ra-list-grid .ra-inv-status,
.ra-portal__idle-item-title{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ra-list-grid--talk{
  width: 100%;
  table-layout: fixed;
}
.ra-list-grid--talk .ra-inv-date{ width: calc(11% * 0.6 * 0.7 * 0.6 * 4); }
.ra-list-grid--talk .ra-inv-source{ width: calc(10% * 0.85 * 0.7 * 0.85 * 1.1); }
.ra-list-grid--talk .ra-inv-name{ width: calc(18% * 0.8); }
.ra-list-grid--talk .ra-inv-age{ width: calc(7% * 0.9); }
.ra-list-grid--talk .ra-inv-updated{ width: 9%; }
.ra-list-grid--talk .ra-inv-status{ width: calc(14% * 0.7); }

.ra-list-grid--talk tbody td{
  padding: 4px 8px;
  vertical-align: middle;
  line-height: 1.25;
}

.ra-list-grid--talk .ra-portal__unread-dot{
  display: inline-block;
  margin: 0 6px 0 0;
  vertical-align: middle;
  box-shadow: none;
}

.ra-list-grid--talk .ra-inv-actions{
  width: 74px;
  white-space: nowrap;
}

.ra-list-grid--talk .ra-invoice-tool{
  height: 22px;
  margin: 0 2px 0 0;
  padding: 0 4px;
  font-size: 11px;
  line-height: 20px;
}

#rwAgentEstimateDetail > .ra-estimate-footer,
#rwOwnerEstimateDetail > .ra-estimate-footer,
#rwVendorEstimateDetail > .ra-estimate-footer,
#rwVendorEstimateForm > .ra-estimate-footer,
#rwAgentOwnerInvoiceDetail > .ra-estimate-footer,
#rwOwnerTxDetail > .ra-estimate-footer,
#rwVendorInvoiceDetail > .ra-estimate-footer,
#rwPeopleFormFooter,
#rwChatBackFooter{
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: auto;
  min-height: 0;
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
  order: -1;
}

#rwAgentEstimateDetail > .ra-estimate-footer button,
#rwOwnerEstimateDetail > .ra-estimate-footer button,
#rwVendorEstimateDetail > .ra-estimate-footer button,
#rwVendorEstimateForm > .ra-estimate-footer button,
#rwAgentOwnerInvoiceDetail > .ra-estimate-footer button,
#rwOwnerTxDetail > .ra-estimate-footer button,
#rwVendorInvoiceDetail > .ra-estimate-footer button,
#rwPeopleFormFooter button,
#rwChatBackFooter button,
#rwAgentPropertyDetail > .ra-owner__back{
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: var(--rw-navy-shine);
  box-shadow: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

@media (min-width: 1025px){
  .ra-list-x{
    display: none !important;
  }

  #rwVendorEstimateForm:not([hidden]) > .ra-list-x{
    display: inline-grid !important;
    position: absolute !important;
    top: 8px;
    right: 8px;
    margin: 0 !important;
    background: transparent;
  }

  #rwBankLedger:not([hidden]) #rwBankLedgerClose,
  #rwBankOnboarding:not([hidden]) > .ra-list-x{
    display: inline-grid !important;
  }

  [data-rw-agent-page="properties"]:not([hidden]),
  [data-rw-agent-page="estimates"]:not([hidden]),
  [data-rw-agent-page="owners"]:not([hidden]),
  [data-rw-agent-page="tenants"]:not([hidden]),
  [data-rw-agent-page="agents"]:not([hidden]),
  [data-rw-agent-page="vendors"]:not([hidden]),
  [data-rw-agent-page="owner-invoices"]:not([hidden]),
  [data-rw-owner-page="properties"]:not([hidden]),
  [data-rw-owner-page="estimates"]:not([hidden]),
  [data-rw-vendor-page="estimates"]:not([hidden]),
  [data-rw-vendor-page="invoices"]:not([hidden]),
  [data-rw-tenant-page="conversations"]:not([hidden]){
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    width: 100%;
    max-width: none;
    height: auto;
    overflow: auto;
  }

  .ra-people,
  #rwPeopleList,
  .ra-people__rows,
  .ra-owner__list,
  .ra-portal__idle-home,
  .ra-portal__idle-list{
    width: 100% !important;
    max-width: none !important;
  }

  .ra-list-grid,
  #rwVendorBillRows .ra-invoice-grid,
  #rwVendorLedgerHost .ra-invoice-grid,
  #rwAgentOwnerInvoiceRows .ra-invoice-grid,
  #rwPeopleRows .ra-invoice-grid,
  #rwIdleRecentList .ra-invoice-grid,
  #rwTenantConvRows .ra-invoice-grid,
  #rwAgentPropertyList .ra-invoice-grid,
  #rwOwnerPropertyList .ra-invoice-grid{
    width: 100%;
    table-layout: fixed;
  }

  .ra-list-grid .ra-inv-check,
  .ra-invoice-grid--pay .ra-inv-check{ width: 22px; max-width: 22px; }
  .ra-list-grid .ra-inv-date,
  .ra-invoice-grid--pay .ra-inv-date{ width: 15.9%; }
  .ra-list-grid--estimate .ra-inv-date{ width: calc(15.9% * 0.6); }
  .ra-list-grid .ra-inv-name,
  .ra-invoice-grid--pay .ra-inv-name{ width: calc(18.3% - 25px); }
  .ra-list-grid .ra-inv-address,
  .ra-invoice-grid--pay .ra-inv-address{ width: calc(24.3% - 20px); }
  .ra-list-grid .ra-inv-source,
  .ra-invoice-grid--pay .ra-inv-source{ width: 9.9%; }
  .ra-list-grid .ra-inv-status,
  .ra-invoice-grid--pay .ra-inv-status{ width: calc(11% + 45px); }
  .ra-list-grid--estimate col.ra-inv-status,
  .ra-list-grid--estimate .ra-inv-status{
    width: calc(181px * 0.85 * 1.1 * 1.1) !important;
    max-width: calc(181px * 0.85 * 1.1 * 1.1) !important;
    min-width: 0 !important;
  }
  .ra-list-grid--estimate .ra-inv-name{
    width: calc((18.3% - 25px) - (181px * 0.85 * 1.1 * 0.1));
  }
  .ra-list-grid .ra-inv-paid,
  .ra-list-grid .ra-inv-total,
  .ra-invoice-grid--pay .ra-inv-paid,
  .ra-invoice-grid--pay .ra-inv-total{ width: 10.3%; }

  #rwAgentPropertyListView[hidden],
  #rwOwnerPropertyListView[hidden],
  #rwAgentEstimateListPane[hidden],
  #rwOwnerEstimateListPane[hidden],
  #rwVendorEstimateListPane[hidden],
  #rwVendorInvoiceListPane[hidden],
  #rwAgentOwnerInvoiceListPane[hidden],
  #rwPeopleList[hidden],
  #rwChatPanel.ra-portal__chat--thread #rwIdlePanel{
    display: flex !important;
    flex-direction: column;
    width: 100%;
    max-width: none;
  }

  #rwAgentPropertyDetail:not([hidden]),
  #rwAgentEstimateDetail:not([hidden]),
  #rwOwnerEstimateDetail:not([hidden]),
  #rwVendorEstimateDetail:not([hidden]),
  #rwAgentEstimateForm:not([hidden]),
  #rwVendorEstimateForm:not([hidden]),
  #rwAgentOwnerDetail:not([hidden]),
  #rwAgentTenantDetail:not([hidden]),
  #rwAgentVendorPick:not([hidden]),
  #rwPeopleForm:not([hidden]),
  #rwOwnerDetail:not([hidden]),
  #rwTenantLeases:not([hidden]),
  #rwPropertyForm:not([hidden]),
  #rwVendorInvoiceDetail:not([hidden]),
  #rwAgentOwnerInvoiceDetail:not([hidden]),
  #rwOwnerTxDetail:not([hidden]),
  #rwChatPanel.ra-portal__chat--thread #rwConversationBox{
    position: fixed !important;
    z-index: 80;
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px) + 5px) !important;
    left: calc(var(--rw-side-nav, 144px) + 32px + (100vw - var(--rw-side-nav, 144px) - 64px) * 0.15) !important;
    width: calc((100vw - var(--rw-side-nav, 144px) - 64px) * 0.7) !important;
    max-width: none !important;
    height: auto !important;
    max-height: calc(100dvh - var(--rw-header-h) - env(safe-area-inset-top, 0px) - 13px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin: 0 !important;
    background: #e2e8f0;
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 16px 20px 1lh;
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
  }

  #rwPeopleForm.ra-people__form--owner:not([hidden]){
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px) + 2px) !important;
    max-height: calc(100dvh - var(--rw-header-h) - 6px) !important;
    padding-bottom: 1lh !important;
  }

  #rwAgentPropertyDetail:not([hidden]) .ra-list-x,
  #rwAgentEstimateDetail:not([hidden]) .ra-list-x,
  #rwOwnerEstimateDetail:not([hidden]) .ra-list-x,
  #rwVendorEstimateDetail:not([hidden]) .ra-list-x,
  #rwAgentOwnerDetail:not([hidden]) .ra-list-x,
  #rwAgentTenantDetail:not([hidden]) .ra-list-x,
  #rwPeopleForm:not([hidden]) .ra-list-x,
  #rwOwnerDetail:not([hidden]) .ra-list-x,
  #rwTenantLeases:not([hidden]) .ra-list-x,
  #rwVendorInvoiceDetail:not([hidden]) .ra-list-x,
  #rwAgentOwnerInvoiceDetail:not([hidden]) .ra-list-x,
  #rwOwnerTxDetail:not([hidden]) .ra-list-x,
  #rwChatPanel.ra-portal__chat--thread .ra-list-x{
    display: inline-grid !important;
    position: sticky !important;
    top: 0;
    align-self: flex-end;
    float: none;
    z-index: 4;
    margin: 0 0 8px;
    background: #e2e8f0;
  }

  #rwChatPanel.ra-portal__chat--thread #rwConversationBox{
    display: flex;
    flex-direction: column;
    height: min(78vh, calc(100dvh - var(--rw-header-h) - 48px));
    box-sizing: border-box;
    padding-bottom: 76px;
  }

  #rwChatPanel.ra-portal__chat--thread #rwChatFooter{
    position: fixed;
    z-index: 81;
    left: calc(var(--rw-side-nav, 144px) + (100vw - var(--rw-side-nav, 144px)) * 0.15);
    width: calc((100vw - var(--rw-side-nav, 144px)) * 0.7);
    bottom: calc(100dvh - var(--rw-header-h) - 24px - min(78vh, calc(100dvh - var(--rw-header-h) - 48px)));
    box-sizing: border-box;
    margin: 0;
    padding: 0 16px 12px;
    background: #e2e8f0;
    border-radius: 0 0 16px 16px;
  }

  .ra-list-grid tr.is-selected td,
  #rwVendorBillRows tr.is-selected td,
  #rwAgentOwnerInvoiceRows tr.is-selected td,
  #rwOwnerTxRows tr.is-selected td,
  #rwPeopleRows tr.is-selected td,
  #rwAgentInvoices tr.is-selected td,
  #rwIdleRecentList tr.is-selected td,
  #rwTenantConvRows tr.is-selected td,
  #rwVendorTxRows tr.is-selected td{
    background: #d4e1ee;
  }

}

@media (max-width: 1024px){
  .ra-owner__page:has(#rwAgentEstimateDetail:not([hidden])) #rwAgentEstimateListPane,
  .ra-owner__page:has(#rwOwnerEstimateDetail:not([hidden])) #rwOwnerEstimateListPane,
  .ra-owner__page:has(#rwVendorEstimateDetail:not([hidden])) #rwVendorEstimateListPane,
  .ra-owner__page:has(#rwAgentPropertyDetail:not([hidden])) #rwAgentPropertyListView,
  .ra-owner__page:has(#rwVendorInvoiceDetail:not([hidden])) #rwVendorInvoiceListPane,
  .ra-owner__page:has(#rwAgentOwnerInvoiceDetail:not([hidden])) #rwAgentOwnerInvoiceListPane,
  #rwChatPanel.ra-portal__chat--thread #rwIdlePanel{
    display: none !important;
  }
}

#rwPeopleForm.ra-people__form--sheet:not([hidden]){
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  align-items: center;
  column-gap: 8px;
}

#rwPeopleForm.ra-people__form--sheet:not([hidden]) > #rwPeopleFormTitle{
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

#rwPeopleForm.ra-people__form--sheet:not([hidden]) > #rwPeopleFormFooter{
  grid-column: 1 / -1;
  grid-row: auto;
  order: 40;
  position: static;
  top: auto;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 26px 0 0;
  background: transparent;
}

#rwPeopleForm.ra-people__form--sheet:not([hidden]) > .ra-list-x{
  display: inline-grid !important;
  grid-column: 2;
  grid-row: 1;
  position: static !important;
  top: auto !important;
  right: auto !important;
  align-self: center !important;
  justify-self: end;
  float: none !important;
  margin: 0 !important;
  z-index: 6;
  background: transparent;
}

#rwPeopleForm.ra-people__form--sheet:not([hidden]) > :not(#rwPeopleFormFooter):not(.ra-list-x):not(#rwPeopleFormTitle):not(.ra-people__head){
  grid-column: 1 / -1;
}

#rwPeopleForm.ra-people__form--sheet #rwPeopleSave{
  order: -1;
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 16px rgba(11, 35, 64, 0.2);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: center;
}

#rwPeopleForm.ra-people__form--sheet #rwPeopleCancel{
  display: none !important;
}

/* Delete shows under Save once Edit is pressed: quiet red, so it is never mistaken for Save. */
#rwPeopleForm.ra-people__form--sheet:not([hidden]) > #rwPeopleFormFooter{
  flex-wrap: wrap;
  gap: 10px;
}

#rwPeopleForm.ra-people__form--sheet #rwPeopleDelete:not([hidden]){
  order: 1;
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 11px 16px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  color: #b91c1c;
  font: inherit;
  font-weight: 700;
  text-align: center;
}

#rwPeopleForm.ra-people__form--sheet #rwPeopleDelete:not([hidden]):hover{
  background: #fef2f2;
}

#rwPeopleForm{
  scroll-margin-top: calc(var(--rw-header-h) + 8px);
}

#rwPeopleForm #rwPeopleActiveField{
  margin-bottom: 0;
}

#rwPeopleForm:has(#rwTenantRentals:not([hidden])) #rwPeopleActiveField,
#rwPeopleForm:has(#rwOwnerPropertiesForm:not([hidden])) #rwPeopleActiveField{
  margin-bottom: 0;
}

.ra-tenant-left-date{
  margin-left: 8px;
  color: #0f172a;
  font-size: 12.5px;
}

.ra-list-grid--vendor{
  width: 100%;
  table-layout: fixed;
}

.ra-list-grid--vendor .ra-inv-date{ width: calc(15.9% * 0.65 * 0.9); }
.ra-list-grid--vendor .ra-inv-name{ width: calc(18% * 0.9); }
.ra-list-grid--vendor .ra-inv-id{ width: calc(7% * 0.75); }
.ra-list-grid--vendor .ra-inv-rate{ width: calc(12% * 0.75); }
.ra-list-grid--vendor .ra-inv-status{ width: calc(12% * 0.7); }

.ra-list-grid--people{
  width: 100%;
  table-layout: fixed;
}
.ra-list-grid--people .ra-inv-date{ width: calc(15.9% * 0.65 * 0.9); }
.ra-list-grid--people .ra-inv-name{ width: 16%; }
.ra-list-grid--people .ra-inv-id{ width: 6%; }
.ra-list-grid--people .ra-inv-place{ width: 20%; }
.ra-list-grid--people .ra-inv-units{ width: 8%; }
.ra-list-grid--people .ra-inv-commission{ width: 11%; }
.ra-list-grid--people .ra-inv-placement{ width: 10%; }
.ra-list-grid--people .ra-inv-renewal{ width: 10%; }
/* Status sits right after the name and can stack a few "missing" chips. */
.ra-list-grid--people .ra-inv-status{ width: 13%; }

.ra-list-grid--tenant{
  width: 100%;
  table-layout: fixed;
}
.ra-list-grid--tenant .ra-inv-date{ width: calc(15.9% * 0.65 * 0.9 * 0.8 * 1.15); }
.ra-list-grid--tenant .ra-inv-name{ width: calc(18% * 0.9); }
.ra-list-grid--tenant .ra-inv-id{ width: calc(7% * 0.75); }
.ra-list-grid--tenant .ra-inv-lease{ width: calc(13% * 1.15); }
.ra-list-grid--tenant .ra-inv-status{ width: calc(12% * 0.7); }
.ra-list-grid--tenant .ra-inv-active{ width: calc(12% * 0.75); }
.ra-list-grid--tenant .ra-inv-place,
.ra-list-grid--tenant .ra-inv-lease,
.ra-list-grid--tenant .ra-inv-place span,
.ra-list-grid--tenant .ra-inv-lease span,
.ra-list-grid--tenant .ra-inv-id,
.ra-list-grid--tenant .ra-inv-id span,
.ra-list-grid--tenant .ra-inv-date,
.ra-list-grid--tenant .ra-inv-date span,
.ra-list-grid--tenant .ra-inv-name,
.ra-list-grid--tenant .ra-inv-name strong{
  color: #0f172a;
}
.ra-list-grid--tenant .ra-inv-place,
.ra-list-grid--tenant .ra-inv-lease{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.ra-people__stack{
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rwTenantLeasesBack{
  display: none !important;
}

.ra-list-grid--vendor thead th{
  background: #334155;
  color: #fff;
  font-size: 14px;
}

.ra-tenant-rentals__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 8px;
}

#rwTenantRentalsTitle{
  margin: 0;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 600;
}

#rwTenantRentProperty{
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

#rwTenantRentalsRows{
  margin-bottom: 32px;
}

#rwPeopleForm #rwTenantRentalsRows,
#rwPeopleForm #rwOwnerPropertiesGrid{
  margin-bottom: 0;
}

#rwTenantRentalsRows table{
  width: 100%;
  table-layout: fixed;
}

#rwTenantRentalsRows .ra-inv-address{ width: calc(46% * 0.85 - 10%); }
#rwTenantRentalsRows .ra-inv-concession{
  width: 10%;
  text-align: center;
}
#rwTenantRentalsRows .ra-inv-date,
#rwTenantRentalsRows .ra-inv-lease{ width: 14%; }
#rwTenantRentalsRows .ra-inv-status{ width: calc(14% * 1.3); }
#rwTenantRentalsRows .ra-inv-left{
  width: calc(12% * 0.8);
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  text-align: left;
}

#rwTenantRentModal:not([hidden]){
  z-index: 90;
  padding: 0;
  background: transparent;
  align-items: start;
  justify-content: center;
}

.ra-tenant-rent-modal{
  width: 75vw;
  max-width: 75vw;
  height: auto;
  max-height: calc(100dvh - var(--rw-header-h) - 13px);
  overflow: auto;
  background: #e2e8f0;
  border: 2px solid #334155;
  box-shadow: none;
  padding-bottom: 1lh;
  box-sizing: border-box;
}

@media (min-width: 1025px){
  #rwTenantRentModal:not([hidden]){
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px) + 5px);
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: auto;
    max-height: none;
    padding: 0;
    align-items: start;
    justify-content: center;
  }

  #rwTenantRentModal .ra-tenant-rent-modal{
    width: 75vw;
    height: auto;
    max-height: calc(100dvh - var(--rw-header-h) - 13px);
  }
}

@media (max-width: 800px){
  .ra-tenant-rent-modal{
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: 50vh;
  }
}

.ra-tenant-rent-modal{
  display: block;
}

.ra-tenant-rent-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}

.ra-tenant-rent-modal > :not(.ra-tenant-rent-bar){
  grid-column: 1 / -1;
}

#rwTenantRentTitle{
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  text-align: left;
  font-size: 1.15rem;
}

#rwTenantRentClose{
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
}

#rwTenantRentSave{
  flex: 0 0 auto;
  box-sizing: border-box;
  min-width: 90px;
  margin: 0;
}

#rwTenantRentSave{
  height: 38.4px;
  min-height: 38.4px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

#rwTenantRentPickRows tr.is-selected td{
  background: #d4e1ee;
}

#rwTenantRentPickRows tr[data-rw-rent-property]{
  cursor: pointer;
}

.ra-people__stack + .ra-people__stack{
  margin-top: 6px;
}

.ra-tenant-rent-dates{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 0 0 12px;
}

.ra-tenant-rent-dates .ra-people__field{
  flex: 0 1 143px;
  margin: 0;
}

.ra-tenant-rent-dates__gap{
  flex: 1 1 0;
}

#rwTenantRentSearch{
  box-sizing: border-box;
  width: 240px;
  max-width: 100%;
  height: 38.4px;
}

#rwTenantRentPickRows tr.is-taken td{
  color: #94a3b8;
}

#rwTenantRentPickRows tr[data-rw-rent-property]{
  cursor: pointer;
}

.ra-tenant-rental{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  color: #0f172a;
}

.ra-tenant-rental__line{
  color: #0f172a;
}

.ra-tenant-left{
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #102d4e;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

#rwAgentInvoices tr.is-selected td,
#rwPeopleRows tr.is-selected td,
#rwIdleRecentList tr.is-selected td,
#rwTenantConvRows tr.is-selected td{
  background: #d4e1ee;
}
.ra-list-grid--vendor .ra-inv-areas,
.ra-list-grid--vendor .ra-inv-expert{
  width: calc(18% + (18% * 0.1 + 15.9% * 0.65 * 0.1 + 7% * 0.25 + 12% * 0.25 + 12% * 0.3) / 2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rwPeopleRows .ra-list-grid--vendor tr.is-selected,
#rwPeopleRows .ra-list-grid--vendor tr.is-selected td{
  background: #d4e1ee;
}

[data-rw-agent-page="vendors"] #rwPeopleList > .ra-invoice-toolbar,
[data-rw-agent-page="owners"] #rwPeopleList > .ra-invoice-toolbar,
[data-rw-agent-page="agents"] #rwPeopleList > .ra-invoice-toolbar,
[data-rw-agent-page="tenants"] #rwPeopleList > .ra-invoice-toolbar,
#rwIdleHome > .ra-invoice-toolbar,
#rwTenantConvList > .ra-invoice-toolbar{
  flex: 0 0 auto;
  padding-bottom: 0;
}

[data-rw-agent-page="vendors"] #rwPeopleRows,
[data-rw-people-list] #rwPeopleRows,
[data-rw-agent-page="owners"] #rwPeopleRows,
[data-rw-agent-page="agents"] #rwPeopleRows,
[data-rw-agent-page="tenants"] #rwPeopleRows,
#rwIdleRecentList,
#rwTenantConvRows{
  justify-content: flex-start;
  align-content: start;
  margin-top: 0;
}

[data-rw-agent-page="vendors"] #rwPeopleFilters,
[data-rw-agent-page="owners"] #rwPeopleFilters,
[data-rw-agent-page="agents"] #rwPeopleFilters,
[data-rw-agent-page="tenants"] #rwPeopleFilters,
#rwIdleFilters,
#rwTenantConvFilters{
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow-x: auto;
  margin-bottom: 26px;
}

#rwPeopleFilters .ra-owner__field[hidden]{
  display: none !important;
}

[data-rw-agent-page="vendors"] #rwPeopleFilters .ra-owner__field,
[data-rw-agent-page="owners"] #rwPeopleFilters .ra-owner__field,
[data-rw-agent-page="agents"] #rwPeopleFilters .ra-owner__field,
[data-rw-agent-page="tenants"] #rwPeopleFilters .ra-owner__field,
#rwIdleFilters .ra-owner__field,
#rwTenantConvFilters .ra-owner__field{
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  justify-content: start;
  align-items: center;
  column-gap: 4px;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  margin: 0;
  font-size: 0.75rem;
}

[data-rw-agent-page="vendors"] #rwPeopleFilters .ra-owner__field select,
[data-rw-agent-page="owners"] #rwPeopleFilters .ra-owner__field select,
[data-rw-agent-page="agents"] #rwPeopleFilters .ra-owner__field select,
[data-rw-agent-page="tenants"] #rwPeopleFilters .ra-owner__field select,
#rwIdleFilters .ra-owner__field select,
#rwTenantConvFilters .ra-owner__field select{
  width: 70%;
  max-width: 70%;
  min-width: 0;
  justify-self: start;
  height: 32px;
  padding: 0 6px;
  border-radius: 4px;
}

.ra-people__pair:not(:has(> :not([hidden]))){
  display: none !important;
}

@media (min-width: 1025px){
  #rwPeopleForm.ra-people__form--sheet .ra-people__pair{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
  }
}

table.ra-invoice-grid thead th,
table.ra-list-grid thead th{
  background: #456888 !important;
  color: #fff !important;
  font-size: 14px !important;
}

#rwChatPanel.ra-portal__chat--thread .ra-portal__chat-title-bar{
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  align-self: stretch;
  column-gap: 8px;
  flex: 0 0 auto;
  flex-direction: row;
  width: 100%;
  max-width: none;
  min-height: 0;
  height: auto;
  margin: 0;
  box-sizing: border-box;
  padding: 8px 12px !important;
  background: #d1d5db !important;
  border-radius: 16px 16px 0 0;
}

#rwChatPanel.ra-portal__chat--thread #rwChatCloseBtn{
  grid-column: 1;
  grid-row: 1 / span 2;
}

#rwChatPanel.ra-portal__chat--thread #rwChatTitleText{
  grid-column: 2;
  grid-row: 1;
}

#rwChatPanel.ra-portal__chat--thread #rwChatTitlePlace{
  grid-column: 2;
  grid-row: 2;
}

#rwChatPanel.ra-portal__chat--thread #rwAddVendorBtn{
  grid-column: 3;
  grid-row: 1 / span 2;
}

#rwChatPanel.ra-portal__chat--thread .ra-list-x{
  grid-column: 4;
  grid-row: 1 / span 2;
  position: static !important;
  top: auto !important;
  align-self: center !important;
  margin: 0 !important;
  background: transparent !important;
}

#rwChatPanel.ra-portal__chat--thread #rwChatCloseBtn,
#rwChatPanel.ra-portal__chat--thread #rwAddVendorBtn{
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  transform: none !important;
  width: auto;
  height: 32px;
  min-height: 32px;
}

@media (min-width: 1025px){
#rwChatPanel.ra-portal__chat--thread #rwConversationBox{
  top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px) + 5px) !important;
  left: calc(var(--rw-side-nav, 144px) + (100vw - var(--rw-side-nav, 144px)) * 0.15) !important;
  right: auto !important;
  bottom: 16px !important;
  width: calc((100vw - var(--rw-side-nav, 144px)) * 0.7) !important;
  height: auto !important;
  max-height: none !important;
  background: #fff !important;
  padding: 0 !important;
  border: 2px solid #334155 !important;
  border-radius: 16px !important;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45) !important;
  overflow: hidden !important;
}

#rwChatPanel.ra-portal__chat--thread #rwChatScroll{
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
  padding-bottom: 72px;
  box-sizing: border-box;
}

#rwChatPanel.ra-portal__chat--thread #rwChatFooter{
  position: fixed !important;
  z-index: 81;
  left: calc(var(--rw-side-nav, 144px) + (100vw - var(--rw-side-nav, 144px)) * 0.15) !important;
  right: auto !important;
  bottom: 16px !important;
  width: calc((100vw - var(--rw-side-nav, 144px)) * 0.7) !important;
  margin: 0 !important;
  padding: 8px 12px 12px !important;
  background: #fff !important;
  border: 2px solid #334155 !important;
  border-top: 0 !important;
  border-radius: 0 0 16px 16px !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}
}

.ra-estimate-footer,
.ra-people__add-prop,
.ra-people__other-row button,
.ra-people__actions button[type="submit"],
.ra-invoice-filter,
.ra-mobile-back,
#rwTenantLeasesEdit,
#rwChatBackBtn,
body.ra-portal--owner #rwChatPanel .ra-portal__idle-btn,
body.ra-portal--tenant #rwChatPanel .ra-portal__idle-btn,
body.ra-portal--agent #rwChatPanel .ra-portal__idle-btn,
body.ra-portal--vendor #rwChatPanel .ra-portal__idle-btn,
[data-rw-vendor-page="ledger"] > #rwVendorLedgerDetail:not([hidden]) .ra-owner__back,
[data-rw-owner-page="ledger"] > [data-rw-owner-bill-back]:not([hidden]),

#rwAgentOwnerInvoiceForm > .ra-estimate-footer{
  display: none !important;
}

/* Financials → Owners, Tenants, Vendors: the settings gear shares the filter button's look, but stays shown. */
.ra-invoice-filter.ra-page-settings{
  display: grid !important;
}

/* Icon only on every design: the gear and its aria-label say it. */
.ra-page-settings .ra-invoice-filter__label{
  display: none !important;
}

#rwAgentOwnerInvoiceLinePage > .ra-estimate-footer,
#rwVendorInvoiceLinePage > .ra-estimate-footer{
  position: static !important;
  left: auto;
  right: auto;
  bottom: auto;
  display: flex !important;
  min-height: 0;
  justify-content: stretch;
  margin: 0;
  padding: 0;
  background: transparent;
}

#rwAgentOwnerInvoiceLineSave,
#rwVendorInvoiceLineSave{
  flex: none;
  width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 16px rgba(11, 35, 64, 0.2);
  color: #fff;
  font: inherit;
  font-weight: 700;
}

#rwAgentOwnerInvoiceLinePage .ra-estimate-line-page__fields,
#rwVendorInvoiceLinePage .ra-estimate-line-page__fields{
  padding-bottom: 0;
}

#rwAgentOwnerInvoiceLineHint,
#rwVendorInvoiceLineHint{
  margin: 0;
}

#rwAgentOwnerInvoiceLineText,
#rwVendorInvoiceLineText{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-weight: 400;
  resize: none;
  overflow: hidden;
  min-height: 44px;
}

#rwVendorInvoiceForm > .ra-estimate-footer,
#rwBankForm > .ra-estimate-footer{
  position: static !important;
  left: auto;
  right: auto;
  bottom: auto;
  min-height: 0;
  justify-content: center;
  margin: 12px 0 0;
  padding: 0;
  background: transparent;
}

#rwBankSave,
#rwBankDelete{
  box-sizing: border-box;
  flex: 1 1 116px;
  width: 116px;
  min-width: 116px;
  height: 38.4px;
  min-height: 38.4px;
  max-height: 38.4px;
  padding: 0 16px;
}

#rwBankDelete{
  background: #b91c1c;
  box-shadow: none;
}

#rwBankDelete[hidden]{
  display: none !important;
}

#rwAgentEstimateCreateSend,
#rwAgentEstimateSaveLines,
#rwVendorEstimateSave,
#rwVendorInvoiceSend,
#rwAgentOwnerInvoicePost{
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 16px rgba(11, 35, 64, 0.2);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

#rwAgentOwnerInvoicePost{
  margin-top: 26px;
}

#rwAgentOwnerInvoiceForm{
  padding-bottom: 0;
}

#rwAgentOwnerInvoiceForm .ra-estimate-story{
  padding-bottom: 1lh;
}

#rwAgentOwnerInvoiceHint:empty,
#rwVendorInvoiceHint:empty,
#rwAgentOwnerInvoiceEstimateHint:empty,
#rwVendorInvoiceEstimateHint:empty,
#rwAgentOwnerInvoiceLineHint:empty,
#rwVendorInvoiceLineHint:empty{
  display: block;
  min-height: 1lh;
}

#rwOwnerPropertiesGrid .ra-list-grid{
  width: 100%;
  table-layout: fixed;
}

#rwOwnerPropertiesGrid .ra-inv-date{ width: calc(18% * 0.9); }
#rwOwnerPropertiesGrid col.ra-inv-status,
#rwOwnerPropertiesGrid .ra-inv-status{
  width: calc(92px * 0.6 * 0.6 * 4) !important;
  max-width: calc(92px * 0.6 * 0.6 * 4) !important;
  min-width: 0 !important;
  overflow: hidden;
}
#rwOwnerPropertiesGrid .ra-inv-source{ width: calc(24% * 0.85); }
#rwOwnerPropertiesGrid .ra-inv-total{ width: calc(29% * 0.9); }
#rwOwnerPropertiesGrid .ra-inv-address{ width: auto; }

#rwAgentPropertyList .ra-list-grid--property .ra-inv-date{ width: calc(15.9% * 0.65); }
#rwAgentPropertyList .ra-list-grid--property .ra-inv-name{ width: calc((18.3% - 25px) * 0.75); }
#rwAgentPropertyList > table.ra-list-grid--property,
#rwOwnerPropertyList > table.ra-list-grid--property,
#rwOwnerPropertiesGrid > table{
  table-layout: fixed;
}
#rwAgentPropertyList .ra-list-grid--property col.ra-inv-status,
#rwAgentPropertyList .ra-list-grid--property .ra-inv-status,
#rwOwnerPropertyList .ra-list-grid--property col.ra-inv-status,
#rwOwnerPropertyList .ra-list-grid--property .ra-inv-status{
  width: calc(92px * 0.6 * 0.6 * 4) !important;
  max-width: calc(92px * 0.6 * 0.6 * 4) !important;
  min-width: 0 !important;
  overflow: hidden;
}
#rwAgentPropertyList .ra-list-grid--property .ra-inv-address{ width: calc((24.3% - 20px) * 1.2); }
#rwAgentPropertyList .ra-list-grid--property .ra-inv-source{ width: calc(9.9% * 1.2); }
#rwAgentPropertyList .ra-list-grid--property .ra-inv-total{ width: auto; }
#rwAgentPropertyList .ra-list-grid--property .ra-inv-months{ width: 72px; max-width: 72px; }
#rwAgentPropertyList .ra-list-grid--property .ra-inv-months-total{ width: 104px; max-width: 104px; }
#rwAgentPropertyList .ra-inv-months,
#rwAgentPropertyList .ra-inv-months-total{
  overflow: hidden;
  white-space: nowrap;
  vertical-align: middle;
}

#rwAgentPropertyList .ra-inv-source,
#rwAgentPropertyList .ra-inv-total{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

#rwAgentPropertyList .ra-people__stack span{
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rwAgentPropertyList .ra-people__stack span + span{
  margin-top: 4px;
}

.ra-property-history{
  font-size: 0.85rem;
  white-space: nowrap;
  cursor: pointer;
}

#rwAgentPropertyHistory{
  margin: 0;
  cursor: pointer;
}

.ra-portal__primary-btn,
.ra-estimate-footer button,
#rwTenantRentProperty,
#rwTenantRentSave,
#rwAgentEstimateCreateSend,
#rwAgentEstimateSaveLines,
#rwAgentEstimateDetail > .ra-estimate-footer button,
#rwOwnerEstimateDetail > .ra-estimate-footer button,
#rwVendorEstimateDetail > .ra-estimate-footer button,
#rwVendorEstimateForm > .ra-estimate-footer button,
#rwAgentOwnerInvoiceDetail > .ra-estimate-footer button,
#rwOwnerTxDetail > .ra-estimate-footer button,
#rwVendorInvoiceDetail > .ra-estimate-footer button,
#rwPeopleFormFooter button,
#rwChatBackFooter button,
#rwAgentPropertyDetail > .ra-owner__back,
.ra-mobile-back,
#rwChatBackBtn,
#rwTenantLeasesEdit,
#rwEstimatePhotoPage #rwEstimatePhotoSave{
  border-radius: 10px;
}

.ra-list-grid--talk .ra-inv-date{ width: calc(11% * 0.6 * 0.7 * 0.6 * 4); }
.ra-list-grid--talk .ra-inv-source{ width: calc(10% * 0.85 * 0.7 * 0.85 * 1.1); }
.ra-list-grid--talk .ra-inv-name{ width: calc(18% * 0.8); }
.ra-list-grid--talk .ra-inv-age{ width: calc(7% * 0.9); }
.ra-list-grid--talk .ra-inv-updated{ width: 9%; }
.ra-list-grid--talk .ra-inv-status{ width: calc(14% * 0.7); }
.ra-list-grid--talk .ra-inv-address{ width: auto; }

#rwAppConfirm{
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  justify-content: center;
  align-items: start;
  align-content: start;
}

#rwAppConfirm .ra-portal__modal{
  min-height: 0;
  padding: 16px 14px 1lh !important;
  box-sizing: border-box;
}

#rwEstimateReadyYes,
#rwAppConfirmYes{
  background: var(--rw-navy-shine) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

#rwAgentEstimateAddPhotos{
  display: inline;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#rwEstimatePhotoPage #rwEstimatePhotoBack{
  display: none !important;
}

#rwAgentEstimateDetail:has(#rwAgentOwnerEstimateHead:not([hidden])) > .ra-list-x{
  display: none !important;
}

#rwAgentEstimateToOwner[hidden]{
  display: none !important;
}

#rwAgentEstimateToOwner:not([hidden]){
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#rwAgentEstimateSaveLines{
  align-self: flex-end;
}

.ra-estimate-owner-line{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

#rwAgentOwnerEstimateHead .ra-estimate-pair{
  --ra-estimate-label: max-content;
  width: auto;
  margin: 0;
  grid-template-columns: max-content 14rem;
}

#rwAgentOwnerEstimateHead .ra-estimate-pair select,
#rwAgentOwnerEstimateHead .ra-estimate-pair .ra-estimate-search{
  width: 14rem;
  max-width: 40vw;
}

#rwAgentOwnerEstimateHead .ra-estimate-form-head{
  align-items: center;
}

#rwAgentEstimateFilters,
#rwAgentPropertyFilters{
  flex-wrap: nowrap;
}

#rwPropertyCancel{
  display: none !important;
}

#rwPropertyForm:not([hidden]){
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  align-items: center;
  column-gap: 8px;
}

#rwPropertyForm:not([hidden]) > #rwPropertyActions{
  grid-column: 1 / -1;
  order: 40;
  position: static;
  top: auto;
  z-index: auto;
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 26px 0 0;
  background: transparent;
}

#rwPropertyForm:not([hidden]) > #rwPropertyTitle{
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

#rwPropertyForm:not([hidden]) > .ra-list-x{
  display: inline-grid !important;
  grid-column: 2;
  grid-row: 1;
  position: static !important;
  top: auto !important;
  align-self: center !important;
  justify-self: end;
  margin: 0 !important;
  background: transparent !important;
}

#rwPropertyForm:not([hidden]) > :not(#rwPropertyActions):not(#rwPropertyTitle):not(.ra-list-x){
  grid-column: 1 / -1;
}

#rwPropertyForm #rwPropertySave{
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 176px;
  min-width: 176px;
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
}

#rwPropertyForm > .ra-property-form-gap{
  height: 0;
  margin: 0;
}

@media (min-width: 1025px){
  #rwVendorBillAddressField,
  #rwVendorLedgerFilterActions,
  #rwVendorLedgerFilters{
    display: none !important;
  }

  #rwPropertyForm .ra-property-top{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .ra-invoice-filters .ra-owner__field select,
  #rwAgentInvoiceFilters .ra-owner__field select{
    font-size: 0.75rem;
    font-weight: 400;
    height: 32px;
  }

  #rwPropertyForm .ra-property-top .ra-people__field{
    max-width: none;
    min-width: 0;
  }

  #rwAgentEstimateFilters .ra-owner__field,
  #rwAgentPropertyFilters .ra-owner__field{
    grid-template-columns: auto minmax(9rem, 14.4rem);
    margin-right: 12px;
  }

  #rwAgentEstimateLinePage .ra-estimate-tax-amount,
  #rwVendorEstimateLinePage .ra-estimate-tax-amount{
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    gap: 12px;
  }

  #rwAgentEstimateLinePage .ra-estimate-tax-amount input,
  #rwVendorEstimateLinePage .ra-estimate-tax-amount input{
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #rwVendorBillRows > table.ra-invoice-grid--pay{
    table-layout: fixed;
  }

  #rwVendorBillRows .ra-inv-date{
    width: calc(15.9% * 0.8 * 1.1);
    max-width: calc(15.9% * 0.8 * 1.1);
  }

  body.ra-portal--vendor .ra-list-grid--talk .ra-portal__unread-dot{
    display: none !important;
  }

  #rwAgentEstimateForm:not([hidden]),
  #rwEmailInvoiceForm:not([hidden]),
  #rwAgentInvoiceEstimatePick:not([hidden]),
  #rwAgentOwnerInvoiceEstimatePick:not([hidden]),
  #rwVendorInvoiceEstimatePick:not([hidden]),
  #rwAgentOwnerInvoiceLinePage:not([hidden]),
  #rwVendorInvoiceLinePage:not([hidden]){
    position: fixed !important;
    z-index: 90;
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px) + 5px) !important;
    left: 25vw !important;
    width: 50vw !important;
    max-width: 50vw !important;
    height: auto !important;
    max-height: calc(100dvh - var(--rw-header-h) - 13px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: auto !important;
    margin: 0 !important;
    background: #e2e8f0;
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 16px 20px 1.25em;
    padding-bottom: 1lh;
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
  }

  #rwAgentOwnerInvoiceForm:not([hidden]) .ra-estimate-story{
    padding-bottom: 1lh;
  }

  #rwAgentEstimateForm:not([hidden]) input,
  #rwAgentEstimateForm:not([hidden]) select,
  #rwAgentEstimateForm:not([hidden]) textarea,
  #rwVendorInvoiceForm:not([hidden]) input,
  #rwVendorInvoiceForm:not([hidden]) select,
  #rwAgentUploadForm:not([hidden]) select,
  #rwVendorInvoiceForm:not([hidden]) textarea,
  #rwEmailInvoiceForm:not([hidden]) input,
  #rwEmailInvoiceForm:not([hidden]) select,
  #rwEmailInvoiceForm:not([hidden]) textarea{
    background: #fff;
  }

  .ra-owner__page:has(#rwAgentInvoiceEstimatePick:not([hidden])) #rwAgentInvoiceListView[hidden],
  .ra-owner__page:has(#rwAgentOwnerInvoiceEstimatePick:not([hidden])) #rwAgentOwnerInvoiceListPane[hidden],
  .ra-owner__page:has(#rwVendorInvoiceEstimatePick:not([hidden])) #rwVendorInvoiceListPane[hidden]{
    display: none !important;
  }

  #rwVendorBillRows .ra-inv-address{
    width: calc((24.3% - 20px) * 0.6);
    max-width: calc((24.3% - 20px) * 0.6);
  }

  #rwVendorBillRows .ra-inv-paid,
  #rwVendorBillRows .ra-inv-total{
    width: 10.3%;
    max-width: 10.3%;
  }

  #rwVendorBillRows .ra-inv-status{
    width: calc(11% + 45px);
    max-width: calc(11% + 45px);
  }

  #rwAgentEstimateLinePage:not([hidden]),
  #rwVendorEstimateLinePage:not([hidden]){
    position: fixed !important;
    z-index: 80;
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px) + 5px) !important;
    left: 25vw !important;
    width: 50vw !important;
    max-width: 50vw !important;
    height: auto !important;
    max-height: calc(100dvh - var(--rw-header-h) - 13px) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: auto !important;
    margin: 0 !important;
    background: #e2e8f0;
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 16px 20px 1lh;
    box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
  }

  #rwAgentPropertyDetail:not([hidden]),
  #rwAgentEstimateDetail:not([hidden]),
  #rwOwnerEstimateDetail:not([hidden]),
  #rwVendorEstimateForm:not([hidden]),
  #rwVendorEstimateDetail:not([hidden]),
  #rwAgentOwnerDetail:not([hidden]),
  #rwAgentTenantDetail:not([hidden]),
  #rwOwnerDetail:not([hidden]){
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: start;
    align-items: center;
    column-gap: 8px;
  }

  #rwAgentPropertyDetail:not([hidden]) > .ra-list-x,
  #rwAgentEstimateDetail:not([hidden]) > .ra-list-x,
  #rwOwnerEstimateDetail:not([hidden]) > .ra-list-x,
  #rwVendorEstimateForm:not([hidden]) > .ra-list-x,
  #rwVendorEstimateDetail:not([hidden]) > .ra-list-x,
  #rwAgentOwnerDetail:not([hidden]) > .ra-list-x,
  #rwAgentTenantDetail:not([hidden]) > .ra-list-x,
  #rwOwnerDetail:not([hidden]) > .ra-list-x{
    grid-column: 2;
    grid-row: 1;
    position: static !important;
    align-self: center !important;
    justify-self: end;
    margin: 0 !important;
  }

  #rwAgentPropertyDetail:not([hidden]) > .ra-owner__title,
  #rwAgentEstimateDetail:not([hidden]) > .ra-owner__title,
  #rwOwnerEstimateDetail:not([hidden]) > .ra-owner__title,
  #rwVendorEstimateDetail:not([hidden]) > .ra-owner__title,
  #rwAgentOwnerDetail:not([hidden]) > .ra-owner__title,
  #rwAgentTenantDetail:not([hidden]) > .ra-owner__title,
  #rwOwnerDetail:not([hidden]) > .ra-owner__title{
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }

  #rwAgentEstimateDetail:not([hidden]) > .ra-owner__title,
  #rwOwnerEstimateDetail:not([hidden]) > .ra-owner__title,
  #rwVendorEstimateDetail:not([hidden]) > .ra-owner__title,
  #rwVendorEstimateForm:not([hidden]) > .ra-owner__title{
    grid-column: 1 / -1;
    margin: 0 0 1lh;
    text-align: center;
    font-size: 1.15rem;
  }

  #rwAgentPropertyDetail:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title),
  #rwAgentEstimateDetail:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title),
  #rwOwnerEstimateDetail:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title),
  #rwVendorEstimateForm:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title):not(.ra-estimate-save-v),
  #rwVendorEstimateDetail:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title),
  #rwAgentOwnerDetail:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title),
  #rwAgentTenantDetail:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title),
  #rwOwnerDetail:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title){
    grid-column: 1 / -1;
  }
}

#rwAgentEstimateLinePage .ra-portal__chat-title-bar{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#rwVendorEstimateLinePage:not([hidden]){
  padding-bottom: 1lh;
}

#rwAgentEstimateLinePage .ra-list-x,
.ra-estimate-line-page .ra-list-x{
  display: inline-grid !important;
  position: static !important;
  top: auto !important;
  right: auto !important;
  margin: 0 0 0 auto !important;
  justify-self: end;
  background: transparent !important;
}

#rwAgentEstimateProperty:has(option[value=""]:checked){
  color: #b91c1c;
}

#rwAgentEstimateVendorLabel:empty::before{
  content: "Select vendor";
  color: #b91c1c;
}

#rwAgentEstimateDesc::placeholder{
  color: #b91c1c;
  opacity: 1;
}

#rwAgentEstimateLinePage .ra-portal__chat-title-text{
  font-size: 1.35rem;
}

#rwAgentEstimateLinePage .ra-estimate-line-page__fields,
#rwAgentEstimateLinePage .ra-estimate-tax-amount,
#rwAgentEstimateLinePage .ra-estimate-tax-included,
#rwAgentEstimateLinePage input{
  font-size: 15px;
  gap: 12px;
}

#rwAgentEstimateLinePage .ra-estimate-footer,
.ra-estimate-line-page > .ra-estimate-footer{
  justify-content: center;
  background: transparent;
  margin-top: 26px;
  padding: 0 0 12px;
}

#rwAgentEstimateLinePage .ra-estimate-line-page__fields,
#rwVendorEstimateLinePage .ra-estimate-line-page__fields{
  padding-bottom: 0;
}

#rwAgentEstimateLinePage > .ra-estimate-footer,
#rwVendorEstimateLinePage > .ra-estimate-footer{
  position: static !important;
  left: auto;
  right: auto;
  bottom: auto;
  min-height: 0;
  margin: 26px 0;
  padding: 0;
}

#rwAgentEstimateLinePage #rwAgentEstimateLineBack,
#rwVendorEstimateLinePage #rwVendorEstimateLineBack{
  display: none !important;
}

body:has(#rwAgentEstimateLinePage:not([hidden])) #rwMobileBack,
body:has(#rwVendorEstimateLinePage:not([hidden])) #rwMobileBack{
  display: none !important;
}

#rwAgentEstimateLinePage #rwAgentEstimateLineSave,
.ra-estimate-line-page [id$="LineSave"]{
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 144px;
  min-width: 144px;
  height: 43.2px;
  min-height: 43.2px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--rw-navy-shine);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.ra-dash__activity-board{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 24px;
  align-items: start;
}

#rwAgentDashRecentConversationRow{ grid-column: 1; grid-row: 1; }
#rwAgentDashRecentInvoiceRow{ grid-column: 2; grid-row: 1; }
.ra-dash__activity-gap{
  grid-column: 1 / -1;
  grid-row: 2;
  height: 28px;
}
#rwAgentDashRecentEstimateRow{ grid-column: 1; grid-row: 3; }
.ra-dash__activity--blank{ grid-column: 2; grid-row: 3; min-height: 1px; }

.ra-dash__activity-board .ra-dash__activity{
  margin-top: 0;
}

.ra-home__rentals{
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

#rwRentals{
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  min-height: calc(100dvh - var(--rw-header-h));
  padding: 16px 16px 48px;
  background: #e2e8f0;
  overflow: auto;
}

#rwRentals[hidden]{
  display: none !important;
}

body:has(#rwRentals:not([hidden])){
  height: auto;
  min-height: 100dvh;
  overflow: auto;
}

body:has(#rwRentals:not([hidden])) #rwRentalsLink,
body:has(#rwRentals:not([hidden])) #rwRentalsClose,
body:has(#rwRentals:not([hidden])) .ra-owner__nav{
  display: none !important;
}

body:has(#rwRentals:not([hidden])) .ra-portal__main{
  display: block !important;
  grid-template-columns: none !important;
}

body:has(#rwRentals:not([hidden])) #rwRentals{
  height: auto;
  min-height: calc(100dvh - var(--rw-header-h));
}

.ra-rentals__top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.ra-rentals__top-side{
  flex: 1 1 0;
  min-width: 0;
  max-width: 46%;
}

.ra-rentals__top-side--end{
  margin-left: auto;
}

.ra-rentals__consult,
.ra-rentals__banner{
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  white-space: pre-wrap;
}

.ra-rentals__consult{
  text-align: right;
}

.ra-rentals__banner{
  text-align: left;
}

.ra-rentals__banner[hidden],
.ra-rentals__line-form[hidden],
#rwRentalTitleForm[hidden],
#rwRentalPreview[hidden],
#rwRentalIntroSave[hidden],
#rwRentalIntroStatus[hidden],
#rwRentalBgLabel[hidden]{
  display: none !important;
}

.ra-rentals__bg{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.ra-rentals__bg input{
  width: 28px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ra-rentals__header-status{
  margin: 0;
  color: #86efac;
  font-size: 0.85rem;
  font-weight: 700;
}

.ra-rentals__header-status.is-error{
  color: #fdba74;
}

.ra-rentals__line-form{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.ra-rentals__line-form input,
#rwRentalTitleInput{
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  font: inherit;
  font-size: 1rem;
}

/* Visitors' quiet way back to the home page; signed-in users have their menu. */
.ra-rentals__back{
  align-self: flex-start;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  opacity: 0.75;
  cursor: pointer;
}

.ra-rentals__back:hover{
  opacity: 1;
  text-decoration: underline;
}

body.ra-portal--signed-in .ra-rentals__back{
  display: none;
}

.ra-rentals__lead{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  margin-top: 36px;
  text-align: center;
}

.ra-rentals__title{
  width: 75%;
  align-self: center;
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
}

#rwRentalApplyOnline,
#rwRentalSearchSubmit{
  border: 0;
  border-radius: 12px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 16px rgba(11, 35, 64, 0.2);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 28px;
  cursor: pointer;
}

.ra-rentals__pitch{
  margin: 0;
  width: 100%;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ra-rentals__pitch[hidden],
.ra-rentals__pitch-form[hidden]{
  display: none !important;
}

.ra-rentals__pitch-form{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 75%;
}

#rwRentalPitchInput{
  width: 100%;
  min-height: 7.5rem;
  box-sizing: border-box;
  text-align: left;
  font: inherit;
  font-size: 1rem;
  line-height: 1.45;
  resize: vertical;
}

.ra-rentals__pitch-save{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.ra-rentals__align{
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.ra-rentals__align button{
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #6d8299;
  border-radius: 4px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.ra-rentals__align button.is-on{
  background: #d4e1ee;
}

.ra-rentals__mini-save{
  border: 0;
  border-radius: 8px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 3px 8px;
  cursor: pointer;
}

.ra-rentals__pitch-status{
  margin: 0;
  color: #166534;
  font-size: 0.85rem;
  font-weight: 700;
}

.ra-rentals__pitch-status.is-error{
  color: #b45309;
}

.ra-rentals__pitch-status[hidden]{
  display: none !important;
}

.ra-rentals__search{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
}

.ra-rentals__search-row{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 28px;
}

.ra-rentals__search-row label,
.ra-rentals__search-field{
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 600;
}

.ra-rentals__search input,
.ra-rentals__search select{
  width: 9rem;
  height: calc(24.67px * 1.3);
  box-sizing: border-box;
  text-align: left;
}

.ra-rentals__search-field select{
  width: calc(18rem + 28px);
}

body.ra-portal--signed-in #rwRentals{
  height: 100%;
  min-height: 0;
}

.ra-rentals__bar{
  display: flex;
  align-items: center;
  gap: 12px;
}

.ra-rentals__bar h2,
.ra-rentals__bar h3{
  margin: 0;
  flex: 1 1 auto;
}

#rwRentalsClose,
#rwRentalGalleryClose,
#rwRentalApplyClose,
#rwRentalPhotoClose,
#rwRentalApplicationDetailClose{
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ra-rentals__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 20px;
  align-items: start;
  box-sizing: border-box;
  width: 100%;
  padding: 0 100px;
}

.ra-rentals__card{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.ra-rentals__facts{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  line-height: 1.15;
}

.ra-rentals__shot{
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #dbe3ee;
  cursor: pointer;
}

.ra-rentals__shot img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #dbe3ee;
}

#rwRentalGalleryImg,
#rwRentalPhotoImg{
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: cover;
  background: #dbe3ee;
  border-radius: 12px;
}

#rwRentalGalleryImg[hidden],
#rwRentalPhotoImg[hidden],
#rwRentalGalleryEmpty[hidden],
#rwRentalCall[hidden],
#rwRentalDetailPhone[hidden],
#rwRentalDetailPane[hidden],
#rwRentalMapPane[hidden],
.ra-rentals__viewer[hidden]{
  display: none !important;
}

.ra-rentals__placeholder{
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 140px;
  color: #64748b;
  font-size: 0.9rem;
}

.ra-rentals__words,
.ra-rentals__kind,
.ra-rentals__count{
  width: 100%;
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: center;
}

.ra-rentals__card textarea,
.ra-rentals__card input,
.ra-rentals__card select,
.ra-rentals__price input,
.ra-rentals__rooms input{
  box-sizing: border-box;
  font: inherit;
  text-align: center;
}

.ra-rentals__grid--edit .ra-rentals__card{
  border: 1px solid #94a3b8;
  padding: 8px;
  background: rgba(255, 255, 255, 0.45);
}

.ra-rentals__price{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
}

.ra-rentals__price input{
  width: 6rem;
  margin-left: 4px;
  margin-right: 1ch;
}

.ra-rentals__rooms{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  line-height: 1.15;
  color: #0f172a;
  font-size: 0.95rem;
}

.ra-rentals__rooms input{
  width: 3.2rem;
}

.ra-rentals__address{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
}

.ra-rentals__address input{
  flex: 1;
  min-width: 0;
  width: auto;
  text-align: center;
}

.ra-rentals__available{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
}

.ra-rentals__available input{
  width: 9rem;
  text-align: center;
}

#rwRentalAdd{
  margin-top: 8px;
}

#rwRentalSearchSubmit:disabled{
  opacity: 0.45;
  cursor: default;
}

.ra-rentals__remove,
.ra-rentals__add-photo,
.ra-rentals__actions button,
.ra-rentals__form-actions button,
#rwRentalAdd{
  border: 0;
  border-radius: 10px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
}

.ra-rentals__add-photo{
  display: inline-flex;
  width: fit-content;
}

.ra-rentals__actions,
.ra-rentals__form-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ra-rentals__composer{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-sizing: border-box;
  width: 100%;
  padding: 0 100px 8px;
}

.ra-rentals__composer[hidden]{
  display: none !important;
}

.ra-rentals__composer-shot,
.ra-rentals__composer-field,
.ra-rentals__composer .ra-rentals__price,
.ra-rentals__composer .ra-rentals__rooms,
.ra-rentals__composer .ra-rentals__available{
  width: calc((100% - 40px) / 3);
}

.ra-rentals__composer-shot{
  cursor: pointer;
}

.ra-rentals__composer-field{
  display: grid;
  gap: 4px;
  margin: 0;
}

.ra-rentals__composer-field input,
.ra-rentals__composer-field textarea,
.ra-rentals__composer-field select{
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font: inherit;
}

.ra-rentals__sheet{
  position: fixed;
  z-index: 40;
  inset: calc(var(--rw-header-h) + 12px) 12px 12px;
  overflow: auto;
  box-sizing: border-box;
  padding: 16px;
  border: 2px solid #334155;
  border-radius: 16px;
  background: #e2e8f0;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
}

.ra-rentals__sheet[hidden]{
  display: none !important;
}

#rwRentalApply{
  left: 10%;
  right: 10%;
}

.ra-rentals__apply,
.ra-rentals__apply legend,
.ra-rentals__apply label,
.ra-rentals__apply p,
.ra-rentals__fine{
  font-size: 13.8px;
  line-height: 1.35;
}

.ra-rentals__apply input:not([type="checkbox"]),
.ra-rentals__apply select{
  box-sizing: border-box;
  min-height: 27.6px;
}

.ra-rentals__apply textarea{
  box-sizing: border-box;
  min-height: 55.2px;
}

.ra-rentals__apply-read{
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.ra-rentals__apply-read div{
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 12px;
}

.ra-rentals__apply-read dt,
.ra-rentals__apply-read dd{
  margin: 0;
}

#rwRentalApplications tr[data-rw-application]{
  cursor: pointer;
}

#rwRentalApplications td:last-child{
  white-space: nowrap;
}

#rwRentalApplications td:last-child button + button{
  margin-left: 4px;
}

.ra-rentals__detail{
  background: #fff;
}

.ra-rentals__detail-col{
  width: 100%;
  margin: 0 auto;
  text-align: left;
  color: #0f172a;
}

.ra-rentals__detail-top{
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.ra-rentals__inquire{
  margin: 8px 0 0;
  padding: 14px 16px;
  border: 1px solid #6d8299;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

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

.ra-rentals__inquire-head h4{
  margin: 0;
}

.ra-rentals__inquire-head a{
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.ra-rentals__detail-photo{
  display: block;
  width: 100%;
  margin: 8px 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ra-rentals__detail-street,
.ra-rentals__detail-city{
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}

.ra-rentals__detail-rent{
  margin: 14px 0 0;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.ra-rentals__detail-currency{
  margin: 2px 0 12px;
  color: #64748b;
  font-size: 0.95rem;
}

.ra-rentals__detail h4{
  margin: 18px 0 8px;
  font-size: 1.15rem;
}

.ra-rentals__specs{
  display: grid;
  margin: 0 0 12px;
}

.ra-rentals__specs div{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid #e4ebf2;
}

.ra-rentals__specs dt,
.ra-rentals__specs dd{
  margin: 0;
}

.ra-rentals__tabs{
  display: flex;
  gap: 18px;
  margin-top: 8px;
  border-bottom: 1px solid #cbd5e1;
}

.ra-rentals__tabs button{
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
  padding: 8px 0;
  cursor: pointer;
}

.ra-rentals__tabs button.is-on{
  border-bottom-color: #102d4e;
}

#rwRentalDetailBlurb{
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.45;
}

#rwRentalMapFrame{
  display: block;
  width: 100%;
  height: 280px;
  margin-top: 12px;
  border: 0;
}

.ra-rentals__agent{
  margin: 0;
}

.ra-rentals__call{
  display: inline-flex;
  margin: 8px 0 12px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

#rwRentalInquire button{
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 0;
  border-radius: 10px;
  background: var(--rw-navy-shine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
}

.ra-rentals__detail .ra-rentals__inquire label{
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.ra-rentals__inquire textarea{
  min-height: 72px;
  resize: vertical;
}

@media (max-width: 1024px){
  .ra-rentals__detail-top{
    grid-template-columns: 1fr;
  }
}

.ra-rentals__viewer{
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.72);
}

.ra-rentals__viewer-frame{
  position: relative;
  width: min(960px, 92vw);
}

#rwRentalPhotoImg{
  max-height: 82vh;
  object-fit: contain;
  background: #0f172a;
}

#rwRentalPhotoClose{
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
}

.ra-rentals__viewer-arrow{
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 44px;
  height: 72px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

#rwRentalGalleryPrev{ left: 8px; }
#rwRentalGalleryNext{ right: 8px; }

.ra-rentals__sheet label,
.ra-rentals__sheet fieldset{
  display: grid;
  gap: 4px;
  margin: 0 0 10px;
}

.ra-rentals__sheet fieldset{
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
}

.ra-rentals__consent{
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

#rwRentalApplications{
  overflow-x: auto;
  min-width: 0;
  touch-action: pan-x pan-y;
}

@media (min-width: 1024px){
  [data-rw-agent-page="applications"]{
    box-sizing: border-box;
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (min-width: 1025px){
  .ra-rentals__apply input,
  .ra-rentals__apply select,
  .ra-rentals__apply textarea{
    font-size: 13.8px;
  }
}

@media (max-width: 1024px){
  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="properties"]:not([hidden])),
  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="estimates"]:not([hidden])),
  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="owners"]:not([hidden])),
  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="agents"]:not([hidden])),
  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="tenants"]:not([hidden])),
  body.ra-portal--agent .ra-owner__pages:has([data-rw-agent-page="vendors"]:not([hidden])),
  body.ra-portal--agent #rwChatPanel:not(.ra-portal__chat--thread){
    min-width: 0;
    overflow-x: hidden;
    touch-action: pan-x pan-y;
  }

  body.ra-portal--agent .ra-owner__page[data-rw-agent-page="properties"],
  body.ra-portal--agent .ra-owner__page[data-rw-agent-page="estimates"],
  body.ra-portal--agent .ra-owner__page[data-rw-agent-page="owners"],
  body.ra-portal--agent .ra-owner__page[data-rw-agent-page="agents"],
  body.ra-portal--agent .ra-owner__page[data-rw-agent-page="tenants"],
  body.ra-portal--agent .ra-owner__page[data-rw-agent-page="vendors"]{
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.ra-portal--agent #rwPeople,
  #rwBankAccounts:not([hidden]){
    width: 100%;
    max-width: none;
  }

  #rwBankAccounts:not([hidden]){
    box-sizing: border-box;
    min-width: 0;
    height: 100%;
    min-height: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    padding: 16px 12px calc(var(--ra-page-end) + env(safe-area-inset-bottom, 0px)) 12px;
  }

  #rwBankLists,
  #rwBankLedger,
  #rwBankOnboarding,
  #rwBankGuide{
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #rwBankTreasuryRows,
  #rwBankRows,
  #rwBankSlots,
  #rwBankLedgerTable{
    display: block;
    width: 100%;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  #rwBankTreasuryRows > table.ra-list-grid,
  #rwBankLedgerTable > table.ra-list-grid{
    width: 960px;
    min-width: 960px;
    max-width: none;
    table-layout: fixed;
  }

  #rwBankRows > table.ra-list-grid,
  #rwBankSlots > table.ra-list-grid{
    width: 720px;
    min-width: 720px;
    max-width: none;
    table-layout: fixed;
  }

  #rwPeopleList,
  #rwAgentPropertyListView,
  #rwAgentEstimateListPane,
  #rwIdlePanel,
  #rwIdleHome{
    min-width: 0;
    max-width: 100%;
  }

  #rwPeopleRows,
  #rwIdleRecentList,
  #rwAgentPropertyList,
  #rwAgentEstimateList{
    display: block;
    width: 100%;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  #rwPeopleRows > table.ra-list-grid,
  #rwIdleRecentList > table.ra-list-grid,
  #rwAgentPropertyList > table.ra-list-grid,
  #rwAgentEstimateList > table.ra-list-grid{
    width: 960px;
    min-width: 960px;
    max-width: none;
    table-layout: fixed;
  }

  #rwPeopleRows > table.ra-list-grid--tenant{
    width: 940px;
    min-width: 940px;
  }

  #rwAgentPropertyList > table.ra-list-grid--property{
    width: 1136px;
    min-width: 1136px;
  }

  .ra-list-grid--tenant .ra-inv-date{ width: 90px; }
  .ra-list-grid--tenant .ra-inv-name{ width: 156px; }
  .ra-list-grid--tenant .ra-inv-id{ width: 50px; }
  .ra-list-grid--tenant .ra-inv-place{ width: 289px; }
  .ra-list-grid--tenant .ra-inv-lease{ width: 188px; }
  .ra-list-grid--tenant .ra-inv-status{ width: 81px; }
  .ra-list-grid--tenant .ra-inv-active{ width: 86px; }

  #rwAgentEstimateList > table.ra-list-grid--estimate,
  #rwOwnerEstimateList > table.ra-list-grid--estimate,
  #rwVendorEstimateList > table.ra-list-grid--estimate{
    width: 832px;
    min-width: 832px;
  }

  /* Vendor Estimate and PM Estimate fit on one line. */
  .ra-list-grid--estimate .ra-inv-date{ width: 96px; }
  .ra-list-grid--estimate .ra-inv-paid,
  .ra-list-grid--estimate .ra-inv-total{ width: 120px; }
  .ra-list-grid--estimate .ra-inv-address,
  .ra-list-grid--estimate .ra-inv-name{ width: 160px; }
  .ra-list-grid--estimate .ra-inv-status{ width: 176px; }

  .ra-list-grid--talk .ra-inv-source{ width: calc(10% * 0.85 * 0.7 * 0.85 * 1.1 * 1.2); }
  .ra-list-grid--talk .ra-portal__unread-dot{ display: none !important; }

  .ra-invoice-toolbar{
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
  }

  .ra-invoice-filters,
  #rwAgentInvoiceFilters,
  [data-rw-agent-page="vendors"] #rwPeopleFilters,
  [data-rw-agent-page="owners"] #rwPeopleFilters,
  [data-rw-agent-page="agents"] #rwPeopleFilters,
  [data-rw-agent-page="tenants"] #rwPeopleFilters,
  #rwIdleFilters,
  #rwTenantConvFilters{
    justify-content: flex-start;
    align-items: flex-end;
    gap: 12px;
  }

  .ra-invoice-filters .ra-owner__field,
  #rwAgentInvoiceFilters .ra-owner__field,
  [data-rw-agent-page="vendors"] #rwPeopleFilters .ra-owner__field,
  [data-rw-agent-page="owners"] #rwPeopleFilters .ra-owner__field,
  [data-rw-agent-page="agents"] #rwPeopleFilters .ra-owner__field,
  [data-rw-agent-page="tenants"] #rwPeopleFilters .ra-owner__field,
  #rwIdleFilters .ra-owner__field,
  #rwTenantConvFilters .ra-owner__field{
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    align-items: stretch;
    flex: 0 0 11.25rem;
    width: 11.25rem;
    min-width: 11.25rem;
    max-width: 11.25rem;
    margin: 0;
    font-size: inherit;
    font-weight: 600;
  }

  .ra-invoice-filters .ra-owner__field select,
  #rwAgentInvoiceFilters .ra-owner__field select,
  [data-rw-agent-page="vendors"] #rwPeopleFilters .ra-owner__field select,
  [data-rw-agent-page="owners"] #rwPeopleFilters .ra-owner__field select,
  [data-rw-agent-page="agents"] #rwPeopleFilters .ra-owner__field select,
  [data-rw-agent-page="tenants"] #rwPeopleFilters .ra-owner__field select,
  #rwIdleFilters .ra-owner__field select,
  #rwTenantConvFilters .ra-owner__field select{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    box-sizing: border-box;
    justify-self: stretch;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font: inherit;
  }

  select.ra-filter-address{
    pointer-events: none;
  }

  .ra-filter-address-menu{
    position: fixed;
    z-index: 80;
    width: max-content;
    max-height: 50vh;
    overflow: auto;
    margin: 0;
    padding: 4px 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  }

  .ra-filter-address-option{
    display: block;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
  }

  .ra-filter-address-option.is-selected{
    background: #d4e1ee;
  }

  .ra-estimate-owner-line{
    display: grid;
    grid-template-columns: 6.5rem minmax(0, calc(14rem * 1.4));
    align-items: center;
    justify-content: start;
    column-gap: 8px;
    row-gap: 12px;
  }

  #rwAgentOwnerEstimateHead .ra-estimate-owner-line .ra-estimate-pair{
    display: contents;
  }

  #rwAgentOwnerEstimateHead .ra-estimate-pair select{
    width: 100%;
    max-width: none;
  }

  #rwAgentEstimateDetail:has(#rwAgentOwnerEstimateHead:not([hidden])) #rwAgentEstimateBack{
    display: none !important;
  }

  #rwVendorBillRows > table.ra-invoice-grid--pay{
    width: calc(1061px - 234px * 0.2 - 436px * 0.55);
    min-width: calc(1061px - 234px * 0.2 - 436px * 0.55);
    table-layout: fixed;
  }

  #rwVendorBillRows .ra-inv-date{ width: calc(234px * 0.8); }
  #rwVendorBillRows .ra-inv-status{ width: 153px; }
  #rwVendorBillRows .ra-inv-address{ width: calc(436px * 0.45); }
  #rwVendorBillRows .ra-inv-paid,
  #rwVendorBillRows .ra-inv-total{ width: 101px; }
  #rwVendorBillRows .ra-inv-file{ width: 36px; max-width: 36px; }

  [data-rw-vendor-page="ledger"]{
    align-items: stretch;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
  }

  [data-rw-vendor-page="ledger"] > .ra-invoice-toolbar,
  [data-rw-vendor-page="ledger"] > #rwVendorLedgerHost{
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }

  [data-rw-vendor-page="ledger"] #rwVendorLedgerHost{
    overflow-x: auto;
    overflow-y: auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  [data-rw-vendor-page="ledger"] #rwVendorLedgerHost > table.ra-invoice-grid{
    width: 100%;
    min-width: 0;
    margin: 0;
    border-radius: 0;
    table-layout: fixed;
  }

  #rwAgentOwnerInvoiceRows{
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  #rwAgentOwnerInvoiceRows > table.ra-invoice-grid{
    width: max-content;
    min-width: 860px;
    table-layout: auto;
  }

  body.ra-portal--vendor #rwChatPanel:not(.ra-portal__chat--thread){
    padding: 0;
    overflow: auto;
  }

  body.ra-portal--vendor #rwChatPanel:not(.ra-portal__chat--thread) .ra-portal__chat-main{
    padding: 12px;
  }

  #rwTenantConvRows{
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  #rwTenantConvRows > table.ra-list-grid,
  body.ra-portal--owner #rwIdleRecentList > table.ra-list-grid,
  body.ra-portal--vendor #rwIdleRecentList > table.ra-list-grid{
    width: 960px;
    min-width: 960px;
    max-width: none;
    table-layout: fixed;
  }

  #rwChatPanel:not(.ra-portal__chat--thread) #rwIdlePanel,
  #rwChatPanel:not(.ra-portal__chat--thread) #rwIdleHome,
  #rwChatPanel:not(.ra-portal__chat--thread) #rwIdleRecentList,
  #rwTenantConvList,
  #rwTenantConvRows{
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    background: transparent;
  }

  #rwChatPanel.ra-portal__chat--thread .ra-list-x{
    grid-row: 1;
    align-self: center !important;
  }

  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread #rwChatBackFooter{
    display: none !important;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread{
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread #rwChatMain,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread #rwChatMain,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwChatMain,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread #rwChatMain{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread #rwConversationBox,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread #rwConversationBox,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwConversationBox,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread #rwConversationBox{
    flex: 1 1 auto;
    width: 100% !important;
    max-width: none !important;
    min-height: 0;
    margin: 0;
    border-radius: 0;
  }

  #rwChatPanel.ra-portal__chat--thread .ra-portal__chat-title-bar{
    width: 100%;
    border-radius: 0 !important;
    background: #d1d5db !important;
  }

  body.ra-portal--owner #rwChatPanel.ra-portal__chat--thread #rwChatFooter,
  body.ra-portal--tenant #rwChatPanel.ra-portal__chat--thread #rwChatFooter,
  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwChatFooter,
  body.ra-portal--vendor #rwChatPanel.ra-portal__chat--thread #rwChatFooter{
    flex: 0 0 auto;
    width: 100% !important;
    max-width: none !important;
    margin: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: #fff;
  }

  #rwChatPanel.ra-portal__chat--thread .ra-portal__composer{
    width: 100%;
    max-width: none;
  }

  #rwChatPanel.ra-portal__chat--thread #rwChatBackFooter{
    display: none !important;
  }

  #rwChatPanel.ra-portal__chat--thread #rwChatCloseBtn,
  #rwChatPanel.ra-portal__chat--thread #rwAddVendorBtn{
    width: 4.2rem;
    height: auto;
    min-height: 2.4rem;
    padding: 4px 6px;
    border: 0;
    border-radius: 10px;
    background: #1d4ed8 !important;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: normal;
    line-height: 1.05;
    text-align: center;
  }

  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwChatCloseBtn{
    display: none !important;
  }

  body.ra-portal--agent #rwChatPanel.ra-portal__chat--thread #rwAddVendorBtn{
    grid-column: 1;
    grid-row: 1 / span 2;
  }
}

body.ra-portal input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="range"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
body.ra-portal select,
body.ra-portal textarea{
  border-width: 1px !important;
  border-style: solid !important;
  border-color: #6d8299 !important;
}

#rwAgentOwnerInvoiceDetail:not([hidden]),
#rwOwnerTxDetail:not([hidden]),
#rwVendorInvoiceDetail:not([hidden]){
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  align-items: center;
  column-gap: 8px;
}

#rwAgentOwnerInvoiceDetail:not([hidden]) > .ra-list-x,
#rwOwnerTxDetail:not([hidden]) > .ra-list-x,
#rwVendorInvoiceDetail:not([hidden]) > .ra-list-x,
#rwAgentInvoiceModal.is-open .ra-invoice-sheet__x{
  display: grid !important;
  grid-column: 2;
  grid-row: 1;
  position: static !important;
  top: auto !important;
  align-self: center !important;
  justify-self: end;
  margin: 0 !important;
  background: transparent !important;
}

#rwAgentOwnerInvoiceDetail:not([hidden]) > .ra-owner__title,
#rwOwnerTxDetail:not([hidden]) > .ra-owner__title,
#rwVendorInvoiceDetail:not([hidden]) > .ra-owner__title,
#rwAgentInvoiceModal.is-open #rwAgentInvoiceDetail:not([hidden]) > .ra-owner__title{
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding-right: 0;
}

#rwAgentOwnerInvoiceDetail:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title),
#rwOwnerTxDetail:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title),
#rwVendorInvoiceDetail:not([hidden]) > :not(.ra-list-x):not(.ra-owner__title){
  grid-column: 1 / -1;
}

#rwAgentInvoiceModal.is-open .ra-invoice-sheet__panel:has(#rwAgentInvoiceDetail:not([hidden])){
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  align-items: center;
  column-gap: 8px;
}

#rwAgentInvoiceModal.is-open #rwAgentInvoiceDetail:not([hidden]){
  display: contents;
}

#rwAgentInvoiceModal.is-open #rwAgentInvoiceDetail:not([hidden]) > :not(.ra-owner__title){
  grid-column: 1 / -1;
}

/* Add estimate to Owner: same modal as Add invoice (gray card, no white bubble, stacked fields). */
#rwAgentEstimateDetail:has(#rwAgentOwnerEstimateHead:not([hidden])) #rwAgentOwnerEstimateBubble{
  max-width: none;
  padding: 0 0 1lh;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#rwAgentEstimateDetail:has(#rwAgentOwnerEstimateHead:not([hidden])) #rwAgentOwnerEstimateHead .ra-estimate-form-head{
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 0;
}

#rwAgentEstimateDetail:has(#rwAgentOwnerEstimateHead:not([hidden])) #rwAgentOwnerEstimateHead .ra-estimate-form-head h3{
  font-size: 1.17em;
  font-weight: 700;
  line-height: normal;
}

#rwAgentEstimateDetail:has(#rwAgentOwnerEstimateHead:not([hidden])) #rwAgentOwnerEstimateClose{
  margin-left: auto;
}

#rwAgentOwnerEstimateNumber{
  color: #64748b;
  font-weight: 500;
}

#rwAgentEstimateDetail:has(#rwAgentOwnerEstimateHead:not([hidden])) #rwAgentOwnerEstimateHead .ra-estimate-owner-line{
  display: block;
}

#rwAgentEstimateDetail:has(#rwAgentOwnerEstimateHead:not([hidden])) #rwAgentOwnerEstimateHead .ra-estimate-owner-line .ra-estimate-pair{
  --ra-estimate-label: 7.5rem;
  display: grid;
  grid-template-columns: var(--ra-estimate-label) minmax(0, 1fr);
  width: auto;
  margin: 0 0 10px;
}

#rwAgentEstimateDetail:has(#rwAgentOwnerEstimateHead:not([hidden])) #rwAgentOwnerEstimateHead .ra-estimate-pair select{
  width: 100%;
  max-width: none;
}

#rwAgentEstimateDetail:has(#rwAgentOwnerEstimateHead:not([hidden])) #rwAgentEstimateSaveLines{
  align-self: stretch;
  margin-top: 26px;
  border-radius: 12px;
}

@media (min-width: 1025px){
  #rwAgentEstimateDetail:not([hidden]):has(#rwAgentOwnerEstimateHead:not([hidden])){
    z-index: 90;
    left: 25vw !important;
    width: 50vw !important;
    max-width: 50vw !important;
    padding: 16px 20px 0 !important;
  }
}
@media (min-width: 1025px){
  #rwAgentEstimateDetail:not([hidden]),
  #rwOwnerEstimateDetail:not([hidden]),
  #rwVendorEstimateForm:not([hidden]),
  #rwVendorEstimateDetail:not([hidden]),
  #rwVendorInvoiceDetail:not([hidden]),
  #rwAgentOwnerInvoiceDetail:not([hidden]){
    box-sizing: border-box;
    left: calc(var(--rw-side-nav, 144px) + (100vw - var(--rw-side-nav, 144px) - 578px) / 2) !important;
    width: 578px !important;
    max-width: calc(100vw - var(--rw-side-nav, 144px) - 32px) !important;
    padding-right: 100px !important;
    padding-left: 100px !important;
  }

  #rwAgentEstimateDetail:not([hidden]) > .ra-list-x,
  #rwOwnerEstimateDetail:not([hidden]) > .ra-list-x,
  #rwVendorEstimateForm:not([hidden]) > .ra-list-x,
  #rwVendorEstimateDetail:not([hidden]) > .ra-list-x,
  #rwVendorInvoiceDetail:not([hidden]) > .ra-list-x,
  #rwAgentOwnerInvoiceDetail:not([hidden]) > .ra-list-x{
    margin-right: -84px !important;
  }

  #rwAgentEstimateDetail:not([hidden]) > .ra-estimate-save-v{
    margin-right: -84px !important;
  }

  #rwAgentEstimateDetail:not([hidden]) > .ra-owner__title,
  #rwOwnerEstimateDetail:not([hidden]) > .ra-owner__title,
  #rwVendorEstimateDetail:not([hidden]) > .ra-owner__title,
  #rwVendorEstimateForm:not([hidden]) > .ra-owner__title{
    grid-row: 1;
  }

  #rwAgentEstimateDetail:not([hidden]) > .ra-list-x,
  #rwOwnerEstimateDetail:not([hidden]) > .ra-list-x,
  #rwVendorEstimateDetail:not([hidden]) > .ra-list-x,
  #rwVendorEstimateForm:not([hidden]) > .ra-list-x{
    position: absolute !important;
    top: 8px;
    right: 16px;
    margin: 0 !important;
  }
}
@media (min-width: 1025px){
  #rwAgentEstimateDetail:not([hidden]):has(#rwAgentOwnerEstimateHead:not([hidden])){
    border-top: 4px solid #14532d !important;
  }
}
[data-rw-owner-page="ledger"] table.ra-invoice-grid tbody td{
  box-sizing: border-box;
  height: 32px;
  padding: 4px 8px;
}

[data-rw-owner-page="ledger"] table.ra-invoice-grid .ra-ledger__money{
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1025px){
  #rwOwnerTxDetail:not([hidden]){
    left: calc(var(--rw-side-nav, 144px) + 32px + (100vw - var(--rw-side-nav, 144px) - 64px) * 0.08) !important;
    width: calc((100vw - var(--rw-side-nav, 144px) - 64px) * 0.84) !important;
  }
}

:is(body.ra-portal--owner, body.ra-portal--tenant, body.ra-portal--vendor) :is(#rwChatDemoMenu, #rwActivityLogBtn, #rwRentalsLink, #rwRentalsMenu, [data-rw-owner-nav="settings"], [data-rw-tenant-nav="settings"]){
  display: none !important;
}

#rwEstimateKeepModal .ra-portal__modal-title,
#rwEstimateKeepText,
#rwEstimateKeepModal .ra-estimate-keep-actions button{
  font-size: 0.98rem;
}

#rwOwnerPropertyList tbody tr{
  cursor: default;
}

/* The navy header is its own layer above the page. Let the open estimate card paint in front of it. */
body:has(#rwVendorEstimateForm:not([hidden])) .ra-portal__main{
  z-index: auto;
}

#rwVendorEstimateForm:not([hidden]){
  position: relative;
  z-index: 80;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
  align-items: center;
  align-content: start;
  row-gap: 16px;
}

#rwVendorEstimateForm:not([hidden]) > .ra-estimate-footer{
  grid-column: 1 !important;
  grid-row: 1 !important;
  order: 0 !important;
  position: static !important;
  justify-self: start;
  align-self: center;
  align-items: center;
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

#rwVendorEstimateForm:not([hidden]) #rwVendorEstimateStart{
  width: 36px !important;
  height: 36px !important;
  min-height: 0 !important;
  flex: 0 0 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #16a34a !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

#rwVendorEstimateForm:not([hidden]) > .ra-owner__title{
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center;
  margin: 0 !important;
  text-align: center;
}

@media (min-width: 1025px){
  #rwVendorEstimateForm.is-sheet #rwVendorEstimateAnswer{
    left: calc(var(--rw-side-nav, 144px) + (100vw - var(--rw-side-nav, 144px)) / 2);
    width: min(708px, calc(100vw - var(--rw-side-nav, 144px) - 32px));
    transform: translateX(-50%);
  }
}

#rwVendorEstimateForm:not([hidden]) > .ra-list-x{
  grid-column: 3 !important;
  grid-row: 1 !important;
  position: static !important;
  top: auto !important;
  right: auto !important;
  align-self: center;
  justify-self: end;
  margin: 0 !important;
  background: transparent !important;
}

/* Save and cancel notes sit on the estimate. They do not dim the page. */
#rwEstimateKeepModal,
#rwAppConfirm{
  z-index: 110;
  background: transparent;
}

#rwAppConfirm{
  z-index: 120;
}

/* An open estimate or invoice keeps its dark backdrop until it closes, also while a question
   (Keep as draft?, Cancel?) is asked over it; the question adds no second dark layer. */
body:has(:is(#rwAgentEstimateDetail.is-sheet, #rwAgentEstimateDetail.is-page:not([hidden]), #rwVendorEstimateForm.is-sheet, #rwOwnerEstimateDetail:not([hidden]), #rwVendorEstimateDetail:not([hidden]), #rwAgentEstimateForm:not([hidden]), #rwAgentOwnerInvoiceForm:not([hidden]), #rwVendorInvoiceForm:not([hidden]))) :is(#rwAppConfirm, #rwEstimateKeepModal){
  background: transparent !important;
}

body:has(:is(#rwAgentEstimateDetail.is-sheet, #rwAgentEstimateDetail.is-page:not([hidden]))) .ra-portal__main{
  z-index: auto;
}

/* The owner estimate opens like the vendor's: the paper itself is the form. */
#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner{
  display: block;
  position: fixed;
  z-index: 100;
  top: calc(env(safe-area-inset-top, 0px) - 5px);
  left: 50%;
  transform: translateX(-50%);
  width: min(708px, calc(100vw - 32px));
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px);
  margin: 0;
  padding: 0;
  overflow: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
}

/* ✓ and X on the paper's top right, side by side and the same size (drawn icons, as on invoices);
   they scroll away with the paper. No offsets: the old right/top of the ✓ would push it away. */
#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner > .ra-estimate-save-v,
#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner > .ra-invoice-paper-x{
  position: relative;
  top: 0 !important;
  right: auto !important;
  left: auto !important;
  float: right;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 32px !important;
  height: 32px !important;
  margin: 10px 0 -42px 4px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 0 !important;
  line-height: 1;
}
#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner > :is(.ra-estimate-save-v, .ra-invoice-paper-x) svg{
  display: block;
  width: 20px;
  height: 20px;
}
#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner > .ra-estimate-save-v:hover{
  background: #dcfce7;
}
#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner > .ra-invoice-paper-x:hover{
  background: #fee2e2;
}
#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner > :is(.ra-estimate-save-v, .ra-invoice-paper-x)[hidden]{
  display: none !important;
}

#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner > .ra-invoice-paper-x{
  margin-right: 12px !important;
}

#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner .ra-invoice-paper{
  width: 100%;
  box-sizing: border-box;
}

#rwAgentEstimateToOwner [data-rw-paper-party-slot] .ra-estimate-pair{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}

#rwAgentEstimateToOwner [data-rw-paper-party-slot] .ra-estimate-pair > span:first-child{
  min-width: 64px;
  color: var(--paper-muted);
  font-size: 13px;
}

#rwAgentEstimateToOwner [data-rw-paper-party-slot] .ra-estimate-search-drop{
  flex: 1;
  position: relative;
}

#rwAgentEstimateToOwner [data-rw-paper-party-slot] .ra-estimate-search{
  height: 34px;
  min-height: 34px;
  font-size: 14px;
}

@media (min-width: 1025px){
  #rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner{
    left: calc(var(--rw-side-nav, 144px) + (100vw - var(--rw-side-nav, 144px)) / 2);
    width: min(708px, calc(100vw - var(--rw-side-nav, 144px) - 32px));
    transform: translateX(-50%);
  }
}

/* Reports: one quiet surface, data is the only loud thing. */
.ra-report{
  --rr-blue: #2a78d6;
  --rr-blue-soft: #9ec5f4;
  --rr-orange: #eb6834;
  --rr-aqua: #1baf7a;
  --rr-good: #0ca30c;
  --rr-warning: #fab219;
  --rr-serious: #ec835a;
  --rr-critical: #d03b3b;
  --rr-ink: #0f172a;
  --rr-ink-2: #475569;
  --rr-muted: #64748b;
  --rr-surface: #ffffff;
  --rr-hair: #e2e8f0;
  --rr-track: #eef3f9;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--rr-ink);
  font-variant-numeric: tabular-nums;
}

.ra-report-head{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 22px;
  border-radius: 16px;
  background: var(--rw-navy-shine);
  color: #fff;
  box-shadow: 0 10px 24px rgba(11, 35, 64, 0.18);
}

.ra-report-head .ra-owner__title{
  margin: 0;
  color: #fff;
  text-align: left;
}

.ra-report-eyebrow{
  margin: 0 0 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ra-report-asof{
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}

.ra-report-filters{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ra-report-seg{
  display: inline-flex;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.ra-report-seg button{
  appearance: none;
  width: auto;
  min-height: 0;
  min-width: 44px;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.ra-report-seg button.is-on{
  background: #fff;
  color: #102d4e;
}

.ra-report-owner{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 600;
}

.ra-report-owner select{
  min-width: 160px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #102d4e;
  font: inherit;
  font-size: 0.9rem;
}

.ra-report-kpis{
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.ra-report-kpi{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--rr-hair);
  border-radius: 14px;
  background: var(--rr-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ra-report-kpi__label{
  color: var(--rr-ink-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.ra-report-kpi__value{
  color: var(--rr-ink);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: proportional-nums;
}

.ra-report-kpi__note{
  color: var(--rr-muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.ra-report-kpi--hero{
  border-color: transparent;
  background: linear-gradient(160deg, #eaf2fd 0%, #ffffff 70%);
}

.ra-report-kpi--hero .ra-report-kpi__value{
  font-size: 3rem;
  color: #102d4e;
}

.ra-report-kpi--warn{
  box-shadow: inset 3px 0 0 var(--rr-warning), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ra-report-cards{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ra-report-card{
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid var(--rr-hair);
  border-radius: 16px;
  background: var(--rr-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ra-report-card--wide{
  grid-column: 1 / -1;
}

.ra-report-card__head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ra-report-card__head h3{
  margin: 0;
  color: var(--rr-ink);
  font-size: 1.02rem;
  font-weight: 700;
}

.ra-report-card__head p{
  margin: 3px 0 0;
  color: var(--rr-muted);
  font-size: 0.8rem;
}

.ra-report-toggle{
  appearance: none;
  flex: none;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 5px 10px;
  border: 1px solid var(--rr-hair);
  border-radius: 8px;
  background: #fff;
  color: var(--rr-ink-2);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.ra-report-card[data-rr-showing="chart"] .ra-report-tablewrap,
.ra-report-card[data-rr-showing="table"] .ra-report-chart{
  display: none;
}

.ra-report-card__foot{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-top: 10px;
  border-top: 1px solid var(--rr-hair);
  color: var(--rr-ink-2);
  font-size: 0.8rem;
  line-height: 1.4;
}

.ra-report-empty{
  margin: 0;
  padding: 28px 0;
  color: var(--rr-muted);
  font-size: 0.88rem;
  text-align: center;
}

.ra-report-warn{
  margin: 0;
  color: #92400e;
  font-size: 0.78rem;
}

.ra-report-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: var(--rr-ink-2);
  font-size: 0.78rem;
}

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

.ra-report-key{
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--rr-c);
}

.ra-report-key--line{
  width: 14px;
  height: 2px;
  border-radius: 2px;
}

.ra-report-key--hatch,
.ra-report-col__seg.is-hatch,
.ra-report-aging__cell.is-hatch .ra-report-aging__meter > span{
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0 2px, transparent 2px 5px);
  background-color: var(--rr-c, var(--rr-critical));
}

/* Donut */
.ra-report-donut{
  position: relative;
  width: min(220px, 70%);
  margin: 4px auto 0;
}

.ra-report-donut svg{
  display: block;
  width: 100%;
  height: auto;
}

.ra-report-arc{
  cursor: pointer;
  outline: none;
  transition: stroke-width 0.15s ease;
}

.ra-report-arc:hover,
.ra-report-arc:focus-visible{
  stroke-width: 6.4;
}

.ra-report-donut__center{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.ra-report-donut__center strong{
  color: var(--rr-ink);
  font-size: 1.9rem;
  font-weight: 700;
}

.ra-report-donut__center span{
  color: var(--rr-muted);
  font-size: 0.72rem;
}

.ra-report-donut + .ra-report-legend{
  justify-content: center;
}

/* Horizontal bars */
.ra-report-hbars{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ra-report-hbars li{
  display: grid;
  grid-template-columns: minmax(90px, 34%) 1fr auto;
  align-items: center;
  gap: 10px;
  outline: none;
}

.ra-report-hbars li:hover .ra-report-hbars__bar,
.ra-report-hbars li:focus-visible .ra-report-hbars__bar{
  filter: brightness(0.9);
}

.ra-report-hbars__label{
  overflow: hidden;
  color: var(--rr-ink);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ra-report-hbars__track{
  height: 14px;
}

.ra-report-hbars__bar{
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--rr-c);
}

.ra-report-hbars__value{
  min-width: 52px;
  color: var(--rr-ink-2);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
}

/* Columns and lines share the grid */
.ra-report-cols,
.ra-report-line{
  position: relative;
  padding-left: 44px;
}

.ra-report-grid{
  position: absolute;
  top: 18px;
  right: 0;
  left: 44px;
  height: 200px;
  pointer-events: none;
}

.ra-report-grid > span{
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--rr-hair);
}

.ra-report-grid em{
  position: absolute;
  right: calc(100% + 8px);
  top: -0.6em;
  color: var(--rr-muted);
  font-size: 0.7rem;
  font-style: normal;
  white-space: nowrap;
}

.ra-report-cols__list{
  display: grid;
  grid-template-columns: repeat(var(--rr-n), minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ra-report-col{
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  outline: none;
}

.ra-report-col__plot{
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  height: 200px;
  margin-top: 18px;
  border-radius: 6px;
}

.ra-report-col:hover .ra-report-col__plot,
.ra-report-col:focus-visible .ra-report-col__plot{
  background: rgba(42, 120, 214, 0.06);
}

.ra-report-col__stack,
.ra-report-col__group{
  display: flex;
  width: min(24px, 70%);
  height: 100%;
}

.ra-report-col__stack{
  flex-direction: column-reverse;
  justify-content: flex-start;
  gap: 2px;
}

.ra-report-col__group{
  width: min(36px, 80%);
  align-items: flex-end;
  gap: 2px;
}

.ra-report-col__seg,
.ra-report-col__bar{
  display: block;
  flex: none;
  background: var(--rr-c);
}

.ra-report-col__seg{
  width: 100%;
}

.ra-report-col__seg.is-top,
.ra-report-col__bar{
  border-radius: 4px 4px 0 0;
}

.ra-report-col__bar{
  flex: 1 1 0;
}

.ra-report-col__cap{
  position: absolute;
  left: 50%;
  transform: translate(-50%, -4px);
  color: var(--rr-ink-2);
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}

.ra-report-col__label{
  margin-top: 8px;
  color: var(--rr-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.ra-report-col.is-strong .ra-report-col__label{
  color: var(--rr-ink);
  font-weight: 700;
}

.ra-report-col__flag{
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff4dc;
  color: #7a4b00;
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Line */
.ra-report-line .ra-report-grid{
  right: 56px;
}

.ra-report-line__plot{
  position: relative;
  height: 200px;
  margin: 18px 56px 0 0;
}

.ra-report-line__plot svg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ra-report-dot{
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -6.5px 0 0 -6.5px;
  box-sizing: content-box;
  border: 2px solid var(--rr-surface);
  border-radius: 50%;
  background: var(--rr-c);
  outline: none;
}

.ra-report-dot::after{
  content: "";
  position: absolute;
  inset: -8px;
}

.ra-report-dot:hover,
.ra-report-dot:focus-visible{
  transform: scale(1.35);
}

.ra-report-endlabel{
  position: absolute;
  left: calc(100% + 8px);
  transform: translateY(-50%);
  color: var(--rr-ink-2);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.ra-report-line__x{
  position: relative;
  height: 20px;
  margin: 8px 56px 0 0;
  padding: 0;
  list-style: none;
}

.ra-report-line__x li{
  position: absolute;
  transform: translateX(-50%);
  color: var(--rr-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

/* Aging */
.ra-report-aging{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ra-report-aging__cell{
  --rr-c: var(--rr-good);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--rr-hair);
  border-top: 4px solid var(--rr-c);
  border-radius: 12px;
  background: #fff;
  outline: none;
}

.ra-report-aging__cell--warning{ --rr-c: var(--rr-warning); }
.ra-report-aging__cell--serious{ --rr-c: var(--rr-serious); }
.ra-report-aging__cell--critical{ --rr-c: var(--rr-critical); }

.ra-report-aging__label{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--rr-ink-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.ra-report-aging__label b{
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--rr-c);
  color: #fff;
  font-size: 0.66rem;
  box-sizing: border-box;
}

.ra-report-aging__cell--warning .ra-report-aging__label b{
  color: #3d2a00;
}

.ra-report-aging__cell strong{
  font-size: 1.3rem;
  font-weight: 700;
}

.ra-report-aging__count{
  color: var(--rr-muted);
  font-size: 0.74rem;
}

.ra-report-aging__meter{
  height: 6px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--rr-track);
}

.ra-report-aging__meter > span{
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--rr-c);
}

/* Funnel */
.ra-report-funnel{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ra-report-funnel li{
  display: grid;
  grid-template-columns: minmax(130px, 38%) 1fr auto;
  align-items: center;
  gap: 10px;
  outline: none;
}

.ra-report-funnel__label{
  color: var(--rr-ink);
  font-size: 0.84rem;
}

.ra-report-funnel__track{
  height: 18px;
  border-radius: 4px;
  background: var(--rr-track);
}

.ra-report-funnel__track > span{
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--rr-blue);
}

.ra-report-funnel li.is-muted .ra-report-funnel__track > span{
  background: var(--rr-blue-soft);
}

.ra-report-funnel__value{
  min-width: 70px;
  color: var(--rr-ink-2);
  font-size: 0.82rem;
  text-align: right;
}

.ra-report-funnel__value b{
  color: var(--rr-ink);
}

/* Owner balances */
.ra-report-owners{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ra-report-owners li{
  display: grid;
  grid-template-columns: minmax(140px, 30%) 1fr minmax(96px, auto);
  align-items: center;
  gap: 12px;
  outline: none;
}

.ra-report-owners__name{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 0.86rem;
  font-weight: 600;
}

.ra-report-owners__track{
  position: relative;
  height: 14px;
  border-radius: 0 4px 4px 0;
  background: var(--rr-track);
}

.ra-report-owners__bar{
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--rr-blue);
}

.ra-report-owners__bar.is-short{
  background: var(--rr-warning);
}

.ra-report-owners__tick{
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--rr-ink);
}

.ra-report-owners__value{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.86rem;
  font-weight: 700;
}

.ra-report-owners__value small{
  color: var(--rr-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.ra-report-chip{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px 1px 2px;
  border-radius: 999px;
  background: #fff4dc;
  color: #7a4b00;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
}

.ra-report-chip b{
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--rr-warning);
  color: #3d2a00;
}

/* Table view */
.ra-report-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.ra-report-table th,
.ra-report-table td{
  padding: 8px 10px;
  border-bottom: 1px solid var(--rr-hair);
  text-align: left;
}

.ra-report-table th{
  color: var(--rr-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ra-report-table .ra-report-num{
  text-align: right;
}

.ra-report-tip{
  position: fixed;
  z-index: 200;
  max-width: 280px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

.ra-report-tip[hidden]{
  display: none;
}

@media (max-width: 1180px){
  .ra-report-kpis{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px){
  .ra-report-cards{
    grid-template-columns: minmax(0, 1fr);
  }

  .ra-report-aging{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ra-report-col__cap{
    display: none;
  }
}

@media (max-width: 560px){
  .ra-report-head{
    padding: 16px;
  }

  .ra-report-kpis{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ra-report-kpi--hero{
    grid-column: 1 / -1;
  }

  .ra-report-card{
    padding: 16px 14px;
  }

  .ra-report-owners li,
  .ra-report-funnel li{
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ra-report-owners__track,
  .ra-report-funnel__track{
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .ra-report-col__label{
    font-size: 0.62rem;
  }
}

/* Reports: eight headline numbers, custom range, numbers under the money and door charts. */
.ra-report .ra-report-kpis{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ra-report-range{
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ra-report-range label{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  font-weight: 600;
}

.ra-report-range select{
  width: auto;
  height: 36px;
  min-height: 0;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #102d4e;
  font: inherit;
  font-size: 0.88rem;
}

.ra-report-numbers{
  margin-top: 4px;
}

.ra-report-matrix{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ra-report-matrix .ra-report-table{
  min-width: max-content;
  font-size: 0.8rem;
}

.ra-report-matrix .ra-report-table th,
.ra-report-matrix .ra-report-table td{
  padding: 6px 8px;
  white-space: nowrap;
}

.ra-report-matrix tbody th{
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  color: var(--rr-ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.ra-report-matrix tbody th .ra-report-key{
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.ra-report-matrix tr.is-strong th,
.ra-report-matrix tr.is-strong td{
  border-top: 2px solid var(--rr-hair);
  color: var(--rr-ink);
  font-weight: 700;
}

@media (max-width: 860px){
  .ra-report .ra-report-kpis{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* A list page with only its list showing: the title, toolbar, and column headers stay; only the rows scroll. */
.ra-owner__pages:has(> .ra-owner__page:not([hidden]) > :is(#rwOwnerPropertyListView, #rwOwnerEstimateListPane, #rwAgentPropertyListView, #rwAgentEstimateListPane, #rwVendorEstimateListPane, #rwVendorInvoiceListPane)):not(:has(> .ra-owner__page:not([hidden]) > :not(#rwOwnerPropertyListView, #rwOwnerEstimateListPane, #rwAgentPropertyListView, #rwAgentEstimateListPane, #rwVendorEstimateListPane, #rwVendorInvoiceListPane):not([hidden]))){
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ra-owner__pages > .ra-owner__page:not([hidden]):has(> :is(#rwOwnerPropertyListView, #rwOwnerEstimateListPane, #rwAgentPropertyListView, #rwAgentEstimateListPane, #rwVendorEstimateListPane, #rwVendorInvoiceListPane)):not(:has(> :not(#rwOwnerPropertyListView, #rwOwnerEstimateListPane, #rwAgentPropertyListView, #rwAgentEstimateListPane, #rwVendorEstimateListPane, #rwVendorInvoiceListPane):not([hidden]))){
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.ra-owner__pages > .ra-owner__page:not([hidden]) > :is(#rwOwnerPropertyListView, #rwOwnerEstimateListPane, #rwAgentPropertyListView, #rwAgentEstimateListPane, #rwVendorEstimateListPane, #rwVendorInvoiceListPane):not([hidden]){
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

:is(#rwOwnerPropertyListView, #rwOwnerEstimateListPane, #rwAgentPropertyListView, #rwAgentEstimateListPane, #rwVendorEstimateListPane, #rwVendorInvoiceListPane) > .ra-invoice-toolbar{
  flex: 0 0 auto;
  position: static;
}

:is(#rwOwnerPropertyListView, #rwOwnerEstimateListPane, #rwAgentPropertyListView, #rwAgentEstimateListPane, #rwVendorEstimateListPane, #rwVendorInvoiceListPane) > .ra-owner__list{
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}

:is(#rwOwnerPropertyListView, #rwOwnerEstimateListPane, #rwAgentPropertyListView, #rwAgentEstimateListPane, #rwVendorEstimateListPane, #rwVendorInvoiceListPane) > .ra-owner__list thead th{
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Owners, Tenants, Vendors, and Agents lists, while no person, lease, or property form is open. */
.ra-owner__pages:has(> .ra-owner__page.ra-people-on:not([hidden]) > #rwPeople > #rwPeopleList:not([hidden])):not(:has(#rwPeople > :is(#rwOwnerDetail, #rwTenantLeases, #rwPeopleForm, #rwPropertyForm):not([hidden]))){
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ra-owner__pages > .ra-owner__page.ra-people-on:not([hidden]):not(:has(#rwPeople > :is(#rwOwnerDetail, #rwTenantLeases, #rwPeopleForm, #rwPropertyForm):not([hidden]))),
.ra-owner__page.ra-people-on:not([hidden]) > #rwPeople:not([hidden]):not(:has(> :is(#rwOwnerDetail, #rwTenantLeases, #rwPeopleForm, #rwPropertyForm):not([hidden]))),
#rwPeople:not([hidden]):not(:has(> :is(#rwOwnerDetail, #rwTenantLeases, #rwPeopleForm, #rwPropertyForm):not([hidden]))) > #rwPeopleList:not([hidden]){
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

#rwPeopleList > .ra-invoice-toolbar,
#rwPeopleList > .ra-people__hint{
  flex: 0 0 auto;
}

#rwPeopleList > #rwPeopleRows{
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}

#rwPeopleRows thead th{
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Financials > Owners: history, Pay Owners, and Charge tabs, while no payment detail is open. */
.ra-owner__pages:has(> [data-rw-agent-page="owner-transactions"]:not([hidden])):not(:has(> [data-rw-agent-page="owner-transactions"] > #rwOwnerTxDetail:not([hidden]))),
.ra-owner__pages:has(> [data-rw-agent-page="invoices"]:not([hidden])):not(:has(> [data-rw-agent-page="invoices"] > #rwOwnerTxDetail:not([hidden]))){
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ra-owner__pages > [data-rw-agent-page="owner-transactions"]:not([hidden]):not(:has(> #rwOwnerTxDetail:not([hidden]))),
[data-rw-agent-page="owner-transactions"]:not([hidden]):not(:has(> #rwOwnerTxDetail:not([hidden]))) > :is(#rwOwnerListPane, #rwOwnerTxList, #rwOwnerPayPane, #rwOwnerFeeModal):not([hidden]),
.ra-owner__pages > [data-rw-agent-page="invoices"]:not([hidden]):not(:has(> #rwOwnerTxDetail:not([hidden]))),
[data-rw-agent-page="invoices"]:not([hidden]):not(:has(> #rwOwnerTxDetail:not([hidden]))) > :is(#rwVendorListPane, #rwVendorTxList, #rwVendorPayPane, #rwOwnerFeeModal):not([hidden]){
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

/* Money pages (Vendors, Owners, Tenants, Bank accounts, Money schedule, Taxes): the tabs sit on the
   title's row, aligned right (before the page's own tools), so the list gets the height. On a narrow
   window the row wraps. */
:is(.ra-invoice-head, .ra-people__bar):has(> :is(.ra-owner-tabs, .ra-owner__subnav)){
  flex-wrap: wrap;
  row-gap: 8px;
}

:is(.ra-invoice-head, .ra-people__bar) > :is(.ra-owner-tabs, .ra-owner__subnav){
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  border-bottom: 0;
}

html.ad-on body.ra-portal--signed-in :is(.ra-invoice-head, .ra-people__bar) > :is(.ra-owner-tabs, .ra-owner__subnav){
  margin: 0 0 0 auto !important;
}

/* Every page's title bar (title and tabs) stays put on a desktop and the page scrolls under it. The
   scroll area keeps 24px above the bar, so the bar reaches up over that space (the same 24px inside
   it) and no row shows above the title; its space below is inside it too, so none shows under it. */
@media (min-width: 1025px){
  .ra-owner__pages > .ra-owner__page > .ra-invoice-toolbar,
  #rwBankList > .ra-people__bar{
    position: sticky;
    top: -24px;
    z-index: 6;
    margin-top: -24px;
    padding-top: 24px;
    padding-bottom: 12px;
    background: #e2e8f0;
  }

  .ra-owner__pages > .ra-owner__page > .ra-invoice-toolbar > .ra-invoice-head,
  #rwBankList > .ra-people__bar{
    margin-bottom: 0;
  }

  html.ad-on body.ra-portal--signed-in :is(.ra-owner__pages > .ra-owner__page > .ra-invoice-toolbar, #rwBankList > .ra-people__bar){
    background: var(--ad-bg) !important;
  }
}

@media (max-width: 640px){
  :is(.ra-invoice-head, .ra-people__bar) > :is(.ra-owner-tabs, .ra-owner__subnav),
  html.ad-on body.ra-portal--signed-in :is(.ra-invoice-head, .ra-people__bar) > :is(.ra-owner-tabs, .ra-owner__subnav){
    order: 3;
    margin: 0 !important;
  }
}

/* Financials > Vendors, Owners, Tenants: the tabs sit right under the title, no row between. */
:is([data-rw-agent-page="invoices"], [data-rw-agent-page="owner-transactions"], [data-rw-agent-page="tenant-transactions"], [data-rw-agent-page="money"]) > .ra-invoice-toolbar > .ra-invoice-head{
  margin-bottom: 0;
}

:is([data-rw-agent-page="invoices"], [data-rw-agent-page="owner-transactions"], [data-rw-agent-page="tenant-transactions"], [data-rw-agent-page="money"]) > .ra-owner-tabs{
  margin-top: 0;
}

[data-rw-agent-page="owner-transactions"] > :is(.ra-invoice-toolbar, .ra-owner-tabs),
:is(#rwOwnerTxList, #rwOwnerPayPane, #rwOwnerFeeModal) > :not(.ra-owner__list),
[data-rw-agent-page="invoices"] > :is(.ra-invoice-toolbar, .ra-owner-tabs),
:is(#rwVendorTxList, #rwVendorPayPane, #rwOwnerFeeModal) > :not(.ra-owner__list){
  flex: 0 0 auto;
}

:is(#rwOwnerTxList, #rwOwnerPayPane, #rwOwnerFeeModal) > .ra-owner__list,
:is(#rwVendorTxList, #rwVendorPayPane, #rwOwnerFeeModal) > .ra-owner__list{
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}

:is(#rwOwnerTxList, #rwOwnerPayPane, #rwOwnerFeeModal) > .ra-owner__list thead th,
:is(#rwVendorTxList, #rwVendorPayPane, #rwOwnerFeeModal) > .ra-owner__list thead th{
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Conversations: the recent list scrolls under its title instead of the panel. */
#rwChatPanel:not(.ra-portal__chat--thread) #rwIdlePanel:not([hidden]),
#rwChatPanel:not(.ra-portal__chat--thread) #rwIdlePanel:not([hidden]) > #rwIdleHome{
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#rwChatPanel:not(.ra-portal__chat--thread) #rwIdleHome > #rwIdleRecentList{
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}

#rwIdleRecentList thead th{
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Owner Ledger and Reports, vendor Ledger. */
.ra-owner__pages:has(> :is([data-rw-owner-page="ledger"], [data-rw-owner-page="reports"], [data-rw-vendor-page="ledger"]):not([hidden])):not(:has(> [data-rw-owner-page="ledger"]:not([hidden]) > #rwOwnerLedgerInvoice:not([hidden]))):not(:has(> [data-rw-vendor-page="ledger"]:not([hidden]) > #rwVendorLedgerDetail:not([hidden]))){
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ra-owner__pages > :is([data-rw-owner-page="ledger"]:not(:has(#rwOwnerLedgerInvoice:not([hidden]))), [data-rw-owner-page="reports"], [data-rw-vendor-page="ledger"]:not(:has(#rwVendorLedgerDetail:not([hidden])))):not([hidden]){
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

[data-rw-owner-page="ledger"] > :not(#rwOwnerLedgerList),
[data-rw-owner-page="reports"] > :not(#rwOwnerReportScroll),
[data-rw-vendor-page="ledger"] > :not(#rwVendorLedgerHost){
  flex: 0 0 auto;
}

:is(#rwOwnerLedgerList, #rwOwnerReportScroll, #rwVendorLedgerHost){
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}

:is(#rwOwnerLedgerList, #rwOwnerReportScroll, #rwVendorLedgerHost) thead th{
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Tenant Maintenance and Ledger. */
.ra-owner__pages:has(> :is([data-rw-tenant-page="conversations"], [data-rw-tenant-page="ledger"]):not([hidden])):not(:has(> [data-rw-tenant-page="ledger"]:not([hidden]) > #rwTenantLedgerDoc:not([hidden]))){
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ra-owner__pages > [data-rw-tenant-page="conversations"]:not([hidden]),
.ra-owner__pages > [data-rw-tenant-page="ledger"]:not([hidden]):not(:has(> #rwTenantLedgerDoc:not([hidden]))),
[data-rw-tenant-page="conversations"] > #rwTenantConvList{
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

#rwTenantConvList > :not(#rwTenantConvRows),
[data-rw-tenant-page="ledger"] > :not(#rwTenantLedgerList){
  flex: 0 0 auto;
}

#rwTenantConvRows,
#rwTenantLedgerList{
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}

#rwTenantLedgerList > table{
  overflow: clip;
}

#rwTenantConvRows thead th,
#rwTenantLedgerList thead th{
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Bank accounts: both tables paint in full; the page scrolls. */
#rwBankLists .ra-owner__list{
  overflow-y: visible !important;
}

/* Agent levels */
#rwAgentNav [data-rw-level-need][hidden],
#rwAgentSettingsNav [data-rw-level-need][hidden],
#rwAgentDashInvoices[hidden],
[data-rw-level-off],
body.ra-agent-viewer #rwAgentDashRecentInvoiceRow,
.ra-portal__level-chip[hidden]{
  display: none !important;
}

body.ra-bank-readonly :is(#rwBankAdd, #rwBankStripe, #rwBankSave, #rwBankDelete, #rwBankLedgerRename, #rwBankLedgerDelete, #rwBankLedgerUse){
  display: none !important;
}

body.ra-agent-viewer :is(#rwComposerForm, #rwPeopleAdd, #rwPeopleSave, #rwPeopleDelete, #rwAgentEstimateAdd, #rwAgentEstimateCreateSend),
body.ra-agent-viewer #rwAgentPages .ra-people__plus{
  display: none !important;
}

.ra-portal__level-chip{
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 4px 9px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.ra-agent-levels__info{
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: #2563eb;
  font: italic 700 0.72rem/1 Georgia, serif;
  vertical-align: middle;
  cursor: pointer;
}

.ra-agent-levels{
  position: relative;
  max-width: 460px;
}

.ra-agent-levels__list{
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ra-agent-levels__row{
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.ra-agent-levels__row.is-mine{
  border-color: #2563eb;
  background: #eff6ff;
}

.ra-agent-levels__name{
  margin: 0 0 4px;
  font-weight: 700;
}

.ra-agent-levels__name b{
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 50%;
  background: #1e293b;
  color: #fff;
  font-size: 0.75rem;
}

.ra-agent-levels__name em{
  margin-left: 6px;
  color: #2563eb;
  font-size: 0.75rem;
  font-style: normal;
}

.ra-agent-levels__row ul{
  margin: 0;
  padding-left: 1.2rem;
  color: #475569;
  font-size: 0.85rem;
}

@media (max-width: 640px){
  .ra-portal__level-chip{
    font-size: 0.68rem;
    padding: 3px 7px;
  }
}

/* Bank results on ledgers: a payment that moved no money stays visible, marked, with the bank's reason. */
/* Soft text under the name, as the owners' status lines: red when the money did not move (failed,
   canceled, sent back), orange while it is on its way. */
.ra-pay-flag{
  display: block;
  margin: 2px 0 0;
  padding: 0;
  background: none;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.3;
  white-space: normal;
  color: #c2620a;
}

.ra-pay-flag--failed,
.ra-pay-flag--canceled,
.ra-pay-flag--returned{
  color: #c24a4a;
}

.ra-pay-flag--processing{
  color: #c2620a;
}

.ra-ledger-attempt td{
  color: #64748b;
}

.ra-ledger-attempt--failed td,
.ra-ledger-attempt--canceled td{
  background: #fef7f7;
}

.ra-ledger-attempt s{
  color: #94a3b8;
}

#rwOwnerTxStripeText{
  white-space: pre-line;
}

/* Vendors page: the Pending list belongs to the Drafts tab only, whatever opened it. */
#rwAgentInvoiceList:not([data-rw-vendor-tab-open="drafts"]) #rwAgentInvoiceListView{
  display: none !important;
}

/* On the Transactions and Pay tabs the page is one column; an open invoice is the overlay sheet. */
#rwAgentInvoiceList:is([data-rw-vendor-tab-open="transactions"], [data-rw-vendor-tab-open="pay"], [data-rw-vendor-tab-open="settings"]):not([hidden]){
  display: flex !important;
  flex-direction: column;
}

#rwAgentInvoiceList:is([data-rw-vendor-tab-open="transactions"], [data-rw-vendor-tab-open="pay"], [data-rw-vendor-tab-open="settings"]) > *{
  grid-column: auto;
  grid-row: auto;
}

@media (max-width: 1024px){
  #rwAgentInvoiceList:has(#rwAgentInvoiceDetail:not([hidden])) > :is(.ra-invoice-toolbar, .ra-owner-tabs, #rwVendorTxList, #rwVendorPayPane){
    display: none !important;
  }
}

/* Vendors page in the two-column layout (Drafts with a side pane open): the header (title and tabs) spans both columns. */
#rwAgentInvoiceList{
  grid-template-rows: auto minmax(0, 1fr);
}

#rwAgentInvoiceList > .ra-invoice-toolbar{
  grid-column: 1 / -1;
  grid-row: 1;
}

#rwAgentInvoiceList > #rwAgentInvoiceListView{
  grid-column: 1;
  grid-row: 2;
}

#rwAgentInvoiceList > :is(#rwAgentInvoiceModal, #rwAgentInvoiceEstimatePick, #rwAgentInvoicePayPage){
  grid-column: 2;
  grid-row: 2;
}

/* Paying or linking an estimate from the Transactions tab takes the page, like the Drafts list does. */
#rwAgentInvoiceList:has(#rwAgentInvoicePayPage:not([hidden])) > :is(#rwVendorTxList, #rwVendorPayPane),
#rwAgentInvoiceList:has(#rwAgentInvoiceEstimatePick:not([hidden])) > :is(#rwVendorTxList, #rwVendorPayPane){
  display: none !important;
}

/* App chrome in the platform page's blue: header, side menu, phone menu bar, and the ☰ menu. */
body.ra-portal--signed-in:not(.ra-portal--page-scroll) .ra-portal__header{
  background: var(--rw-navy-shine);
  backdrop-filter: none;
  border-bottom-color: #081628;
}

.ra-portal__sidebar{
  background: var(--rw-navy-tall);
}

.ra-portal__menu-btn{
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
}

.ra-portal__menu-btn:hover{
  background: rgba(255, 255, 255, 0.12);
}

.ra-portal__menu-list{
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--rw-navy-shine);
}

@media (min-width: 1024px){
  body.ra-portal--owner .ra-owner__nav,
  body.ra-portal--tenant .ra-owner__nav,
  body.ra-portal--agent .ra-owner__nav,
  body.ra-portal--vendor .ra-owner__nav{
    background-color: #0e243d;
    background-image: var(--rw-navy-tall);
    background-size: 100% 100%;
    gap: 1px;
  }

  .ra-owner__nav .ra-owner__nav-btn{
    padding-top: 6px;
    padding-bottom: 6px;
  }
}

/* Tenant add/edit: Has pet and the pet charge. */
.ra-tenant-pet{
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 8px 0 12px;
}
.ra-tenant-pet[hidden],
.ra-tenant-pet .ra-people__field[hidden]{
  display: none !important;
}
.ra-tenant-pet__has{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: 14px;
  cursor: pointer;
}
.ra-tenant-pet__has input{
  width: 16px;
  height: 16px;
  margin: 0;
}
/* Late fee: "Company" greys out the amount. */
#rwTenantLateFeeModeField select{
  min-width: 132px;
}
#rwTenantLateFeeField input{
  width: 88px;
}
#rwTenantLateFeeField.is-disabled,
#rwTenantPetFeeField.is-disabled{
  opacity: 0.5;
}

/* Settings → Estimates: the automatic estimates checkboxes under the tax rate. */
.ra-estimate-auto{
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid #e2e8f0;
}
.ra-estimate-auto h3{
  margin: 0 0 6px;
}
.ra-estimate-auto__row{
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 10px 0 0;
  font-size: 14px;
  cursor: pointer;
}
.ra-estimate-auto__row input{
  width: 16px;
  height: 16px;
  margin: 0;
  transform: translateY(2px);
}
.ra-estimate-auto__row span{
  color: #64748b;
  font-size: 12.5px;
}

/* The Vendor section on a new owner estimate: beige, the agent's only, never sent to the owner. */
.ra-estimate-vendor-part{
  margin: 18px 0 0;
  padding: 14px 16px;
  border: 1px solid #e7d9b8;
  border-radius: 10px;
  background: #fbf5e6;
  text-align: left;
}
.ra-estimate-vendor-part[hidden]{
  display: none !important;
}
.ra-estimate-vendor-part h4{
  margin: 0 0 8px;
  color: #7c5a12;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ra-estimate-vendor-part__note{
  margin: -4px 0 10px;
  color: #7c5a12;
  font-size: 12.5px;
  font-weight: 600;
}
.ra-estimate-vendor-part textarea{
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid #e7d9b8;
  border-radius: 8px;
  background: #fffdf7;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.ra-estimate-vendor-part__ask{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: #5b4510;
  font-size: 14px;
  cursor: pointer;
}
.ra-estimate-vendor-part__ask input{
  width: 16px;
  height: 16px;
  margin: 0;
}
/* The vendor drop-down: the search line, and the matching vendors drop under it over the page. */
.ra-vendor-drop{
  position: relative;
  margin: 8px 0 0;
}
.ra-vendor-drop[hidden]{
  display: none !important;
}
.ra-vendor-drop input[type="search"]{
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e7d9b8;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 14px;
}
/* Drops down in the beige section (pushing what is under it), never over the whole page. */
.ra-vendor-drop__list{
  position: static;
  margin: 2px 0 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #e7d9b8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}
.ra-vendor-drop__list[hidden]{
  display: none !important;
}
.ra-vendor-drop__row{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #f3ead3;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ra-vendor-drop__row:hover{
  background: #fbf5e6;
}
.ra-vendor-drop__name{
  font-size: 14px;
  font-weight: 600;
}
.ra-vendor-drop__meta{
  color: #64748b;
  font-size: 11.5px;
}
.ra-vendor-drop__empty{
  margin: 0;
  padding: 10px;
  color: #64748b;
  font-size: 13px;
}

/* Show closed estimates (and conversations), left of the search. */
.ra-show-closed{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: #334155;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.ra-show-closed input{
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

/* Every search above a table (people, properties, estimates, conversations, transactions, taxes):
   one width, 240px (115px on phones). */
.ra-invoice-head__actions input.ra-owner-tx-search{
  flex: 0 1 240px;
  width: 240px;
  min-width: 160px;
}

@media (max-width: 1024px){
  .ra-invoice-head__actions input.ra-owner-tx-search{
    flex: 1 1 115px;
    width: 115px;
    min-width: 0;
    font-size: 16px;
  }
}

/* Pay Vendors: one row per invoice (check, date, vendor, unpaid, paid, memo, amount). */
#rwVendorPayPane table.ra-invoice-grid .ra-pay-date{ width: 15%; }
#rwVendorPayPane table.ra-invoice-grid .ra-pay-owner{ width: 22%; }
#rwVendorPayPane table.ra-invoice-grid .ra-pay-balance{ width: 9%; max-width: 9%; }
#rwVendorPayPane table.ra-invoice-grid .ra-pay-memo{ width: 27%; }
#rwVendorPayPane table.ra-invoice-grid .ra-pay-amount{ width: 10%; max-width: 10%; }

/* Email Invoices: the mailbox card (any provider). */
.ra-mailbox{
  display: grid;
  gap: 10px;
  max-width: 640px;
}
.ra-mailbox__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ra-mailbox__head h3,
.ra-mailbox__title{
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.ra-mailbox__line{
  margin: 0;
}
.ra-mailbox__error{
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
}
.ra-mailbox__connected,
.ra-mailbox__actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.ra-mailbox__form,
.ra-mailbox__imap{
  display: grid;
  gap: 10px;
}
.ra-mailbox__form[hidden],
.ra-mailbox__imap[hidden],
.ra-mailbox__connected[hidden],
.ra-mailbox__server[hidden]{
  display: none;
}
.ra-mailbox__server{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 10px;
}
.ra-mailbox__help,
.ra-mailbox__server-note,
.ra-mailbox__note{
  margin: 0;
  font-size: 0.85rem;
}
.ra-mailbox__dots{
  letter-spacing: 2px;
  color: #475569;
}
@media (max-width: 600px){
  .ra-mailbox__server{
    grid-template-columns: 1fr;
  }
}

/* IRS 1099 recipient copies (Copy B). Box positions follow the official forms. */
.ra-1099{
  box-sizing: border-box;
  width: 100%;
  max-width: 8in;
  margin: 0 auto 18px;
  padding: 0.25in 0.3in;
  background: #fff;
  color: #000;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 8.5pt;
  line-height: 1.2;
  border: 1px solid #cbd5e1;
}
.ra-1099__corrected{
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px 40%;
  font-size: 7.5pt;
}
.ra-1099__grid{
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  border-top: 1.5px solid #000;
  border-left: 1px solid #000;
}
.ra-1099__cell{
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0.42in;
  padding: 3px 5px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
}
.ra-1099__cap{
  font-size: 6.5pt;
  line-height: 1.15;
}
.ra-1099__cap b{
  display: inline-block;
  min-width: 10px;
  margin-right: 2px;
  font-size: 7pt;
}
.ra-1099__val{
  font-family: "Courier New", Courier, monospace;
  font-size: 10pt;
  font-weight: 600;
  padding-top: 2px;
}
.ra-1099__val--block{
  line-height: 1.3;
}
.ra-1099__money{
  margin-top: auto;
}
.ra-1099__tick{
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid #000;
}
.ra-1099__box--check{
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
}
.ra-1099__payer{ grid-column: 1 / 7; grid-row: 1 / 3; min-height: 1.15in; }
.ra-1099__title{ grid-column: 7 / 10; grid-row: 1; justify-content: space-between; }
.ra-1099__name{ grid-column: 10 / 13; grid-row: 1; justify-content: center; font-size: 12pt; line-height: 1.15; border-right: 0; }
.ra-1099__b1{ grid-column: 7 / 10; grid-row: 2; }
.ra-1099__copy{ grid-column: 10 / 13; grid-row: 2 / 7; gap: 6px; font-size: 7pt; border-right: 0; }
.ra-1099__copy strong{ font-size: 9.5pt; }
.ra-1099__ptin{ grid-column: 1 / 4; grid-row: 3; }
.ra-1099__rtin{ grid-column: 4 / 7; grid-row: 3; }
.ra-1099__b2{ grid-column: 7 / 10; grid-row: 3; }
.ra-1099__rname{ grid-column: 1 / 7; grid-row: 4; }
.ra-1099__b3{ grid-column: 7 / 10; grid-row: 4; }
.ra-1099__rstreet{ grid-column: 1 / 7; grid-row: 5; }
.ra-1099__b4{ grid-column: 7 / 10; grid-row: 5; }
.ra-1099__rcity{ grid-column: 1 / 7; grid-row: 6; }
.ra-1099__acct{ grid-column: 1 / 7; grid-row: 7; }
.ra-1099__s1{ grid-column: 7 / 9; grid-row: 7; }
.ra-1099__s2{ grid-column: 9 / 11; grid-row: 7; }
.ra-1099__s3{ grid-column: 11 / 13; grid-row: 7; border-right: 0; }
.ra-1099__grid--misc .ra-1099__copy{ grid-row: 2 / 8; }
.ra-1099__grid > :is(.ra-1099__name, .ra-1099__copy, .ra-1099__s3){
  border-right: 1px solid #000;
}
.ra-1099__omb{ font-size: 6.5pt; }
.ra-1099__formno{ font-size: 8pt; }
.ra-1099__formno strong{ font-size: 12pt; }
.ra-1099__rev{ font-size: 6.5pt; }
.ra-1099__year{ font-size: 7pt; }
.ra-1099__year strong{ font-size: 13pt; letter-spacing: 1px; }
.ra-1099__foot{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 14px;
  padding-top: 4px;
  font-size: 7pt;
}
.ra-1099__foot strong{ font-size: 9pt; }

@media print{
  @page{ size: letter; margin: 0.4in; }
  body.ra-print-1099 > *:not(#rwTaxPrint){ display: none !important; }
  body.ra-print-1099 #rwTaxPrint{ display: block !important; }
  body.ra-print-1099 .ra-1099{
    border: 0;
    max-width: none;
    padding: 0;
    margin: 0 0 0.35in;
    break-inside: avoid;
  }
  /* One sheet per page: a form, then its instructions page when it has one. */
  body.ra-print-1099 .ra-1099{ break-after: page; }
  body.ra-print-1099 .ra-1099:last-child{ break-after: auto; }
}
#rwTaxPrint{ display: none; }

/* Taxes page (agent) and the 1099 dialogs, also used by the owner's Documents page. */
.ra-tax-year{
  flex: 0 0 auto;
  width: auto;
}
.ra-tax-intro{
  margin: 8px 0 4px;
  max-width: 900px;
}
.ra-tax-bar{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
}
.ra-tax-bar__actions{
  display: inline-flex;
  gap: 8px;
}
.ra-tax-grid{
  width: 100%;
  table-layout: fixed;
}
.ra-tax-grid .ra-inv-check{ width: 36px; }
.ra-tax-grid .ra-tax-name{ width: 26%; }
.ra-tax-grid .ra-tax-tin{ width: 12%; }
.ra-tax-grid .ra-tax-class{ width: 22%; }
.ra-tax-grid .ra-tax-money{ width: 120px; text-align: left !important; }
.ra-tax-grid .ra-tax-status{ width: 160px; }
.ra-tax-grid .ra-tax-act{ width: 340px; }
.ra-tax-grid td{
  overflow: hidden;
  text-overflow: ellipsis;
}
.ra-tax-name small,
.ra-tax-unknown small{
  display: block;
  color: #64748b;
  font-size: 0.8rem;
}
/* Taxes → Unidentified email. The owner/vendor drop list opens over the rows, so its cell does not clip. */
.ra-tax-unknown .ra-tax-when{ width: 110px; }
.ra-tax-unknown .ra-tax-from{ width: 30%; }
.ra-tax-unknown .ra-tax-status{ width: 160px; }
.ra-tax-unknown .ra-tax-assign{ width: 300px; overflow: visible; }
.ra-tax-unknown .ra-tax-act{ width: 250px; }
.ra-tax-missing{ color: #b91c1c; }
.ra-tax-w9{
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 600;
}
/* Row buttons: side by side, wrapping onto a second line when the column is narrowed. */
.ra-tax-act__btns{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}
.ra-tax-act__btns .ra-vendor__btn{ flex: 0 0 auto; width: auto !important; margin: 0 !important; }
/* The list and the Unidentified list each show only on their own tabs (the list card rules set display). */
#rwTaxes :is(.ra-owner__list, [data-rw-tax-main])[hidden]{ display: none !important; }
.ra-tax-docs{ width: 100%; max-width: 900px; }

.ra-tax-sheet{
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: start center;
  padding: 24px 16px;
  overflow: auto;
  background: rgba(15, 23, 42, 0.55);
}
.ra-tax-sheet[hidden]{ display: none; }
.ra-tax-sheet__panel{
  box-sizing: border-box;
  width: min(100%, 560px);
  padding: 16px 20px 20px;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
}
.ra-tax-sheet__panel--form{
  display: grid;
  gap: 10px;
}
.ra-tax-sheet__panel--paper{
  width: min(100%, 8.8in);
}
.ra-tax-sheet__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.ra-tax-sheet__head h2{
  margin: 0;
  font-size: 1.1rem;
}
.ra-tax-sheet__tools{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ra-tax-sheet__lead{ margin: 0; font-size: 0.85rem; }
.ra-tax-sheet__row{
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
}
.ra-tax-sheet__row--city{
  grid-template-columns: minmax(0, 1fr) 80px 110px;
}
.ra-tax-sheet__actions{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.ra-tax-sheet__paper{
  overflow-x: auto;
  padding: 12px 0;
  background: #e2e8f0;
  border-radius: 8px;
}
@media (max-width: 700px){
  .ra-tax-sheet__row,
  .ra-tax-sheet__row--city{ grid-template-columns: 1fr; }
  .ra-tax-grid .ra-tax-class,
  .ra-tax-grid .ra-tax-tin{ display: none; }
  .ra-tax-grid .ra-tax-act{ width: 120px; }
  .ra-1099{ min-width: 7.2in; }
}

/* Pending invoices: an open email invoice is a card over the dimmed page, like the invoice timeline;
   the list keeps its full width and height. */
@media (min-width: 1025px){
  #rwAgentInvoiceListView.is-draft-open #rwAgentInvoiceSplit{
    display: flex;
    flex-direction: column;
  }
  #rwAgentInvoiceListView.is-draft-open #rwAgentInvoices{
    width: 100%;
    max-width: 100%;
  }
  #rwAgentInvoiceListView:not(.is-draft-open) #rwAgentInvoices:has(.ra-invoice-grid--draft){
    width: 100%;
    max-width: 100%;
  }
  #rwAgentInvoiceListView.is-draft-open #rwAgentInvoiceDraftPane:not([hidden]){
    position: fixed;
    z-index: 80;
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px));
    right: 0;
    bottom: 0;
    left: var(--rw-side-nav, 144px);
    display: grid;
    align-items: start;
    justify-items: center;
    padding: 5px 32px 16px;
    overflow: auto;
    background: rgba(15, 23, 42, 0.45);
    border-radius: 0;
  }
  #rwAgentInvoiceDraftPane > :is(#rwEmailInvoiceForm, #rwEmailInvoiceLinePage):not([hidden]){
    box-sizing: border-box;
    width: 50vw;
    max-width: 50vw;
    background: #e2e8f0;
    border: 2px solid #334155;
    border-radius: 16px;
    padding: 16px 20px 1lh;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  }
}

/* Drafts tab: an opened invoice is the card over the page (as on Transactions and Pay), so the list
   keeps one full-width column instead of the side-by-side split other pages use. Paying or linking
   an estimate still takes the page. */
@media (min-width: 1025px){
  #rwAgentInvoiceList[data-rw-vendor-tab-open="drafts"]:not([hidden]):not(:has(#rwAgentInvoicePayPage:not([hidden]))):not(:has(#rwAgentInvoiceEstimatePick:not([hidden]))){
    display: flex !important;
    flex-direction: column;
  }
  #rwAgentInvoiceList[data-rw-vendor-tab-open="drafts"]:not(:has(#rwAgentInvoicePayPage:not([hidden]))):not(:has(#rwAgentInvoiceEstimatePick:not([hidden]))) > *{
    grid-column: auto;
    grid-row: auto;
  }
}

/* Form 1099-MISC (Rev. April 2025): boxes 1-18 in the official places. */
.ra-1099__grid--misc{
  grid-template-columns: 27% 17% 18.5% 18.5% 19%;
  grid-template-areas:
    "payer payer b1 omb title"
    "payer payer b2 omb title"
    "payer payer b3 b4 copy"
    "ptin rtin b5 b6 copy"
    "rname rname b7 b8 copy"
    "rstreet rstreet b9 b10 copy"
    "rcity rcity b11 b12 copy"
    "acct b13 b14 b15 copy"
    "acct b13 b16 b17 b18";
}
.ra-1099__grid--misc > .ra-1099__payer{ grid-area: payer; min-height: 0; }
.ra-1099__grid--misc > .ra-1099__ptin{ grid-area: ptin; }
.ra-1099__grid--misc > .ra-1099__rtin{ grid-area: rtin; }
.ra-1099__grid--misc > .ra-1099__rname{ grid-area: rname; }
.ra-1099__grid--misc > .ra-1099__rstreet{ grid-area: rstreet; }
.ra-1099__grid--misc > .ra-1099__rcity{ grid-area: rcity; }
.ra-1099__grid--misc > .ra-1099__acct{ grid-area: acct; }
.ra-1099m__b1{ grid-area: b1; }
.ra-1099m__omb{ grid-area: omb; justify-content: space-between; }
.ra-1099m__title{ grid-area: title; justify-content: center; font-size: 12pt; line-height: 1.15; }
.ra-1099m__b2{ grid-area: b2; }
.ra-1099m__b3{ grid-area: b3; }
.ra-1099m__b4{ grid-area: b4; }
.ra-1099m__copy{ grid-area: copy; gap: 6px; font-size: 7pt; }
.ra-1099m__copy strong{ font-size: 9.5pt; }
.ra-1099m__b5{ grid-area: b5; }
.ra-1099m__b6{ grid-area: b6; }
.ra-1099m__b7{ grid-area: b7; }
.ra-1099m__b8{ grid-area: b8; }
.ra-1099m__b9{ grid-area: b9; }
.ra-1099m__b10{ grid-area: b10; }
.ra-1099m__b11{ grid-area: b11; }
.ra-1099m__b12{ grid-area: b12; }
.ra-1099m__b13{ grid-area: b13; flex-direction: column; align-items: flex-start; }
.ra-1099m__b14{ grid-area: b14; background: #e5e7eb; }
.ra-1099m__b15{ grid-area: b15; }
.ra-1099m__b16{ grid-area: b16; }
.ra-1099m__b17{ grid-area: b17; }
.ra-1099m__b18{ grid-area: b18; }
.ra-1099__grid--misc .ra-1099__cell{ min-height: 0.38in; }

/* Back of the form: Instructions for Recipient. */
.ra-1099--back{
  font-size: 7.5pt;
  line-height: 1.3;
}
.ra-1099__back-title{
  margin: 0 0 6px;
  font-size: 10pt;
}
.ra-1099__back-cols{
  column-count: 2;
  column-gap: 0.3in;
}
.ra-1099__back-cols p{
  margin: 0 0 5px;
  break-inside: avoid;
}

/* Side menu: items sit close together; the section breaks (MANAGEMENT, FINANCIALS, REPORTS) keep their space. */
@media (min-width: 1024px){
  body:is(.ra-portal--owner, .ra-portal--tenant, .ra-portal--agent, .ra-portal--vendor) .ra-owner__nav{
    gap: 6px;
  }
  body:is(.ra-portal--owner, .ra-portal--tenant, .ra-portal--agent, .ra-portal--vendor) .ra-owner__nav-row{
    gap: 6px;
  }
  .ra-owner__nav .ra-owner__nav-btn{
    padding-top: 3px;
    padding-bottom: 3px;
    line-height: 1.3;
  }
  .ra-owner__nav .ra-owner__nav-sub,
  .ra-owner__nav .ra-owner__nav-sub.is-modal{
    gap: 6px;
    padding-top: 6px;
    padding-bottom: 0;
  }
}

/* 1099-MISC: recipient's name, street and city are one tall box on the IRS form (captions beside 7, 9 and 11). */
.ra-1099__grid--misc > .ra-1099__rname,
.ra-1099__grid--misc > .ra-1099__rstreet{
  border-bottom: 0;
}

/* 1099-MISC: Account number sits on the bottom row, left of box 16; box 13 FATCA is the row above, left of 14. */
.ra-1099__grid--misc{
  grid-template-areas:
    "payer payer b1 omb title"
    "payer payer b2 omb title"
    "payer payer b3 b4 copy"
    "ptin rtin b5 b6 copy"
    "rname rname b7 b8 copy"
    "rstreet rstreet b9 b10 copy"
    "rcity rcity b11 b12 copy"
    "b13 b13 b14 b15 copy"
    "acct acct b16 b17 b18";
}
.ra-1099m__b13{
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
}

/* 1099 checkboxes (CORRECTED, 2/7, 13): a true square that never shrinks beside a long caption. */
.ra-1099__tick{
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 11px;
  height: 11px;
  min-width: 11px;
  border: 1px solid #000;
}
.ra-1099__box--check{
  gap: 6px;
}

/* 1099 sheets: the recipient's Copy B and Copy 2 share one page; instructions and Copy C get their own. */
.ra-1099__gap{ display: inline-block; width: 18px; }
.ra-1099-sheet + .ra-1099-sheet{ margin-top: 18px; }
.ra-1099-sheet--pair .ra-1099 + .ra-1099{ margin-top: 10px; }

@media print{
  body.ra-print-1099 .ra-1099{ break-after: auto; }
  body.ra-print-1099 .ra-1099-sheet{ break-after: page; }
  body.ra-print-1099 .ra-1099-sheet:last-child{ break-after: auto; }
  body.ra-print-1099 .ra-1099-sheet + .ra-1099-sheet{ margin-top: 0; }
  /* Two forms fit one Letter page with a tear line between them. */
  body.ra-print-1099 .ra-1099-sheet--pair .ra-1099{ margin: 0; }
  body.ra-print-1099 .ra-1099-sheet--pair .ra-1099 + .ra-1099{
    margin-top: 0.3in;
    padding-top: 0.3in;
    border-top: 1px dashed #64748b;
  }
  body.ra-print-1099 .ra-1099-sheet--pair .ra-1099__cell{ min-height: 0.34in; }
  body.ra-print-1099 .ra-1099-sheet--pair .ra-1099__payer{ min-height: 0.95in; }
}

/* Taxes: "sent on" line above a form that was sent. */
.ra-tax-sheet__note{
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #075985;
  font-size: 0.85rem;
}
.ra-tax-sheet__note[hidden]{ display: none; }

/* The filled IRS PDF, shown in the browser's own viewer. */
.ra-tax-pdf{
  display: block;
  width: 100%;
  height: min(78vh, 1000px);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
}

.ra-tax-pdf-print{
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* Owner and vendor onboarding: dashboard task card, the Tax form page, and the agent's badge. */
.ra-onboard{
  margin: 0 0 14px;
  padding: 16px 18px;
  border: 1px solid #e7c27a;
  border-radius: 12px;
  background: #fff8eb;
  line-height: 1.4;
}

.ra-onboard[hidden]{ display: none; }

.ra-onboard--page{
  border-color: #cbd5e1;
  background: #f8fafc;
}

.ra-onboard__title{
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.ra-onboard__lead{
  margin: 0 0 6px;
  font-weight: 600;
  color: #334155;
}

.ra-onboard__list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.ra-onboard__list li{
  display: flex;
  align-items: center;
  gap: 8px;
}

.ra-onboard__mark{
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid #94a3b8;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.ra-onboard__list li.is-done{ color: #166534; }

.ra-onboard__list li.is-done .ra-onboard__mark{
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.ra-onboard__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ra-onboard--page .ra-vendor__btn{ margin-top: 10px; }

/* "Your property manager can't send you any payments until you sign your tax form." */
.ra-onboard__alert{
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 650;
}

.ra-ptf{
  display: grid;
  gap: 12px;
  max-width: 760px;
}

.ra-ptf__choices{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.ra-ptf__choices legend{
  margin-bottom: 6px;
  font-weight: 650;
}

.ra-ptf__choice{
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.ra-ptf__choice.is-active{
  border-color: #263e5a;
  box-shadow: 0 0 0 1px #263e5a;
}

.ra-ptf__choice span{ display: grid; gap: 2px; }

.ra-ptf__choice small{ color: #475569; }

.ra-ptf__head{
  margin: 6px 0 0;
  font-size: 1rem;
}

.ra-ptf__row{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.ra-ptf__row[hidden]{ display: none; }

.ra-ptf__field > span{ align-self: end; }

.ra-ptf__field{
  display: grid;
  grid-template-rows: 1fr auto; /* label grows, box sits at the bottom so side-by-side boxes line up */
  gap: 4px;
  font-size: 0.85rem;
  color: #334155;
}

.ra-ptf__field input,
.ra-ptf__field select{
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  background: #fff;
}

.ra-ptf__check{
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.9rem;
}

.ra-ptf__cert{
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.8rem;
  color: #334155;
}

.ra-ptf__cert p{ margin: 6px 0 0; }

.ra-ptf__fine{
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
}

.ra-ptf__steps{
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.ra-ptf__more summary{
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.ra-ptf__hint{
  margin: 0;
  color: #b91c1c;
  font-weight: 600;
}

.ra-ptf__hint:empty{ display: none; }

/* The tax ID problem, right under the tax ID field. */
.ra-ptf__err{
  margin: -6px 0 0;
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 600;
}

.ra-ptf__err:empty{ display: none; }

.ra-ptf__actions{ display: flex; gap: 8px; }

/* "Not the right form? Change", "Something changed? Fill a new form". */
.ra-ptf__link{
  padding: 0;
  border: 0;
  background: none;
  color: #1d4ed8;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.ra-ptf__picked{
  margin: 0;
  font-size: 0.95rem;
}

.ra-ptf__note{
  margin: 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.85rem;
}

.ra-ptf__refill{
  margin: 0;
  font-size: 0.85rem;
}

/* The emailed link's last step: everything is done. */
.ra-ptf-done{
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 18px 8px 6px;
  text-align: center;
}

.ra-ptf-done__mark{
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
}

.ra-ptf-done h2{
  margin: 0;
  font-size: 1.3rem;
}

.ra-ptf-done p{ margin: 0; }

.ra-ptf-done .ra-vendor__btn--primary{
  border-color: #263e5a;
  background: #263e5a;
  color: #fff;
}

.ra-ptf-done .ra-ptf__actions{
  flex-wrap: wrap;
  justify-content: center;
}

.ra-ptf-done a.ra-vendor__btn{ text-decoration: none; }

.ra-onboard-badge{
  margin: 4px 0 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.ra-onboard-badge[hidden]{ display: none; }

.ra-onboard-badge.is-done{
  background: #f0fdf4;
  color: #166534;
}

.ra-onboard-badge.is-missing{
  background: #fff7ed;
  color: #9a3412;
}

.ra-onboard-badge__view{
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #1d4ed8;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.ra-ptf .ra-vendor__btn--primary,
.ra-onboard .ra-vendor__btn--primary{
  border-color: #263e5a;
  background: #263e5a;
  color: #fff;
}

/* Title and its filters on one row (Vendors transactions). */
.ra-tx-titlebar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 8px;
}
.ra-tx-titlebar > .ra-owner__title{
  margin: 0;
}
.ra-tx-titlebar > .ra-invoice-head__actions{
  margin: 0 0 0 auto;
}
.ra-tx-titlebar + .ra-owner__muted:empty{
  display: none;
}

/* Owners → Single payment and Charge: the table's title and every control on one row, like
   Transactions. The controls wrap right-aligned only when the window is too narrow. */
.ra-owner-pane-bar > .ra-owner__title{
  flex: 0 0 auto;
  white-space: nowrap;
}
.ra-owner-pane-bar > .ra-owner-pay-tools{
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 12px;
  margin: 0 0 0 auto;
}
#rwOwnerFeeModal .ra-owner-pane-bar > .ra-owner-pay-tools > .ra-people__field,
.ra-owner-pane-bar > .ra-owner-pay-tools > .ra-people__field{
  flex: 0 0 auto;
  max-width: none;
  align-self: center;
}
.ra-owner-pane-bar .ra-people__field > select,
.ra-owner-pane-bar .ra-search-select__btn{
  width: 180px;
}
.ra-owner-pane-bar .ra-people__field > input[type="search"]{
  width: 200px;
}
.ra-owner-pane-bar .ra-owner-pay-selected{
  white-space: nowrap;
}
.ra-owner-pane-bar .ra-owner-fee-actions{
  align-items: center;
  margin-left: 0;
}
.ra-owner-pane-bar #rwOwnerPayDraft{
  margin-left: 0;
}
/* Owners → Charge: an owner's next properties under the first, the name quieter so the owner reads once. */
.ra-owner-pane-bar + .ra-owner-fee-status{
  min-height: 0;
  margin-top: 0;
}
/* Invoice detail: the invoice page itself, with no card around it. */
#rwAgentInvoiceModal.is-open .ra-invoice-sheet__panel:has([data-rw-invoice-view]){
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
}
#rwAgentInvoiceModal.is-open .ra-invoice-sheet__panel:has([data-rw-invoice-view]) .ra-invoice-sheet__x,
#rwAgentInvoiceDetail:has([data-rw-invoice-view]) > .ra-owner__title,
#rwVendorInvoiceDetail:has([data-rw-invoice-view]) > .ra-list-x,
#rwVendorInvoiceDetail:has([data-rw-invoice-view]) > .ra-owner__title{
  display: none !important;
}
#rwVendorInvoiceDetail:has([data-rw-invoice-view]){
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.ra-invoice-view{
  position: relative;
}
.ra-invoice-view .ra-invoice-paper{
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}
.ra-invoice-view__tools{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ra-invoice-view__tool{
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  cursor: pointer;
}
.ra-invoice-view__tool:hover{
  background: #f1f5f9;
}
.ra-invoice-view__tool--void{
  color: #b91c1c;
}
.ra-invoice-view__tool--void:hover{
  background: #fee2e2;
}
/* Trash on the draft review, just left of its ×. */
#rwEmailInvoiceTrash{
  flex: none;
  margin: 0 8px 0 auto;
}
.ra-invoice-view__x{
  position: static;
  margin: 0;
}
/* Paid state at the top of the paper, Approve or Add payment under it. */
.ra-invoice-view__status{
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
}
.ra-invoice-view__status .ra-status-chip{
  margin-left: 0;
  font-weight: 800;
  white-space: nowrap;
}
.ra-invoice-view__status .ra-invoice-actions{
  display: flex;
  gap: 6px;
  margin: 0;
}
/* From file: the total is typed right in the blue total bar, as it shows on a sent invoice. */
.ra-invoice-file-total .ra-invoice-paper__trow--total{
  align-items: center;
  gap: 12px;
}
.ra-invoice-file-total #rwVendorInvoiceOwnTotalField{
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}
.ra-invoice-file-total #rwVendorInvoiceOwnTotalField > span:first-child{
  display: none;
}
.ra-invoice-file-total #rwVendorInvoiceOwnTotalField .ra-invoice-mark-wrap{
  display: block;
  position: relative;
}
/* #rwVendorInvoiceForm in front: the form's own inputs are painted white (#rwVendorInvoiceForm:not([hidden]) input). */
#rwVendorInvoiceForm .ra-invoice-file-total #rwVendorInvoiceOwnTotal{
  width: 140px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 4px 8px 4px 20px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  font: inherit;
  text-align: right;
}
#rwVendorInvoiceForm .ra-invoice-file-total #rwVendorInvoiceOwnTotal:disabled{
  opacity: 0.55;
  cursor: not-allowed;
}
.ra-invoice-file-total #rwVendorInvoiceOwnTotalField .ra-invoice-mark{
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
}
.ra-invoice-file-total .ra-invoice-total-check{
  justify-content: flex-end;
  text-align: right;
}
/* A vendor's uploaded file under review: the hint over the sheet, like the vendor's. */
#rwAgentUploadHintSlot #rwEmailInvoiceHint:empty{
  display: none;
}
#rwAgentUploadHintSlot #rwEmailInvoiceHint{
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  color: #b91c1c;
}
/* Under the total bar: the vendor's total is not the one on the file. */
.ra-invoice-total-warn{
  margin: 6px 0 0;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}
/* The estimates list shows once ⋯ on Linked estimates is pressed. */
#rwAgentUploadForm:not(.is-picking) #rwEmailInvoiceEstimateField{
  display: none;
}
#rwAgentUploadForm [data-rw-paper-party-slot] .ra-estimate-pair > :last-child{
  flex: 1 1 auto;
  min-width: 0;
}
.ra-invoice-file-total__amount{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ra-invoice-file-total__amount .ra-estimate-check-mark{
  color: #fff;
}
/* From file: what was read for the total, and the link that confirms it before Send. */
.ra-invoice-total-check{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 4px 0 8px;
  font-size: 13px;
}
.ra-invoice-total-check.is-verified{
  color: #027a48;
  font-weight: 700;
}
.ra-invoice-total-check__verify{
  padding: 0;
  border: 0;
  background: none;
  color: #1d4ed8;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
/* Sending a file: the green ✓ turns into a green spinner until the file is up. */
#rwVendorInvoiceCheck.is-busy{
  pointer-events: none;
}
#rwVendorInvoiceCheck.is-busy svg{
  visibility: hidden;
}
#rwVendorInvoiceCheck.is-busy::after{
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(21, 128, 61, 0.25);
  border-top-color: #15803d;
  border-radius: 50%;
  animation: ra-spin 0.7s linear infinite;
}
#rwVendorInvoiceCheck:disabled{
  opacity: 0.4;
  cursor: not-allowed;
}
/* Invoice # and Total the agent corrects before approving. */
.ra-invoice-fix{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin-top: 12px;
}
.ra-invoice-fix__field{
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
}
.ra-invoice-fix__field input{
  width: 140px;
  padding: 6px 8px;
  border: 1px solid var(--paper-line, #dbe4ee);
  border-radius: 6px;
  font: inherit;
  font-weight: 400;
  font-size: 14px;
  background: #fff;
  color: inherit;
}
.ra-invoice-fix__field input:disabled{
  opacity: 0.6;
}
.ra-invoice-fix .ra-estimate-reply{
  width: auto;
  margin: 0;
}
.ra-invoice-fix__note{
  flex-basis: 100%;
  font-size: 12px;
  color: #b42318;
}
.ra-invoice-fix__note:empty{
  display: none;
}
.ra-invoice-paper__tail{
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-line, #dbe4ee);
}
.ra-invoice-paper--file{
  padding: 0 0 24px;
  overflow: hidden;
}
.ra-invoice-paper--file .ra-invoice-file-pagelet iframe,
.ra-invoice-paper--file .ra-invoice-file-pagelet img{
  display: block;
  width: 100%;
  aspect-ratio: 8.5 / 11;
  height: auto;
  border: 0;
  object-fit: contain;
  object-position: top center;
  background: #fff;
}
.ra-invoice-paper--file .ra-invoice-file-pagelet .ra-invoice-doc{
  padding: 48px 56px 0;
}
.ra-invoice-paper--file .ra-invoice-paper__tail{
  margin: 0 56px;
}
.ra-invoice-facts{
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
  text-align: left;
}
.ra-invoice-facts p{
  margin: 0;
}
.ra-invoice-facts__head{
  font-weight: 700;
  text-decoration: underline;
}
.ra-invoice-facts__head ~ .ra-invoice-facts__head{
  margin-top: 1.5em;
}
.ra-invoice-facts__paid{
  color: #15803d;
  font-weight: 700;
}
.ra-invoice-facts__due{
  color: #b91c1c;
  font-weight: 700;
}
.ra-invoice-facts__steps{
  margin: 0;
  padding-left: 1.5em;
}
.ra-invoice-facts__steps time{
  margin-right: 0.4em;
  font-variant-numeric: tabular-nums;
}
.ra-invoice-facts .ra-estimate-pair{
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.4em;
  margin: 1.5em 0 0;
  font-size: inherit;
}
.ra-invoice-facts .ra-estimate-pair > span:first-child{
  font-weight: 700;
}
.ra-invoice-facts .ra-linked-estimate__close{
  font-size: inherit;
}
.ra-invoice-paper__tail .ra-estimate-photos,
.ra-invoice-paper__tail .ra-estimate-reply-slot{
  margin-top: 12px;
}
@media (max-width: 640px){
  .ra-invoice-view__status{
    position: static;
    align-items: flex-start;
    min-height: 40px;
    margin: 0 0 8px;
    padding: 8px 120px 0 0;
    transform: none;
  }
  .ra-invoice-paper--file .ra-invoice-paper__tail{
    margin: 0 18px;
  }
}
/* Add payment: its own small dialog over the open invoice. */
.ra-pay-dialog{
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}
.ra-pay-dialog[hidden]{
  display: none !important;
}
.ra-pay-dialog > .ra-estimate-line-page{
  width: min(420px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 2px solid #334155;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3);
}
.ra-pay-dialog .ra-portal__chat-title-bar{
  position: static;
  border-radius: 14px 14px 0 0;
}
.ra-pay-dialog .ra-estimate-footer{
  position: static;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px 16px;
  background: transparent;
  box-shadow: none;
}

/* Invoice page: number, date and estimate under the company on the left; the right holds ×, print,
   the paid state, and Add payment. */
.ra-invoice-view .ra-invoice-paper__head{
  flex-direction: column;
  gap: 12px;
}
.ra-invoice-view .ra-invoice-paper__title{
  text-align: left;
}
.ra-invoice-view .ra-invoice-paper__title dl > div{
  justify-content: flex-start;
}
.ra-invoice-view__status{
  top: 56px;
  right: 16px;
  left: auto;
  align-items: flex-end;
  transform: none;
}
/* Invoice page header: INVOICE #435 on one line, then Estimate # on the left and Date on the right. */
.ra-invoice-view .ra-invoice-paper__title{
  align-self: stretch;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 18px;
  row-gap: 4px;
}
.ra-invoice-view .ra-invoice-paper__title h2{
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}
.ra-invoice-view .ra-invoice-paper__title dl{
  display: contents;
}
.ra-invoice-view .ra-invoice-paper__title dl > div{
  grid-row: 2;
  grid-column: 1;
}
.ra-invoice-view .ra-invoice-paper__title dl > div:has(> [data-rw-invoice-paper-number]){
  grid-row: 1;
  grid-column: 2;
}
.ra-invoice-view .ra-invoice-paper__title dl > div:has(> [data-rw-invoice-paper-number]) dt{
  display: none;
}
.ra-invoice-view .ra-invoice-paper__title [data-rw-invoice-paper-number]{
  min-width: 0;
  font-size: 30px;
  font-weight: 300;
  letter-spacing: 0.18em;
  color: var(--paper-accent);
}
.ra-invoice-view .ra-invoice-paper__title [data-rw-invoice-paper-number]::before{
  content: "#";
}
.ra-invoice-view .ra-invoice-paper__title dl > div:has(> [data-rw-invoice-paper-date]){
  grid-column: 2;
  justify-self: end;
}
.ra-invoice-view .ra-invoice-paper__title dd{
  min-width: 0;
}
/* The open invoice page is its own window at every width, in front of the navy header,
   20px from the top of the screen. */
#rwAgentInvoiceModal.is-open:has([data-rw-invoice-view]){
  position: fixed;
  inset: 0;
  top: 0 !important;
  z-index: 100;
  display: grid !important;
  align-items: start;
  justify-items: center;
  padding: 4px 16px 0;
  background: rgba(15, 23, 42, 0.45);
  overflow: hidden;
}
#rwAgentInvoiceModal.is-open .ra-invoice-sheet__panel:has([data-rw-invoice-view]){
  position: relative;
  width: min(816px, 100%);
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 8px);
  overflow: auto;
}
#rwAgentInvoiceModal.is-open:has([data-rw-invoice-view]) [data-rw-agent-invoice-back]{
  display: none !important;
}
/* Less empty paper above the invoice title when it is open on its own. */
.ra-invoice-view > .ra-invoice-paper{
  padding-top: 24px;
}
.ra-invoice-view__tools{
  top: 6px;
}
.ra-invoice-view__status{
  top: 44px;
}
/* Add invoice to owner opens like a blank owner estimate: the paper itself is the form. */
body:has(#rwAgentOwnerInvoiceForm:not([hidden])) .ra-portal__main{
  z-index: auto;
}
#rwAgentOwnerInvoiceForm:not([hidden]){
  display: block;
  position: fixed;
  z-index: 100;
  top: calc(env(safe-area-inset-top, 0px) - 5px);
  left: 50%;
  transform: translateX(-50%);
  width: min(708px, calc(100vw - 32px));
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px);
  margin: 0;
  padding: 0;
  overflow: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
}

#rwAgentOwnerInvoiceForm > .ra-invoice-paper-x{
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  margin: 0 !important;
}
#rwAgentOwnerInvoiceForm .ra-invoice-paper{
  width: 100%;
  box-sizing: border-box;
}
#rwAgentOwnerInvoiceForm > #rwAgentOwnerInvoiceHint:empty{
  display: none;
}
#rwAgentOwnerInvoiceForm > #rwAgentOwnerInvoiceHint{
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  color: #b91c1c;
}
#rwAgentOwnerInvoiceForm > #rwAgentOwnerInvoicePost{
  display: block;
  margin: 12px auto 16px;
}
#rwAgentOwnerInvoiceForm [data-rw-paper-party-slot] .ra-estimate-pair{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}
#rwAgentOwnerInvoiceForm [data-rw-paper-party-slot] .ra-estimate-pair > span:first-child{
  min-width: 64px;
  color: var(--paper-muted);
  font-size: 13px;
}
#rwAgentOwnerInvoiceForm [data-rw-paper-party-slot] select{
  flex: 1;
  min-width: 0;
  height: 34px;
  font-size: 14px;
}
#rwAgentOwnerInvoiceForm [data-rw-paper-party-slot] .ra-estimate-tax-line{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 4px 0 0;
  font-size: 13px;
}
#rwAgentOwnerInvoiceForm [data-rw-paper-party-slot] .ra-linked-estimate__close{
  display: block;
  margin: 0 0 6px 72px;
  font-size: 13px;
}
@media (min-width: 1025px){
  #rwAgentOwnerInvoiceForm:not([hidden]){
    left: calc(var(--rw-side-nav, 144px) + (100vw - var(--rw-side-nav, 144px)) / 2);
    width: min(708px, calc(100vw - var(--rw-side-nav, 144px) - 32px));
  }
}
/* Add invoice sheet: as wide as the opened invoice, ✓ left of the red ×, delete draft left of ✓. */
#rwAgentOwnerInvoiceForm:not([hidden]){
  width: min(708px, calc(100vw - 32px));
}
@media (min-width: 1025px){
  #rwAgentOwnerInvoiceForm:not([hidden]){
    width: min(708px, calc(100vw - var(--rw-side-nav, 144px) - 32px));
  }
}
#rwAgentOwnerInvoiceForm > .ra-estimate-save-v,
#rwAgentOwnerInvoiceForm > .ra-estimate-draft-trash{
  position: absolute;
  top: 10px;
  z-index: 2;
  margin: 0 !important;
}
#rwAgentOwnerInvoiceForm > .ra-estimate-save-v{
  right: 52px;
}
#rwAgentOwnerInvoiceForm > .ra-estimate-draft-trash{
  right: 92px;
}
#rwAgentOwnerInvoiceForm > .ra-estimate-draft-trash[hidden]{
  display: none;
}

/* Opened invoice: the paid state and Add payment sit in the middle at the top. */
.ra-invoice-view__status{
  top: 14px;
  left: 50%;
  right: auto;
  align-items: center;
  transform: translateX(-50%);
}@media (max-width: 640px){
  .ra-invoice-view__status{
    left: auto;
    transform: none;
    align-items: flex-start;
  }
}
/* Vendors Transactions in the paper viewer: same paper, with the paid state and Add payment centered
   at the top, Invoice # left with the Date on its row, and Estimate # under Invoice #. */
.ra-tx-paper{
  position: relative;
}
.ra-tx-paper > .ra-invoice-view__status{
  position: absolute;
  top: 14px;
  left: 50%;
  right: auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
}
.ra-tx-paper .ra-invoice-paper__head{
  flex-wrap: wrap;
  row-gap: 12px;
}
.ra-tx-paper .ra-invoice-paper__title{
  display: contents;
}
.ra-tx-paper .ra-invoice-paper__title h2{
  margin: 0;
}
.ra-tx-paper .ra-invoice-paper__title dl{
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  text-align: left;
}
.ra-tx-paper .ra-invoice-paper__title dl > div{
  grid-column: 1;
  justify-content: flex-start;
}
.ra-tx-paper .ra-invoice-paper__title dl > div:has(> [data-rw-invoice-paper-number]){
  grid-row: 1;
}
.ra-tx-paper .ra-invoice-paper__title dl > div:has(> [data-rw-invoice-paper-date]){
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-end;
}
.ra-tx-paper .ra-invoice-paper__title dl > div:has(> [data-rw-invoice-paper-estimate]){
  grid-row: 2;
}
.ra-tx-paper .ra-invoice-paper__title dd{
  min-width: 0;
}

/* Add payment opens over the paper viewer too. */
.ra-pay-dialog{
  z-index: 1300;
}
/* Vendors Transactions paper starts flush with the top of the page. */
.ra-invoice-paper-overlay:has(.ra-tx-paper){
  padding-top: 0 !important;
  padding-bottom: 24px !important;
}
/* The Add invoice paper is drawn like the one the viewer opens: same width and scale. A new invoice
   has no number yet, so its Invoice # row stays empty. */
#rwAgentOwnerInvoiceForm .ra-tx-paper .ra-invoice-paper{
  zoom: 0.864;
}

/* The vendor's Add invoice opens the same way: the paper is the form, sized like the viewer's paper. */
body:has(:is(#rwVendorInvoiceForm, #rwAgentUploadForm):not([hidden])) .ra-portal__main{
  z-index: auto;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm):not([hidden]){
  display: block;
  position: fixed;
  z-index: 100;
  top: calc(env(safe-area-inset-top, 0px) - 5px);
  left: 50%;
  transform: translateX(-50%);
  width: min(708px, calc(100vw - 32px));
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px);
  margin: 0;
  padding: 0;
  overflow: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
}
@media (min-width: 1025px){
  :is(#rwVendorInvoiceForm, #rwAgentUploadForm):not([hidden]){
    left: calc(var(--rw-side-nav, 144px) + (100vw - var(--rw-side-nav, 144px)) / 2);
    width: min(708px, calc(100vw - var(--rw-side-nav, 144px) - 32px));
  }
}

:is(#rwVendorInvoiceForm, #rwAgentUploadForm) > .ra-invoice-paper-x{
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  margin: 0 !important;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) .ra-invoice-paper{
  width: 100%;
  box-sizing: border-box;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) .ra-tx-paper .ra-invoice-paper{
  zoom: 0.864;
}

#rwVendorInvoiceForm > #rwVendorInvoiceHint:empty{
  display: none;
}
#rwVendorInvoiceForm > #rwVendorInvoiceHint{
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  color: #b91c1c;
}
#rwVendorInvoiceForm > #rwVendorInvoiceSend{
  display: block;
  margin: 12px auto 16px;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-paper-party-slot] .ra-estimate-pair{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-paper-party-slot] .ra-estimate-pair > span:first-child{
  min-width: 64px;
  color: var(--paper-muted);
  font-size: 13px;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-paper-party-slot] select{
  flex: 1;
  min-width: 0;
  height: 34px;
  font-size: 14px;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-paper-party-slot] .ra-linked-estimate__close{
  display: block;
  margin: 0 0 6px 72px;
  font-size: 13px;
}
/* Scaled like the viewer's paper, the form's paper fills the sheet's width before scaling, so it is
   as wide as an opened invoice (a 100% width would scale down with it and come out narrower). */
#rwAgentOwnerInvoiceForm .ra-tx-paper .ra-invoice-paper,
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) .ra-tx-paper .ra-invoice-paper{
  width: auto;
}
/* The page layout's own sizing for the old card forms must not shrink the Add invoice sheets. */
#rwAgentOwnerInvoiceForm:not([hidden]),
:is(#rwVendorInvoiceForm, #rwAgentUploadForm):not([hidden]){
  display: block !important;
  width: min(708px, calc(100vw - 32px)) !important;
  max-width: none !important;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px) !important;
}
@media (min-width: 1025px){
  #rwAgentOwnerInvoiceForm:not([hidden]),
  :is(#rwVendorInvoiceForm, #rwAgentUploadForm):not([hidden]){
    width: min(708px, calc(100vw - var(--rw-side-nav, 144px) - 32px)) !important;
  }
}
/* Vendor sheet: ✓ left of the red ×, delete draft left of ✓. */
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) > .ra-estimate-save-v,
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) > .ra-estimate-draft-trash{
  position: absolute;
  top: 10px;
  z-index: 2;
  margin: 0 !important;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) > .ra-estimate-save-v{
  right: 52px;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) > .ra-estimate-draft-trash{
  right: 92px;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) > .ra-estimate-draft-trash[hidden]{
  display: none;
}
/* One window for every invoice: the Add invoice sheets sit exactly where the invoice viewer puts an
   opened invoice: centered on the whole screen (not on the area right of the side menu), flush with
   the top, 708px wide. */
:is(#rwAgentOwnerInvoiceForm, #rwVendorInvoiceForm, #rwAgentUploadForm).ra-invoice-window:not([hidden]){
  position: fixed !important;
  top: env(safe-area-inset-top, 0px) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: min(708px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 24px) !important;
}

/* ✓, trash, and × on the invoice: one size, one row. */
.ra-invoice-window > :is(.ra-estimate-save-v, .ra-estimate-draft-trash, .ra-invoice-paper-x){
  position: absolute;
  top: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0 !important;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  line-height: 1;
}
.ra-invoice-window > .ra-invoice-paper-x{
  right: 10px;
  font-size: 24px;
}
.ra-invoice-window > .ra-estimate-save-v{
  right: 46px;
  font-size: 20px;
}
.ra-invoice-window > .ra-estimate-draft-trash{
  right: 82px;
}
.ra-invoice-window > .ra-estimate-draft-trash[hidden]{
  display: none;
}
.ra-invoice-window > .ra-estimate-draft-trash svg{
  width: 18px;
  height: 18px;
}
/* Opened invoices start at the top like the Add invoice sheets, short or tall. */
.ra-invoice-paper-overlay:has(.ra-tx-paper) .ra-invoice-paper-shell{
  margin-top: 0;
}
/* Anything opened from an invoice opens over it: the estimate lists to choose from, the keep-draft and
   ready questions, and photos. The lists open as their own window over the invoice. */
body:has(:is(#rwAgentOwnerInvoiceEstimatePick, #rwVendorInvoiceEstimatePick, #rwAgentInvoiceEstimatePick):not([hidden])) .ra-portal__main{
  z-index: auto;
}
:is(#rwAgentOwnerInvoiceEstimatePick, #rwVendorInvoiceEstimatePick, #rwAgentInvoiceEstimatePick):not([hidden]){
  position: fixed !important;
  z-index: 1250 !important;
  top: calc(env(safe-area-inset-top, 0px) + 12px) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  flex-direction: column !important;
  width: min(520px, calc(100vw - 32px)) !important;
  max-width: none !important;
  height: auto !important;
  max-height: calc(100dvh - 24px) !important;
  margin: 0 !important;
  padding: 16px 20px !important;
  overflow: auto !important;
  background: #e2e8f0;
  border: 2px solid #334155;
  border-radius: 16px;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
}
#rwEstimateKeepModal,
#rwEstimateReadyModal,
#rwEstimatePhotoZoom,
#rwEstimatePhotoPage{
  z-index: 1300 !important;
}
/* ✓ and × are drawn icons of one size, so they line up with each other and the trash. */
.ra-invoice-window > :is(.ra-estimate-save-v, .ra-invoice-paper-x, .ra-estimate-draft-trash) svg{
  display: block;
  width: 20px;
  height: 20px;
}
.ra-invoice-window > .ra-estimate-save-v:hover{
  background: #dcfce7;
}
.ra-invoice-window > .ra-invoice-paper-x:hover,
.ra-invoice-window > .ra-estimate-draft-trash:hover{
  background: #fee2e2;
}
/* Bill to and Property on every invoice page; the property picker sits under its heading without a second label. */
.ra-invoice-paper__subhead{
  margin-top: 14px;
}

/* The three corner buttons keep one box, whatever older button rules say, so the icons share a row. */
.ra-invoice-window > :is(.ra-estimate-save-v, .ra-estimate-draft-trash, .ra-invoice-paper-x){
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  top: 10px !important;
  padding: 0 !important;
  font-size: 0 !important;
}
.ra-invoice-window > .ra-invoice-paper-x{
  right: 10px !important;
}
.ra-invoice-window > .ra-estimate-save-v{
  right: 46px !important;
}
.ra-invoice-window > .ra-estimate-draft-trash{
  right: 82px !important;
}
/* Bill to, Property, and Category each on one line: a small label, then the value. The pickers on the
   Add invoice paper follow the same line. */
.ra-invoice-paper__party-line,
.ra-invoice-paper [data-rw-paper-party-slot] .ra-estimate-pair{
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}
.ra-invoice-paper__party-label,
.ra-invoice-paper [data-rw-paper-party-slot] .ra-estimate-pair > span:first-child{
  flex: 0 0 auto;
  min-width: 64px;
  color: var(--paper-muted, #64748b);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ra-invoice-paper [data-rw-paper-party-slot] .ra-estimate-pair > span:first-child::after{
  content: ":";
}
/* From file: Bill to, Property, and Invoice file share one label width, so their values start on
   one line, with a row's gap between them. */
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-file-invoice] .ra-invoice-paper__party,
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-file-invoice] [data-rw-paper-party-slot]{
  display: flex;
  flex-direction: column;
  gap: 1lh;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-file-invoice] .ra-invoice-paper__party-line,
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-file-invoice] [data-rw-paper-party-slot] .ra-estimate-pair{
  margin: 0 !important;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-file-invoice] .ra-invoice-paper__party-label,
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-file-invoice] [data-rw-paper-party-slot] .ra-estimate-pair > span:first-child{
  flex: 0 0 112px;
  min-width: 112px;
}
:is(#rwVendorInvoiceForm, #rwAgentUploadForm) [data-rw-file-invoice] [data-rw-paper-party-slot] .ra-estimate-pair[hidden]{
  display: none !important;
}
/* Choose an estimate: a white dialog with a title, a search field, and one tidy row per estimate. */
:is(#rwAgentOwnerInvoiceEstimatePick, #rwVendorInvoiceEstimatePick, #rwAgentInvoiceEstimatePick).ra-pick-dialog:not([hidden]){
  top: calc(env(safe-area-inset-top, 0px) + 24px) !important;
  width: min(560px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 48px) !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45), 0 24px 60px rgba(15, 23, 42, 0.35) !important;
}
.ra-pick-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e2e8f0;
}
.ra-pick-head h3{
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 700;
}
.ra-pick-head p{
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}
.ra-pick-x{
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b91c1c;
  cursor: pointer;
}
.ra-pick-x:hover{
  background: #fee2e2;
}
.ra-pick-search{
  box-sizing: border-box;
  width: calc(100% - 40px);
  height: 38px;
  margin: 14px 20px 6px;
  padding: 0 12px;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}
.ra-pick-dialog .ra-owner__list{
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  padding: 6px 12px 16px;
  overflow: auto;
}
.ra-pick-row{
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 92px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ra-pick-row:hover,
.ra-pick-row:focus-visible{
  border-color: #cbd5e1;
  background: #f1f5f9;
  outline: none;
}
.ra-pick-row[hidden]{
  display: none;
}
.ra-pick-row__num{
  color: #203e64;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ra-pick-row__main{
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ra-pick-row__main strong{
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ra-pick-row__main small{
  color: #64748b;
  font-size: 12px;
}
.ra-pick-row .ra-status-chip{
  margin-left: 0;
}
.ra-pick-row__amount{
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.ra-pick-row--none{
  grid-template-columns: 52px minmax(0, 1fr);
  margin-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 10px 10px 0 0;
}
.ra-pick-empty{
  margin: 0;
  padding: 28px 12px;
  color: #64748b;
  text-align: center;
}
.ra-pick-dialog > .ra-owner__muted:empty{
  display: none;
}
.ra-pick-dialog > .ra-owner__muted{
  margin: 0 20px 14px;
  color: #b91c1c;
}
@media (max-width: 640px){
  .ra-pick-row{
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }
  .ra-pick-row__amount{
    grid-column: 2 / -1;
    text-align: left;
  }
}

/* An estimate opened from an invoice shows over the invoice. */
#rwAgentEstimatePaperModal{
  z-index: 1350 !important;
}
/* Several estimates per invoice: a tick on each row, the count on the button, other properties greyed. */
.ra-pick-row{
  grid-template-columns: 22px 52px minmax(0, 1fr) auto 92px;
}
.ra-pick-row__check{
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 2px solid #94a3b8;
  border-radius: 5px;
  background: #fff;
}
.ra-pick-row[aria-pressed="true"]{
  border-color: #93c5fd;
  background: #eff6ff;
}
.ra-pick-row[aria-pressed="true"] .ra-pick-row__check{
  border-color: #2563eb;
  background: #2563eb;
}
.ra-pick-row[aria-pressed="true"] .ra-pick-row__check::after{
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.ra-pick-row:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}
.ra-pick-row:disabled:hover{
  border-color: transparent;
  background: #fff;
}
.ra-pick-foot{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid #e2e8f0;
}
.ra-pick-foot button{
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ra-pick-cancel{
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}
.ra-pick-use{
  border: 0;
  background: #203e64;
  color: #fff;
}
.ra-pick-use:disabled{
  opacity: 0.5;
  cursor: default;
}
.ra-linked-estimate__list{
  display: inline;
}
@media (max-width: 640px){
  .ra-pick-row{
    grid-template-columns: 22px 44px minmax(0, 1fr) auto;
  }
  .ra-pick-row__amount{
    grid-column: 3 / -1;
  }
}
/* Which property the ticked estimates belong to. */
.ra-pick-note{
  margin: 0;
  padding: 0 20px 8px;
  color: #475569;
  font-size: 13px;
}
.ra-pick-note:empty{
  display: none;
}
/* Estimates grouped by property in the choose dialog. */
.ra-pick-group{
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.ra-pick-group[hidden]{
  display: none;
}
.ra-pick-group__head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 4px 2px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
  color: #203e64;
  font-size: 13px;
  font-weight: 700;
}
.ra-pick-group__head small{
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}
/* The roles strip on the company sign-in page: one navy gradient over its full height, so it fades
   evenly instead of the header-height gradient stopping partway and leaving a second flat color. */
body.ra-portal.ra-portal--home .ra-home__roles{
  background-color: #0e243d;
  background-image: var(--rw-navy-tall);
  background-size: 100% 100%;
}
/* A list row that opens its invoice. */
tr.ra-row-opens{
  cursor: pointer;
}
tr.ra-row-opens:hover > td{
  background: #f1f5f9;
}
/* Estimate drafts: the trash sits left of ✓ on the owner estimate, and next to × on To Vendor. */
#rwAgentEstimateToOwner > .ra-estimate-draft-trash{
  position: absolute;
  top: 10px;
  right: 92px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b91c1c;
}
.ra-estimate-form-head > .ra-estimate-draft-trash{
  position: static;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0 4px 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b91c1c;
}
:is(#rwAgentEstimateToOwner, .ra-estimate-form-head) > .ra-estimate-draft-trash:hover{
  background: #fee2e2;
}
:is(#rwAgentEstimateToOwner, .ra-estimate-form-head) > .ra-estimate-draft-trash[hidden]{
  display: none;
}
/* Tenant dashboard: the current lease is the fourth bubble, under Conversations; all four share one size. */
[data-rw-tenant-page="dashboard"] .ra-dash{
  grid-auto-rows: 1fr;
}
[data-rw-tenant-page="dashboard"] .ra-dash__bubble{
  height: auto;
  min-height: 112px;
}
.ra-dash-lease[hidden]{
  display: none;
}
.ra-dash-lease__body{
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  color: #334155;
  font-size: 0.85rem;
  line-height: 1.3;
}
.ra-dash-lease__place{
  color: #0f172a;
  font-weight: 600;
}
/* Conversations: unread rows are bold, with no dot. */
.ra-list-grid--talk .ra-portal__unread-dot{
  display: none !important;
}
/* Unread rows stand out in every list (conversations, estimates, invoices, people, documents):
   bold alone is hardly seen, so a blue tint and a blue bar at the start of the row too. */
:is(.ra-list-grid, .ra-invoice-grid) tr.is-unread td,
:is(.ra-list-grid, .ra-invoice-grid) tr.is-unread td :not(.ra-status-chip){
  font-weight: 700 !important;
}
:is(.ra-list-grid, .ra-invoice-grid) tr.is-unread > td{
  background: #e5edfd !important;
  color: #0f172a !important;
}
:is(.ra-list-grid, .ra-invoice-grid) tr.is-unread > td:first-child{
  box-shadow: inset 4px 0 0 #2563eb;
}

/* Tenant Leases, Documents and Ledger: placed like Bank accounts, full-width tables that end with their rows. */
@media (min-width: 1024px){
  .ra-owner__pages > :is([data-rw-tenant-page="leases"], [data-rw-tenant-page="documents"], [data-rw-tenant-page="ledger"]):not([hidden]){
    padding-left: 32px;
    padding-right: 32px;
  }

  .ra-owner__pages > [data-rw-tenant-page="leases"]:not([hidden]),
  [data-rw-tenant-page="leases"] > #rwTenantLeaseListView,
  .ra-owner__pages > [data-rw-tenant-page="documents"]:not([hidden]){
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
  }

  [data-rw-tenant-page="leases"] > #rwTenantLeaseListView{
    width: 100%;
    padding: 0;
  }

  :is(#rwTenantLeaseListView, [data-rw-tenant-page="documents"]) > :not(.ra-owner__list){
    flex: 0 0 auto;
  }

  :is(#rwTenantLeaseListView, [data-rw-tenant-page="documents"], [data-rw-tenant-page="ledger"]) > .ra-owner__list{
    display: block;
    flex: 0 1 auto;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    overflow-y: auto;
  }

  :is(#rwTenantLeaseListView, [data-rw-tenant-page="documents"]) > .ra-owner__list thead th{
    position: sticky;
    top: 0;
    z-index: 1;
  }
}

/* Agent Tenants financial: Tenants Transactions, Pay Tenants, Charge Tenants (same rules as Owners and Vendors). */
[data-rw-tmoney-pane][hidden]{
  display: none !important;
}

#rwTenantPayPane,
#rwTenantChargePane{
  display: flex;
  flex-direction: column;
  gap: 1lh;
}

#rwTenantChargePane .ra-owner-pay-tools .ra-people__field{
  flex: 0 1 23%;
  max-width: 23%;
}

#rwTenantPayPane table.ra-invoice-grid,
#rwTenantChargePane table.ra-invoice-grid{
  table-layout: fixed;
  width: 100%;
}

#rwTenantPayPane table.ra-invoice-grid .ra-pay-check,
#rwTenantChargePane table.ra-invoice-grid .ra-pay-check{
  width: 36px;
  max-width: 36px;
}
#rwTenantPayPane table.ra-invoice-grid .ra-pay-date{ width: 11%; }
#rwTenantPayPane table.ra-invoice-grid .ra-pay-owner{ width: 14%; }
#rwTenantPayPane table.ra-invoice-grid .ra-pay-address{ width: 22%; }
#rwTenantPayPane table.ra-invoice-grid .ra-pay-balance,
#rwTenantPayPane table.ra-invoice-grid .ra-pay-amount{
  width: 8.5%;
  max-width: 8.5%;
}
#rwTenantPayPane table.ra-invoice-grid .ra-pay-memo{ width: 24%; }
#rwTenantChargePane table.ra-invoice-grid .ra-pay-owner{ width: 14%; }
#rwTenantChargePane table.ra-invoice-grid .ra-pay-address{ width: 25.82%; }
#rwTenantChargePane table.ra-invoice-grid .ra-pay-balance,
#rwTenantChargePane table.ra-invoice-grid .ra-pay-amount{
  width: 7.8%;
  max-width: 7.8%;
}
#rwTenantChargePane table.ra-invoice-grid .ra-pay-memo{ width: 40%; }

#rwTenantPayPane table.ra-invoice-grid th,
#rwTenantPayPane table.ra-invoice-grid td,
#rwTenantChargePane table.ra-invoice-grid th,
#rwTenantChargePane table.ra-invoice-grid td{
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rwTenantPayPane table.ra-invoice-grid tbody td,
#rwTenantChargePane table.ra-invoice-grid tbody td{
  box-sizing: border-box;
  height: 32px;
  padding: 4px 8px;
  line-height: 1.25;
  vertical-align: middle;
}

#rwTenantPayRows input:not(.ra-invoice-batch-check),
#rwTenantChargeRows input:not(.ra-invoice-batch-check){
  display: block;
  width: 100%;
  height: 24px;
  min-height: 0;
  margin: 0;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 0 6px;
  font: inherit;
  font-size: 12.5px;
  line-height: 22px;
}

#rwTenantPayPane .ra-invoice-batch-check,
#rwTenantChargePane .ra-invoice-batch-check,
#rwTenantPaySelectedOnly,
#rwTenantChargeSelectedOnly{
  appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  margin: 0;
  padding: 0;
  border: 1.5px solid #102d4e;
  border-radius: 2px;
  background: #fff;
  flex: 0 0 16px;
}

#rwTenantPayPane .ra-invoice-batch-check:checked,
#rwTenantChargePane .ra-invoice-batch-check:checked,
#rwTenantPaySelectedOnly:checked,
#rwTenantChargeSelectedOnly:checked{
  background: #102d4e;
  box-shadow: inset 0 0 0 3px #fff;
}

#rwTenantPayHint{
  min-width: 0;
  margin: 0;
  color: #b91c1c;
  font-weight: 700;
}

#rwTenantPayHint:empty,
.ra-owner-fee-status #rwTenantChargeHint:empty,
.ra-owner-fee-status #rwTenantChargeSummary:empty{
  display: none;
}

#rwTenantPaySummary{
  flex: 0 1 auto;
  min-height: 1.4em;
  margin: 0;
  white-space: nowrap;
}

#rwTenantPaySummary.is-short,
#rwTenantChargeSummary.is-short,
#rwTenantChargeHint.is-error{
  color: #b91c1c;
  font-weight: 700;
}

#rwTenantPaySummary.is-ok,
#rwTenantChargeSummary.is-ok,
#rwTenantChargeHint.is-ok{
  color: #15803d;
  font-weight: 700;
}

#rwTenantPayAccount[hidden]{
  display: none !important;
}

#rwTenantPayAccountBtn{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  border: 1px solid #6d8299;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
}

:is(#rwTenantPayPane, #rwTenantChargePane, #rwTenantSchedulePane) .ra-owner__list{
  margin: 0;
}

#rwTenantTxRows tr.is-selected td{
  background: #d4e1ee;
}

/* The page fills the panel; each tab's list scrolls under its sticky header. */
.ra-owner__pages:has(> [data-rw-agent-page="tenant-transactions"]:not([hidden])){
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ra-owner__pages > [data-rw-agent-page="tenant-transactions"]:not([hidden]),
[data-rw-agent-page="tenant-transactions"]:not([hidden]) > :is(#rwTenantListPane, #rwTenantTxList, #rwTenantPayPane, #rwTenantChargePane, #rwTenantSchedulePane):not([hidden]){
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

[data-rw-agent-page="tenant-transactions"] > :is(.ra-invoice-toolbar, .ra-owner-tabs),
:is(#rwTenantTxList, #rwTenantPayPane, #rwTenantChargePane, #rwTenantSchedulePane) > :not(.ra-owner__list){
  flex: 0 0 auto;
}

:is(#rwTenantTxList, #rwTenantPayPane, #rwTenantChargePane, #rwTenantSchedulePane) > .ra-owner__list{
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}

:is(#rwTenantTxList, #rwTenantPayPane, #rwTenantChargePane, #rwTenantSchedulePane) > .ra-owner__list thead th{
  position: sticky;
  top: 0;
  z-index: 1;
}

@media (min-width: 1024px){
  [data-rw-agent-page="tenant-transactions"]{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding-left: 32px;
    padding-right: 32px;
  }

  [data-rw-agent-page="tenant-transactions"]:not([hidden]){
    height: 100%;
    max-height: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  [data-rw-agent-page="tenant-transactions"] > #rwTenantTxList,
  [data-rw-agent-page="tenant-transactions"] #rwTenantTxList .ra-owner__list,
  [data-rw-agent-page="tenant-transactions"] #rwTenantTxList .ra-invoice-grid,
  [data-rw-agent-page="tenant-transactions"] > #rwTenantSchedulePane,
  [data-rw-agent-page="tenant-transactions"] #rwTenantSchedulePane .ra-owner__list,
  [data-rw-agent-page="tenant-transactions"] #rwTenantSchedulePane .ra-invoice-grid{
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }

  [data-rw-agent-page="tenant-transactions"] #rwTenantTxList .ra-invoice-grid{
    table-layout: fixed;
  }
}

/* A table narrowed by dragging its last column: the list box behind it is see-through. */
[data-rw-table-shrunk]{
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Charge Tenants: a tenant without an Auto charge bank account cannot be charged. */
.ra-tenant-charge--off td{
  color: #94a3b8;
}
.ra-tenant-charge__note{
  display: block;
  color: #b45309;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Tenant bank form: a disabled account's Use and Default are greyed out. */
:is(#rwBankUseField, #rwBankDefaultField).is-locked{
  opacity: 0.5;
  pointer-events: none;
}

/* Tenant Leases and Documents: the last column is titled "Documents", so it is wide enough to read. */
:is(#rwTenantLeaseList, #rwTenantDocList) td.ra-inv-file,
table:has(> :is(#rwTenantLeaseList, #rwTenantDocList)) th.ra-inv-file{
  width: 96px !important;
  max-width: 96px !important;
  text-align: center;
}

/* Tenant Ledger: Pay beside the title, its dialog, and the success message on top. */

/* What the tenant is paying: one card per fund, so a security deposit is never mistaken for rent. */
.ra-pay-kinds{
  margin: 4px 0 16px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.ra-pay-kinds__title{
  margin-bottom: 8px;
  padding: 0;
  color: #102d4e;
  font-size: 0.92rem;
  font-weight: 650;
}
.ra-pay-kinds__list{
  display: grid;
  gap: 8px;
}
.ra-pay-kinds__item{
  position: relative;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 12px 16px 12px 44px;
  border: 1px solid #d6e0ea;
  border-radius: 12px;
  background: #fff;
  color: #102d4e;
  cursor: pointer;
}
.ra-pay-kinds__item:hover{
  border-color: #102d4e;
}
.ra-pay-kinds__item.is-picked{
  border-color: #102d4e;
  box-shadow: inset 0 0 0 1px #102d4e;
  background: #f4f7fb;
}
.ra-pay-kinds__item input{
  position: absolute;
  left: 16px;
  top: 14px;
  margin: 0;
  accent-color: #102d4e;
}
.ra-pay-kinds__item strong{
  font-size: 0.98rem;
  font-weight: 650;
}
.ra-pay-kinds__item span{
  color: #4a5d72;
  font-size: 0.86rem;
  line-height: 1.35;
}
.ra-pay-kinds__wait{
  margin: 0;
  color: #4a5d72;
}
.ra-pay-kinds:disabled .ra-pay-kinds__item{
  cursor: default;
}
/* Bank account or Card, side by side; the card number goes in Stripe's own field below. */
.ra-pay-kinds__list--two{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ra-bank-processing__card{
  display: grid;
  max-width: 560px;
  margin: 8px 0;
}
.ra-tenant-deposit__card{
  margin: -4px 0 16px;
}
.ra-tenant-deposit__card .ra-pay-kinds__title{
  display: block;
}
.ra-tenant-deposit__card-field{
  padding: 12px 14px;
  border: 1px solid #d6e0ea;
  border-radius: 10px;
  background: #fff;
}
.ra-tenant-deposit-btn{
  padding: 8px 18px;
}
#rwTenantDepositSend:disabled{
  opacity: 0.5;
  cursor: not-allowed;
}
#rwTenantDepositSend.is-busy{
  position: relative;
  color: transparent;
  pointer-events: none;
  opacity: 1;
}
#rwTenantDepositSend.is-busy::after{
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ra-spin 0.7s linear infinite;
}
.ra-tenant-deposit .ra-bank-default{
  align-items: flex-start;
  line-height: 1.35;
}
.ra-tenant-deposit-done{
  z-index: 95;
}
.ra-tenant-deposit-done__text{
  margin: 8px 0 4px;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

/* Dashboard bank notice: one short line with its button, not a large banner. */
.ra-dash__bank{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 14px;
  font-size: 0.95rem;
  line-height: 1.35;
}
.ra-dash__bank[hidden]{
  display: none;
}
.ra-dash__bank button{
  margin: 0;
  padding: 6px 12px;
  font-size: 0.9rem;
}

/* Tenant Deposit: on desktop the dialog is 20% narrower than other dialogs and centered; the
   success message is smaller still, centered on the deposit dialog. */
#rwTenantDepositModal,
#rwTenantDepositDone{
  display: flex;
  align-items: center;
  justify-content: center;
}
#rwTenantDepositModal[hidden],
#rwTenantDepositDone[hidden]{
  display: none;
}
#rwTenantDepositAmount:disabled{
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}
@media (min-width: 1024px){
  #rwTenantDepositModal .ra-bank-modal{
    width: 40vw;
    max-width: 40vw;
    max-height: none;
  }
  #rwTenantDepositDone .ra-bank-modal{
    width: 26vw;
    max-width: 26vw;
    max-height: none;
    padding: 20px 18px 16px;
  }
}

/* Tenant Ledger: the security deposit held, above the table; its lines say Security instead of a balance. */
.ra-tenant-security{
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 0.95rem;
}
.ra-tenant-security[hidden]{
  display: none;
}
.ra-ledger__held{
  color: #64748b;
  font-style: italic;
  text-align: right;
}

/* A payment Stripe refused: its line stays, greyed and struck, in no balance (v901). */
.ra-ledger-failed td{
  color: #94a3b8;
}

/* Pay owners: rent still at the bank under the owner's balance (not payable yet). */
.ra-pay-pending{
  display: block;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 500;
}

/* Security deposit held sits on the Ledger title row, just left of Deposit. */
[data-rw-tenant-page="ledger"] .ra-invoice-head__actions{
  display: flex;
  align-items: center;
  gap: 14px;
}
[data-rw-tenant-page="ledger"] .ra-tenant-security{
  margin: 0;
  white-space: nowrap;
}


/* Cash Allocation Bar (Overview and the Manager/Admin dashboard). */
.ra-cash{
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(127, 127, 127, 0.25);
  border-radius: 12px;
  background: var(--ra-surface, transparent);
}
.ra-cash__head{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  margin-bottom: 10px;
}
.ra-cash__busy{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
}
.ra-cash__busy i{
  width: 12px;
  height: 12px;
  border: 2px solid rgba(32, 62, 100, 0.2);
  border-top-color: #203e64;
  border-radius: 50%;
  animation: ra-spin 0.7s linear infinite;
}
.ra-cash__head h3{
  margin: 0;
  font-size: 1.05rem;
}
.ra-cash__total small{
  opacity: 0.7;
}
.ra-cash__toggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 0.9rem;
  white-space: nowrap;
}
.ra-cash__track{
  position: relative;
  display: flex;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(127, 127, 127, 0.15);
}
.ra-cash__track.is-short{
  outline: 2px solid #d64545;
  outline-offset: 2px;
}
.ra-cash__seg{
  display: block;
  height: 100%;
  min-width: 2px;
}
.ra-cash__seg + .ra-cash__seg{
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.6);
}
.ra-cash__cash-line{
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 3px;
  margin-left: -1px;
  background: #d64545;
}
.ra-cash__legend{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}
.ra-cash__legend li{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ra-cash__legend i{
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: 0 0 auto;
}
.ra-cash__legend small{
  opacity: 0.7;
}
.ra-cash__short{
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  color: #b42318;
  background: rgba(214, 69, 69, 0.12);
}
.ra-cash__note{
  margin: 8px 0 0;
  font-size: 0.85rem;
  opacity: 0.75;
}
@media (max-width: 640px){
  .ra-cash__toggle{ margin-left: 0; }
  .ra-cash__legend{ flex-direction: column; }
}

/* Uncovered vendor invoices: a thin line from the vendor part of the bar to a small note. */
.ra-cash__seg.is-flagged{
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0 4px, transparent 4px 8px) !important;
}
.ra-cash__flag{
  position: relative;
  margin-top: 14px;
  padding: 6px 10px;
  border-left: 3px solid #d64545;
  border-radius: 0 6px 6px 0;
  background: rgba(214, 69, 69, 0.08);
  font-size: 0.78rem;
  line-height: 1.4;
}
.ra-cash__flag::before{
  content: "";
  position: absolute;
  left: var(--at, 50%);
  top: -14px;
  height: 14px;
  border-left: 1px dashed #d64545;
}
.ra-cash__flag p,
.ra-cash__flag ul{
  margin: 0;
}
.ra-cash__flag ul{
  padding-left: 18px;
}
.ra-cash__flag p > b[aria-hidden]{
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  color: #fff;
  background: #d64545;
  font-size: 0.7rem;
}

/* Payment failures: a larger window with a red title and readable text, sized to the list. */
#rwOwnerTxStripeModal.is-failed .ra-portal__modal{
  width: min(440px, calc(100vw - 24px)) !important;
  max-width: min(440px, calc(100vw - 24px)) !important;
  height: auto !important;
  max-height: 70vh !important;
  overflow: auto;
}
#rwOwnerTxStripeModal.is-failed #rwOwnerTxStripeTitle{
  color: #b91c1c;
}
#rwOwnerTxStripeModal.is-failed #rwOwnerTxStripeText{
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Payments that moved no money: the status tag sits on its own line under the name, never cut off. */
.ra-ledger-attempt td[data-rw-tx-owner]{
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.ra-ledger-attempt .ra-pay-flag{
  display: block;
  margin: 2px 0 0;
}
.ra-ledger-attempt{
  cursor: pointer;
}
.ra-ledger-attempt--failed td:first-child,
.ra-ledger-attempt--canceled td:first-child{
  box-shadow: inset 4px 0 0 #dc2626;
}


/* Payment details window. */
#rwPaymentDetail .ra-pay-detail{
  position: relative;
  width: min(560px, calc(100vw - 24px));
  max-height: 85vh;
  overflow: auto;
  box-sizing: border-box;
}
.ra-pay-detail__facts{
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0 0 12px;
}
.ra-pay-detail__facts dt{
  font-weight: 700;
  opacity: 0.75;
}
.ra-pay-detail__facts dd{
  margin: 0;
  overflow-wrap: anywhere;
}
.ra-pay-detail__help{
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.1);
}
.ra-pay-detail__asked,
.ra-pay-detail__hint{
  margin: 0 0 8px;
  font-weight: 600;
}
.ra-pay-detail__hint:empty{
  display: none;
}
.ra-pay-detail__error{
  color: #c62828;
}
.ra-pay-detail__note{
  display: block;
  margin-bottom: 10px;
}
.ra-pay-detail__note textarea{
  width: 100%;
  box-sizing: border-box;
}
.ra-pay-detail__actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* Dashboard: owner payments stuck at the bank. */
.ra-dash__stuck{
  border-color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.08) !important;
  color: inherit;
}

/* Payment details: the close × sits at the right end of the title row. */
#rwPaymentDetail .ra-pay-detail__x{
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
}
#rwPaymentDetail .ra-portal__modal-title{
  margin-top: 0;
  padding-right: 44px;
  line-height: 32px;
}

/* AI → Email Settings */
.ra-email-set{
  width: 100%;
  table-layout: fixed;
}
.ra-email-set td{
  vertical-align: top;
  overflow-wrap: anywhere;
}
.ra-email-set .ra-email-set__check{
  width: 56px;
  text-align: center;
}
.ra-email-set .ra-email-set__check input{
  width: 18px;
  height: 18px;
}
.ra-email-set .ra-email-set__status{
  width: 120px;
}
.ra-email-set .ra-email-set__action{
  width: 110px;
  text-align: right;
}
.ra-email-set__error{
  color: #b91c1c;
}
.ra-status-chip--ok{
  background: #dcfce7;
  color: #166534;
}
.ra-status-chip--error{
  background: #fee2e2;
  color: #991b1b;
}
#rwEmailSetupModal .ra-email-setup{
  position: relative;
  width: min(480px, calc(100vw - 24px));
  max-height: 90vh;
  overflow: auto;
  box-sizing: border-box;
}
#rwEmailSetupModal .ra-email-setup__x{
  position: absolute;
  top: 12px;
  right: 12px;
  margin: 0;
}
#rwEmailSetupModal .ra-portal__modal-title{
  margin-top: 0;
  padding-right: 44px;
  line-height: 32px;
}
#rwEmailSetupModal .ra-people__field{
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.ra-email-setup__server{
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 0 10px;
}
.ra-people__hint.is-error{
  color: #b91c1c;
}
@media (max-width: 640px){
  .ra-email-set .ra-email-set__status{ width: 90px; }
  .ra-email-set .ra-email-set__action{ width: 80px; }
}

/*
 * Page standard: every page's title and table start at the same place as the Tenants and Owners
 * transactions pages (32px in from the sides on desktop). :where() keeps this at zero priority, so a
 * page with its own layout rule keeps it; a new page gets the standard without being listed anywhere.
 */
@media (min-width: 1024px){
  :where(.ra-owner__pages > .ra-owner__page){
    padding-left: 32px;
    padding-right: 32px;
    box-sizing: border-box;
  }
}

/* Payment details: Cancel payment is a clear red outline button beside Ask RentWiseAI support. */
.ra-pay-detail__cancel{
  min-height: 40px;
  padding: 0 16px;
  border: 1.5px solid #b91c1c;
  border-radius: 10px;
  background: #fff;
  color: #b91c1c;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.ra-pay-detail__cancel:hover{
  background: #fef2f2;
}
.ra-pay-detail__cancel:disabled{
  opacity: 0.6;
  cursor: default;
}

/* Payment details: what just happened, green when it worked and red when it did not. */
.ra-pay-detail__hint.is-ok{
  color: #15803d;
}
.ra-pay-detail__hint.is-error{
  color: #b91c1c;
}

/* A payment's reason (the bank's refusal, or who canceled it) in soft red text. */
.ra-pay-flag__reason,
.ra-pay-detail__facts .ra-pay-detail__reason{
  color: #c24a4a;
  font-weight: 400;
}

/* Add / Edit property saves with its own Save button under the fields (the general rule that hides
   form Save buttons in favor of footers does not apply here: this form has no footer). */
#rwPropertyForm:not([hidden]) #rwPropertySave{
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Waiting for staff: a short line after the last message. */
.ra-portal__pending-note{
  margin: 10px auto 4px;
  max-width: 90%;
  color: #92400e;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

/* Estimate paper: Owner and Property boxes start at the same place and have the same width
   (one label column for both, the box fills the rest). */
#rwAgentEstimateToOwner [data-rw-paper-party-slot] .ra-estimate-pair{
  display: grid !important;
  grid-template-columns: 5.5rem minmax(0, 1fr) !important;
  align-items: center;
  gap: 8px;
  width: 100% !important;
  margin: 0 0 8px !important;
}
#rwAgentEstimateToOwner [data-rw-paper-party-slot] .ra-estimate-search-drop{
  width: 100%;
  min-width: 0;
}
#rwAgentEstimateToOwner [data-rw-paper-party-slot] .ra-estimate-pair .ra-estimate-search{
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

/* "Estimate sent to …" for a few seconds at the bottom of the screen. */
.ra-estimate-toast{
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 18px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.18);
  color: #15803d;
  font-weight: 700;
}
.ra-estimate-toast[data-tone="warn"]{
  border-color: #fde68a;
  color: #b45309;
}
.ra-estimate-toast[data-tone="error"]{
  border-color: #fecaca;
  color: #b91c1c;
}
.ra-estimate-toast{
  max-width: min(560px, calc(100vw - 32px));
  text-align: center;
}
.ra-estimate-toast[hidden]{
  display: none;
}

/* Resend to owner, under the owner's estimate opened from the agent timeline. */
.ra-invoice-paper-actions{
  display: flex;
  justify-content: center;
  padding: 16px 0 4px;
}
.ra-invoice-paper-actions[hidden]{
  display: none;
}

/* An owner estimate opened by the agent: its full page, the status and timeline under Thank you. */
.ra-estimate-page{
  max-width: 900px;
  margin: 0 auto;
}
.ra-estimate-page .ra-estimate-reply-slot{
  margin-top: 16px;
  text-align: left;
}

/* The vendor's estimate pages, like the agent's and the owner's: the page alone over the screen. */
#rwVendorEstimateDetail.is-page > :not(#rwVendorEstimateBody),
#rwVendorEstimateForm.is-page > :not(#rwVendorEstimateStory){
  display: none !important;
}
#rwVendorEstimateForm.is-page:not([hidden]){
  display: block !important;
}
#rwVendorEstimateDetail.is-page #rwVendorEstimateBody,
#rwVendorEstimateForm.is-page #rwVendorEstimateStory{
  position: fixed;
  z-index: 100;
  top: calc(env(safe-area-inset-top, 0px) - 5px);
  left: 50%;
  transform: translateX(-50%);
  width: min(708px, calc(100vw - 32px));
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px);
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
}
@media (min-width: 1025px){
  #rwVendorEstimateDetail.is-page #rwVendorEstimateBody,
  #rwVendorEstimateForm.is-page #rwVendorEstimateStory{
    left: calc(var(--rw-side-nav, 144px) + (100vw - var(--rw-side-nav, 144px)) / 2);
    width: min(708px, calc(100vw - var(--rw-side-nav, 144px) - 32px));
  }
}
body:has(:is(#rwVendorEstimateDetail, #rwVendorEstimateForm).is-page:not([hidden])) .ra-portal__main{
  z-index: auto;
}

/* The estimate page opens over the screen like the estimate form: no card, no timeline title. */
:is(#rwAgentEstimateDetail, #rwOwnerEstimateDetail, #rwVendorEstimateDetail, #rwVendorEstimateForm).is-page{
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#rwAgentEstimateDetail.is-page > :not(#rwAgentEstimateBody):not(#rwAgentEstimateHint),
#rwOwnerEstimateDetail.is-page > :not(#rwOwnerEstimateBody):not(#rwOwnerEstimateHint){
  display: none !important;
}
#rwAgentEstimateDetail.is-page #rwAgentEstimateBody,
#rwOwnerEstimateDetail.is-page #rwOwnerEstimateBody{
  position: fixed;
  z-index: 100;
  top: calc(env(safe-area-inset-top, 0px) - 5px);
  left: 50%;
  transform: translateX(-50%);
  width: min(708px, calc(100vw - 32px));
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 8px);
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, 0.45);
}
@media (min-width: 1025px){
  #rwAgentEstimateDetail.is-page #rwAgentEstimateBody,
  #rwOwnerEstimateDetail.is-page #rwOwnerEstimateBody{
    left: calc(var(--rw-side-nav, 144px) + (100vw - var(--rw-side-nav, 144px)) / 2);
    width: min(708px, calc(100vw - var(--rw-side-nav, 144px) - 32px));
  }
}
body:has(#rwOwnerEstimateDetail.is-page:not([hidden])) .ra-portal__main{
  z-index: auto;
}
.ra-estimate-page .ra-invoice-paper{
  width: 100%;
  box-sizing: border-box;
}
/* The buttons and the red × together in the paper's top right corner, as on the estimate form:
   sticky while the page scrolls, in the paper's top margin above ESTIMATE. */
.ra-estimate-page__corner{
  position: relative;
  top: 0;
  float: right;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 18px 14px -48px 8px;
}
.ra-estimate-page__corner > .ra-invoice-paper-x{
  position: static !important;
  margin: 0 !important;
}
.ra-estimate-page__actions{
  display: flex;
  gap: 6px;
}
.ra-estimate-page__action{
  height: 30px;
  padding: 0 12px;
  border: 1px solid #c7d7ea;
  border-radius: 8px;
  background: #fff;
  color: #203e64;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.ra-estimate-page__action:hover{ background: #eef4fb; }
.ra-estimate-page__action--danger{ border-color: #fecaca; color: #b91c1c; }
.ra-estimate-page__action--danger:hover{ background: #fef2f2; }
.ra-estimate-page__action--go{ border-color: #15803d; background: #15803d; color: #fff; }
.ra-estimate-page__action--go:hover{ background: #166534; }
.ra-estimate-page__action:disabled{ opacity: 0.6; cursor: default; }
/* Reply: a small text button under the timeline that opens the box to write in. */
.ra-estimate-page__reply{
  margin-top: 10px;
  text-align: left;
}
.ra-estimate-page__reply .ra-estimate-reply{
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: #203e64 !important;
  font-size: 12px !important;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.ra-estimate-page__reply .ra-estimate-reply[hidden]{ display: none !important; }

/* Every estimate paper: ESTIMATE stays on one line; Estimate # on the left and Date on the right
   on the row under it, in small type (as on invoices). */
.ra-invoice-paper--estimate .ra-invoice-paper__head{
  flex-wrap: wrap;
  row-gap: 12px;
}
.ra-invoice-paper--estimate .ra-invoice-paper__title{
  display: contents;
}
.ra-invoice-paper--estimate .ra-invoice-paper__title h2{
  margin: 0;
  white-space: nowrap;
}
.ra-invoice-paper--estimate .ra-invoice-paper__title dl{
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  text-align: left;
  font-size: 13px;
}
.ra-invoice-paper--estimate .ra-invoice-paper__title dl > div{
  grid-column: 1;
  justify-content: flex-start;
}
.ra-invoice-paper--estimate .ra-invoice-paper__title dl > div:has(> [data-rw-invoice-paper-number]){
  grid-row: 1;
}
.ra-invoice-paper--estimate .ra-invoice-paper__title dl > div:has(> [data-rw-invoice-paper-date]){
  grid-column: 2;
  grid-row: 1;
  justify-content: flex-end;
}
.ra-invoice-paper--estimate .ra-invoice-paper__title dd{
  min-width: 0;
}

/* A sent estimate open in the form: Close estimate sits left of the ×, sticky with it. */
#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner > .ra-estimate-revise-close{
  position: relative;
  top: 0;
  float: right;
  z-index: 3;
  height: 30px;
  margin: 11px 0 -41px 8px;
  padding: 0 12px;
  border: 1px solid #c7d7ea;
  border-radius: 8px;
  background: #fff;
  color: #203e64;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner > .ra-estimate-revise-close:hover{
  background: #eef4fb;
}
/* The red × centered on the same line as the buttons beside it (the glyph sits low in its box). */
.ra-estimate-page__corner > .ra-invoice-paper-x{
  display: grid;
  place-items: center;
  padding: 0 0 4px !important;
}
#rwAgentEstimateDetail.is-sheet #rwAgentEstimateToOwner > .ra-invoice-paper-x[hidden]{
  display: none !important;
}
.ra-estimate-revise-close[hidden]{
  display: none !important;
}
.ra-portal__photo-btn.is-busy{
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.ra-portal__photo-btn.is-busy::after{
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(15, 23, 42, 0.2);
  border-top-color: #203e64;
  border-radius: 50%;
  animation: ra-spin 0.7s linear infinite;
}
[data-rw-estimate-reply-send].is-busy{
  min-width: 40px;
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
[data-rw-estimate-reply-send].is-busy::after{
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(29, 78, 216, 0.25);
  border-top-color: #1d4ed8;
  border-radius: 50%;
  animation: ra-spin 0.7s linear infinite;
}
#rwAgentEstimateResendTop.is-busy{
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
#rwAgentEstimateResendTop.is-busy::after{
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(32, 62, 100, 0.25);
  border-top-color: #203e64;
  border-radius: 50%;
  animation: ra-spin 0.7s linear infinite;
}

/* Save estimate (Keep draft / Send / Abandon): a small white card with three clear buttons,
   Abandon on the left in red, Keep draft outlined and Send filled in the invoice blue. */
#rwEstimateKeepModal .ra-portal__modal{
  width: min(440px, calc(100vw - 32px)) !important;
  max-width: min(440px, calc(100vw - 32px)) !important;
  height: auto !important;
  max-height: none !important;
  box-sizing: border-box;
  padding: 20px 20px 16px !important;
  border: 1px solid #dbe4ee !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28) !important;
}
#rwEstimateKeepModal .ra-portal__modal-title{
  margin: 0 0 6px !important;
  color: #203e64 !important;
  font-size: 1.05rem !important;
  font-weight: 700;
}
#rwEstimateKeepText{
  margin: 0 !important;
  color: #334155 !important;
  font-size: 0.95rem !important;
  line-height: 1.4;
}
#rwEstimateKeepModal .ra-estimate-keep-actions{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
#rwEstimateKeepModal .ra-estimate-keep-actions button{
  flex: 0 0 auto !important;
  height: 38px !important;
  padding: 0 16px !important;
  border: 1px solid #c7d7ea !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #203e64 !important;
  font: inherit;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  cursor: pointer;
}
#rwEstimateKeepModal #rwEstimateKeepDraft{ order: 1; }
#rwEstimateKeepModal #rwEstimateKeepDraft:hover{ background: #eef4fb !important; }
#rwEstimateKeepModal #rwEstimateKeepSend{
  order: 2;
  border-color: #203e64 !important;
  background: #203e64 !important;
  color: #fff !important;
}
#rwEstimateKeepModal #rwEstimateKeepSend:hover{ background: #2b4f7d !important; }
#rwEstimateKeepModal #rwEstimateKeepAbandon{
  order: 0;
  margin-right: auto;
  border-color: #fecaca !important;
  color: #b91c1c !important;
}
#rwEstimateKeepModal #rwEstimateKeepAbandon:hover{ background: #fef2f2 !important; }
#rwEstimateKeepModal .ra-estimate-keep-actions button[hidden]{ display: none !important; }
@media (max-width: 480px){
  #rwEstimateKeepModal .ra-estimate-keep-actions button{
    flex: 1 1 0 !important;
    padding: 0 10px !important;
  }
}

/* The owner estimate form's top buttons in one row on the paper's top right, a little below the
   paper's edge, scrolling away with it: × at the far right, ✓ 8px to its left, then the trash,
   Close estimate and Resend to owner. */
#rwAgentEstimateToOwner > .ra-paper-corner{
  position: absolute;
  top: 20px;
  right: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
#rwAgentEstimateToOwner > .ra-paper-corner > *{
  position: static !important;
  float: none !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  margin: 0 !important;
}
#rwAgentEstimateToOwner > .ra-paper-corner > [hidden]{
  display: none !important;
}
#rwAgentEstimateToOwner > .ra-paper-corner > #rwAgentEstimateResendTop{ order: 1; }
#rwAgentEstimateToOwner > .ra-paper-corner > #rwAgentEstimateCloseTop{ order: 2; }
#rwAgentEstimateToOwner > .ra-paper-corner > .ra-estimate-draft-trash{ order: 3; }
#rwAgentEstimateToOwner > .ra-paper-corner > .ra-estimate-save-v{ order: 4; }
#rwAgentEstimateToOwner > .ra-paper-corner > .ra-invoice-paper-x{ order: 5; }
#rwAgentEstimateToOwner > .ra-paper-corner > :is(.ra-estimate-save-v, .ra-invoice-paper-x, .ra-estimate-draft-trash){
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0 !important;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 0 !important;
  line-height: 1;
  cursor: pointer;
}
#rwAgentEstimateToOwner > .ra-paper-corner svg{
  display: block;
  width: 20px;
  height: 20px;
}
#rwAgentEstimateToOwner > .ra-paper-corner > .ra-estimate-draft-trash svg{
  width: 18px;
  height: 18px;
}
#rwAgentEstimateToOwner > .ra-paper-corner > .ra-estimate-save-v{ color: #15803d; }
#rwAgentEstimateToOwner > .ra-paper-corner > .ra-estimate-save-v:hover{ background: #dcfce7; }
#rwAgentEstimateToOwner > .ra-paper-corner > :is(.ra-invoice-paper-x, .ra-estimate-draft-trash){ color: #b91c1c; }
#rwAgentEstimateToOwner > .ra-paper-corner > :is(.ra-invoice-paper-x, .ra-estimate-draft-trash):hover{ background: #fee2e2; }
#rwAgentEstimateToOwner > .ra-paper-corner > .ra-estimate-revise-close{
  height: 30px;
  padding: 0 12px;
  border: 1px solid #c7d7ea;
  border-radius: 8px;
  background: #fff;
  color: #203e64;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
#rwAgentEstimateToOwner > .ra-paper-corner > .ra-estimate-revise-close:hover{
  background: #eef4fb;
}
#rwAgentEstimateToOwner:not([hidden]){
  position: relative;
}

/* Financials > Tenants > Rent Schedule: one row per month, rent and concession editable. */
.ra-rent-schedule__bar{
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 8px 0;
}
.ra-rent-schedule__bar .ra-people__field{
  flex: 0 1 360px;
  margin: 0;
}
.ra-rent-schedule__quick{
  display: flex;
  gap: 8px;
}
.ra-rent-schedule input{
  width: 100%;
  min-width: 70px;
  box-sizing: border-box;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #c7d7ea;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 13px;
}
.ra-rent-schedule input:disabled{
  border-color: transparent;
  background: transparent;
  color: #64748b;
}
.ra-rent-schedule tr.is-posted td{
  color: #64748b;
}
#rwRentScheduleSave{
  margin-top: 8px;
}

/* Settings on Financials > Tenants / Owners. */
.ra-rent-settings{
  width: min(520px, calc(100vw - 32px)) !important;
  max-width: min(520px, calc(100vw - 32px)) !important;
  height: auto !important;
  max-height: calc(100dvh - 32px) !important;
  overflow: auto;
  background: #fff !important;
  border: 1px solid #dbe4ee !important;
  border-radius: 14px !important;
}
.ra-rent-settings__lead{
  margin: 0 0 10px;
  color: #334155;
}
.ra-rent-settings__line{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.ra-rent-settings__line .ra-people__field{
  flex: 1 1 180px;
}
.ra-rent-settings__row{
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 10px 0 0;
  font-size: 14px;
  cursor: pointer;
}
.ra-rent-settings__row span{
  color: #64748b;
  font-size: 12.5px;
}
.ra-rent-settings__note{
  margin: 6px 0 0 24px;
  font-size: 12.5px;
}

/* Reports > Rent paid: a wide table that scrolls sideways on small screens; short tenants marked. */
.ra-rent-paid{
  overflow-x: auto;
}
.ra-rent-paid .ra-report-table{
  min-width: 980px;
}
.ra-rent-paid tr.is-short td:last-child{
  color: #b91c1c;
}
.ra-rent-paid__total td{
  border-top: 2px solid #cbd5e1;
}

/* Owners > Scheduled payments. */
.ra-owner-autopay{
  max-width: 640px;
}
.ra-owner-autopay .ra-rent-settings__note{
  margin-left: 0;
}
#rwOwnerAutoPaySave{
  margin-top: 8px;
}

/* A drop list whose first entry is the search: the list opens under it and narrows as you type. */
.ra-combo{
  position: relative;
}
.ra-combo__list{
  position: absolute;
  z-index: 20;
  top: calc(100% + 2px);
  right: 0;
  width: max(100%, 320px);
  max-height: 320px;
  overflow: auto;
  border: 1px solid #c7d7ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}
.ra-combo__list[hidden]{
  display: none !important;
}
.ra-combo__row{
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ra-combo__row:hover,
.ra-combo__row.is-on{
  background: #eef4fb;
}
.ra-combo__row small{
  color: #64748b;
}
.ra-combo__empty{
  margin: 0;
  padding: 10px;
  color: #64748b;
  font-size: 13px;
}
.ra-rent-free{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  white-space: nowrap;
}
.ra-rent-free input{
  width: 56px;
  height: 32px;
  box-sizing: border-box;
  padding: 0 6px;
  border: 1px solid #6d8299;
  border-radius: 6px;
  font: inherit;
}
#rwTenantSchedulePane > .ra-tx-titlebar{
  overflow: visible;
}

/* Scheduled charges: a month with a concession shows what is finally due in green. */
.ra-rent-schedule td.is-discounted{
  background: #dcfce7 !important;
  color: #0f172a;
  font-weight: 600;
}

/* The Concession icon on a tenant's rented properties. */
.ra-tenant-concession{
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 26px;
  padding: 0;
  border: 1px solid #c7d7ea;
  border-radius: 6px;
  background: #fff;
  color: #15803d;
  cursor: pointer;
}
.ra-tenant-concession:hover{
  background: #ecfdf3;
}
.ra-tenant-concession svg{
  width: 17px;
  height: 17px;
}

/* Concession: one lease's months in a wide dialog. */
#rwRentConcessionModal:not([hidden]){
  z-index: 95;
}
.ra-rent-concession-modal{
  display: flex;
  flex-direction: column;
  width: 75vw;
  max-width: 75vw;
  max-height: calc(100dvh - var(--rw-header-h) - 24px);
  overflow: hidden;
  background: #e2e8f0;
  border: 2px solid #334155;
  box-shadow: none;
  box-sizing: border-box;
}
.ra-rent-concession-modal > *{
  flex: 0 0 auto;
}
.ra-rent-concession-modal > .ra-owner__list{
  flex: 0 1 auto;
  min-height: 0;
  margin: 0;
  overflow-y: auto;
}
.ra-rent-concession-modal thead th{
  position: sticky;
  top: 0;
  z-index: 1;
}
.ra-rent-concession-modal .ra-invoice-head__actions{
  align-items: center;
}
#rwRentScheduleHint:empty{
  display: none;
}
@media (max-width: 800px){
  .ra-tenant-rent-modal,
  .ra-rent-concession-modal{
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
}

/* Concession title: the standard dialog title, the address under it. */
.ra-rent-concession-bar{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
}
#rwRentConcessionTitle{
  margin: 0;
  font-size: 1.15rem;
  text-align: left;
}
#rwRentConcessionPlace{
  margin: 2px 0 0;
  font-size: 0.85rem;
}
#rwRentConcessionPlace:empty{
  display: none;
}

/* A saved message in the rent dialogs is green; errors stay red. */
#rwRentScheduleHint.is-ok,
#rwOwnerAutoPayHint.is-ok{
  color: #15803d;
}

/* Owners list: the owner's properties, one per line. */
.ra-list-grid--people .ra-inv-place{
  overflow: hidden;
  color: #0f172a;
  vertical-align: middle;
}

/* Property form: who rents it, read only (changed on the tenant's page). */
.ra-property-lease-line{
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #c7d7ea;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.9rem;
}
.ra-property-lease-line p{
  margin: 0;
}
.ra-property-lease-line p + p{
  margin-top: 4px;
}
.ra-property-lease-line small{
  color: #64748b;
}

/* A tenant's leases: a row opens Edit lease. */
#rwTenantRentalsRows tr[data-rw-lease-edit]{
  cursor: pointer;
}
#rwTenantRentalsRows tr[data-rw-lease-edit]:hover td{
  background: #eef4fb;
}
#rwTenantRentalsRows .ra-inv-rent{
  width: 11%;
  white-space: nowrap;
}

/* Edit lease: the one property, no search. */
#rwTenantRentModal.is-edit #rwTenantRentSearch{
  display: none;
}
#rwTenantRentModal.is-edit #rwTenantRentPickRows tr{
  cursor: default;
}

/* Edit lease: which lease is being changed. */
.ra-tenant-rent-edit-note{
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 0.95rem;
}

/* Tenant add/edit (desktop): 20% wider, and Status | Has pet on one row under the name boxes. */
@media (min-width: 1025px){
  #rwPeopleForm.ra-people__form--sheet:has(#rwTenantPet:not([hidden])):not([hidden]){
    left: calc(var(--rw-side-nav, 144px) + 32px + (100vw - var(--rw-side-nav, 144px) - 64px) * 0.08) !important;
    width: calc((100vw - var(--rw-side-nav, 144px) - 64px) * 0.84) !important;
  }

  #rwPeopleForm:has(#rwTenantPet:not([hidden])) #rwPeopleOwnerLayout{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 10px;
    align-items: end;
  }

  #rwPeopleForm:has(#rwTenantPet:not([hidden])) #rwPeopleOwnerLayout > *{
    grid-column: 1 / -1;
  }

  #rwPeopleForm:has(#rwTenantPet:not([hidden])) #rwPeopleOwnerLayout > #rwPeopleActiveField{
    grid-column: 1;
    margin: 0;
  }

  #rwPeopleForm:has(#rwTenantPet:not([hidden])):has(#rwPeopleActiveField:not([hidden])) #rwPeopleOwnerLayout > #rwTenantPet{
    grid-column: 2;
    grid-row: span 1;
    margin: 0;
  }

  #rwPeopleForm:has(#rwTenantPet:not([hidden])):not(:has(#rwPeopleActiveField:not([hidden]))) #rwPeopleOwnerLayout > #rwTenantPet{
    grid-column: 1 / -1;
    margin: 0;
  }

  #rwPeopleForm:has(#rwTenantPet:not([hidden])) #rwPeopleOwnerLayout > #rwTenantPet .ra-people__field{
    margin: 0;
  }
}

/* Tenant left (the confirm with a leave date): 30% bigger each way, text included. */
#rwAppConfirm:has(#rwAppConfirmDateField:not([hidden])) .ra-portal__modal{
  zoom: 1.3;
}

/* Tenant add/edit (desktop): as high as it goes, right under the header, and full height so the lists scroll less. */
@media (min-width: 1025px){
  #rwPeopleForm.ra-people__form--sheet:has(#rwTenantPet:not([hidden])):not([hidden]){
    top: calc(var(--rw-header-h) + env(safe-area-inset-top, 0px) + 2px) !important;
    height: calc(100dvh - var(--rw-header-h) - env(safe-area-inset-top, 0px) - 6px) !important;
    max-height: calc(100dvh - var(--rw-header-h) - env(safe-area-inset-top, 0px) - 6px) !important;
  }
}

/* Dialogs open centered on their parent: the content area right of the side nav, where Edit Tenant sits. */
@media (min-width: 1025px){
  #rwTenantRentModal:not([hidden]),
  #rwRentConcessionModal:not([hidden]){
    padding-left: calc(var(--rw-side-nav, 144px) + 32px) !important;
    padding-right: 32px !important;
    justify-content: center;
    justify-items: center;
  }

  #rwTenantRentModal .ra-tenant-rent-modal,
  .ra-rent-concession-modal{
    width: calc((100vw - var(--rw-side-nav, 144px) - 64px) * 0.75) !important;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Edit lease: 30% wider and 30% taller than the Rent a property size. */
@media (min-width: 1025px){
  #rwTenantRentModal.is-edit .ra-tenant-rent-modal{
    width: calc((100vw - var(--rw-side-nav, 144px) - 64px) * 0.975) !important;
    min-height: 300px;
  }
}
#rwTenantRentModal.is-edit .ra-tenant-rent-edit-note{
  margin-top: 18px;
  line-height: 1.6;
}

/* Owners > Scheduled payments: Pay owners now in its own white bubble. */
.ra-owner-paynow{
  margin-top: 16px;
}
.ra-owner-paynow__title{
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 1.05rem;
}

/* Scheduled payments: Pay on day and Hold half as wide, Pay from takes the rest. */
.ra-owner-autopay .ra-rent-settings__line{
  align-items: flex-end;
}
.ra-owner-autopay .ra-rent-settings__line .ra-people__field{
  flex: 0 0 calc((100% - 24px) / 6);
  min-width: 0;
}

/* Scheduled payments / charges: a row of space under the checkbox, above Late fees go to and the
   note; the two Late fees options on one row; room under the last bubble when scrolled down. */
.ra-owner-autopay > .ra-rent-settings__row:first-child{
  margin-bottom: 20px;
}
.ra-rent-settings__radios{
  display: flex;
  flex-wrap: wrap;
  gap: 0 48px;
}
.ra-rent-settings__radios .ra-rent-settings__row{
  margin-top: 0;
}
/* Financial settings: the company-wide rules, said once above the cards. */
.ra-fin-settings__lead{
  margin: 16px 0 4px;
  max-width: 72ch;
  line-height: 1.5;
}
.ra-fin-settings__see{
  margin-top: 20px;
}
.ra-fin-settings__jump{
  padding: 0;
  border: 0;
  background: none;
  color: #1d4ed8;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ra-fin-settings__jump:hover{ text-decoration: underline; }
#rwOwnerTxStripeModal .ra-fin-settings__jump{ margin-right: auto; }
/* Payment settings → Settings: a table for vendors, then one for owners. One line per setting: the
   box, the setting, and the (i) that explains it. */
.ra-fin-settings__group + .ra-fin-settings__group{ margin-top: 32px; }
/* The title and "These apply to all …" on one line; Recommended settings on the right of the bar. */
.ra-fin-settings__titleline{ display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; min-width: 0; }
.ra-fin-settings__titleline > .ra-owner__muted{ margin: 0; }
.ra-fin-settings__grid{ width: 100%; }
.ra-fin-settings__grid th:first-child,
.ra-fin-settings__on{ width: 56px; text-align: center; }
.ra-fin-settings__grid th:last-child,
.ra-fin-settings__info{ width: 48px; text-align: center; }
.ra-fin-settings__on input{ width: 18px; height: 18px; margin: 0; cursor: pointer; }
.ra-fin-settings__grid label{ cursor: pointer; }
.ra-fin-settings__i{
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1.5px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
  color: #475569;
  font: italic 700 0.8rem/1 Georgia, "Times New Roman", serif;
  cursor: pointer;
}
.ra-fin-settings__i:hover,
.ra-fin-settings__i:focus-visible{ border-color: #1d4ed8; color: #1d4ed8; }
#rwFinSettingsHint{ margin-top: 12px; }

/* A select shown as a search-first drop list (search-select.js). */
.ra-search-select{
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}
.ra-search-select__native{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.ra-search-select__btn{
  display: block;
  width: 100%;
  height: 30px;
  padding: 2px 28px 2px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.ra-search-select__btn:disabled{
  background-color: #f8fafc;
  cursor: default;
}
.ra-search-select__btn.is-invalid,
.ra-search-select__btn[data-value=""],
.ra-search-select__btn[data-value="__invoice_address"]{
  color: #b91c1c;
}
.ra-search-select__search{
  display: block;
  box-sizing: border-box;
  width: calc(100% - 16px);
  height: 30px;
  margin: 8px;
  padding: 2px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
}

/* Invoice reference: says the invoice came in by email, on the title row. */
#rwEmailInvoiceForm .ra-estimate-form-head h3{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.ra-email-invoice-tag{
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e0ecfb;
  color: #1d4ed8;
  font-size: 12.5px;
  font-weight: 600;
}
.ra-email-invoice-tag[hidden]{
  display: none;
}

/* Close matches first; the last entry opens the whole list. */
.ra-search-select__all{
  color: #1d4ed8;
  font-weight: 600;
}

/* Header: email invoices waiting to be verified. Opens Invoices > Drafts. Pulses when new ones came. */
.ra-portal__inbox-chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fbbf24;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.ra-portal__inbox-chip[hidden],
/* Invoices to verify are the agent's work: never on a vendor, owner, or tenant page. */
body:not(.ra-portal--agent) .ra-portal__inbox-chip{
  display: none !important;
}
.ra-portal__inbox-chip:hover{
  background: #f59e0b;
}
/* Red dot: work is waiting (not an email). */
.ra-portal__inbox-dot{
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #dc2626;
  flex: none;
}
.ra-portal__inbox-chip.is-new{
  animation: ra-inbox-pulse 1.4s ease-in-out 4;
}
@keyframes ra-inbox-pulse{
  0%, 100%{ box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.9); }
  50%{ box-shadow: 0 0 0 7px rgba(251, 191, 36, 0); }
}
@media (max-width: 640px){
  #rwInvoiceInboxText .ra-inbox-word,
  #rwUndeliveredFlagText .ra-inbox-word{
    display: none;
  }
}
.ra-undelivered :is(th, td).ra-undelivered__count{
  width: 64px;
  text-align: right;
}
.ra-undelivered :is(th, td).ra-undelivered__action{
  width: 190px;
  text-align: right;
  white-space: nowrap;
}
.ra-undelivered__who{
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Drafts list: an email invoice whose vendor or property is not matched yet. */
.ra-no-match{
  color: #b91c1c;
  font-weight: 600;
}

/* Drafts list: an email invoice whose vendor and property are still being looked up. */
.ra-matching{
  color: #64748b;
  font-style: italic;
}

/* Drafts list: why automatic approval left a matched email invoice to verify. */
.ra-draft-hold{
  display: block;
  margin-top: 4px;
  color: #b45309;
  font-size: 12px;
  line-height: 1.3;
  white-space: normal;
}

/* Please confirm: a bit bigger, and as tall as its words (a fixed 25vh made short texts scroll). */
@media (min-width: 801px){
  #rwAppConfirm .ra-portal__modal{
    width: max(32vw, 420px) !important;
    max-width: min(92vw, 640px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 80vh !important;
  }
}
@media (max-width: 800px){
  #rwAppConfirm .ra-portal__modal{
    height: auto !important;
    max-height: 80vh !important;
  }
}
#rwAppConfirm .ra-portal__modal{
  overflow-y: auto;
}
#rwAppConfirmText{
  font-size: 1.05rem;
}

/* Email Invoices: the auto-approve bubble, and the green Approved AI status. */
.ra-invoice-auto{
  margin-top: 16px;
}
.ra-invoice-auto__note{
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
}
#rwInvoiceAutoHint:empty{
  display: none;
}
#rwInvoiceAutoHint.is-ok{
  color: #15803d;
}
.ra-status-chip--ai{
  background: #dcfce7 !important;
  color: #15803d !important;
  border-color: #86efac !important;
}

/* Vendor form: the subject words for invoice emails, with its note under the box. */
.ra-people__subject-note{
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.4;
}

/* Confirm dialog checkbox (reconcile now) and its note: only ledger lines, no money leaves the PM Treasury account. */
.ra-app-confirm__check{
  display: grid;
  gap: 6px;
  margin: 4px 0 14px;
  text-align: left;
}
.ra-app-confirm__check[hidden]{
  display: none;
}
.ra-app-confirm__check .ra-rent-settings__row{
  align-items: flex-start;
}
/* The dialog's own text color: the settings page's grey does not read on it. */
.ra-app-confirm__check .ra-rent-settings__row span{
  color: inherit;
  font-size: 14px;
}
.ra-app-confirm__note[hidden],
.ra-app-confirm__warn[hidden]{
  display: none;
}
/* Something to know before saying Yes (an owner paid more than they can draw). */
.ra-app-confirm__warn{
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid #fca5a5;
  color: #fecaca;
  font-weight: 600;
  line-height: 1.4;
}
.ra-app-confirm__note{
  display: block;
  padding: 8px 10px;
  border-left: 3px solid currentColor;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.95;
}
/* What each owner gets from a payment: sent, kept for the IRS, the payout fee. */
.ra-app-confirm__lines{
  margin: 0 0 12px;
  padding: 0 0 0 18px;
  text-align: left;
  font-size: 14px;
  line-height: 1.5;
}
.ra-app-confirm__lines[hidden],
.ra-app-confirm__musts[hidden]{
  display: none;
}
/* Boxes that must be ticked before Yes; the red one is money the owner does not have. */
.ra-app-confirm__musts{
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  text-align: left;
}
.ra-app-confirm__must{
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 12px;
  padding: 8px 10px;
  border-left: 3px solid #fcd34d;
}
.ra-app-confirm__must.is-danger{
  border-left-color: #fca5a5;
  color: #fecaca;
}
.ra-app-confirm__must .ra-rent-settings__row{
  flex: 1 1 240px;
  align-items: flex-start;
}
.ra-app-confirm__must .ra-rent-settings__row span{
  color: inherit;
  font-size: 14px;
  font-weight: 600;
}
.ra-app-confirm__must-action{
  border: 1px solid currentColor;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  padding: 3px 10px;
  cursor: pointer;
}
#rwAppConfirmYes:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}
.ra-rent-settings__tip{
  font-style: normal;
  color: #15803d;
  font-weight: 600;
}
.ra-rent-settings__gap{
  margin-top: 1.2em;
}
/* Money > Vendors cards: 50% wider than the owner cards. */
.ra-owner-autopay.ra-vendor-owner{
  max-width: 960px;
}
.ra-vendor-owner .ra-rent-settings__row{
  margin-top: 8px;
}

/* Reconcile: Refunds and credits, and Match a Stripe transaction. */
#rwCompDialog .ra-comp{
  position: relative;
  width: min(560px, calc(100vw - 24px));
  max-width: 100%;
  max-height: 85vh;
  overflow: visible;
  box-sizing: border-box;
}
.ra-comp__field{
  display: grid;
  gap: 4px;
  margin: 0 0 10px;
  font-weight: 600;
}
.ra-comp__field :is(input, select, textarea, .ra-search-select, .ra-search-select__btn){
  width: 100%;
  box-sizing: border-box;
  font-weight: 400;
}
.ra-comp__check{
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
}
.ra-comp__hint{
  margin: 0 0 8px;
  font-weight: 600;
}
.ra-comp__hint:empty{
  display: none;
}
.ra-comp__actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.ra-reconcile__act{
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
/* Reconcile waits for Stripe: a spinner in the table until the answer. */
.ra-reconcile__loading{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 0;
  color: #475569;
}
.ra-reconcile__loading .ra-spinner__ring{
  width: 26px;
  height: 26px;
}
.ra-reconcile__matched,
.ra-reconcile__state{
  font-size: 0.8em;
  font-weight: 700;
  opacity: 0.75;
}
@media (min-width: 1025px){
  #rwCompDialog:not([hidden]){
    padding-left: calc(var(--rw-side-nav, 144px) + 32px) !important;
    padding-right: 32px !important;
    justify-content: center;
    justify-items: center;
  }
}

/* Opened invoice: Approve / Reject and Pause / Resume sit top left, on the row of void, print and ×. */
.ra-invoice-view__actions{
  position: absolute;
  top: 12px;
  left: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ra-invoice-view > .ra-invoice-view__actions{
  top: 6px;
}
.ra-invoice-view__actions .ra-estimate-reply{
  margin: 0;
  white-space: nowrap;
}

/* The agent's AI tab (quick-actions.js): only on the agent's pages, not over the chat composer. */
.ra-quick{
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
}

body.ra-portal--agent:not(.ra-portal--agent-chat) .ra-quick{
  display: block;
}

.ra-quick__tab{
  width: 64px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--rw-navy-shine);
  color: #fff;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
  cursor: pointer;
}

.ra-quick__tab[hidden],
.ra-quick__panel[hidden],
.ra-quick__row[hidden],
.ra-quick__ask[hidden],
.ra-quick__answer[hidden],
.ra-quick__answer button[hidden]{
  display: none;
}

.ra-quick__panel{
  display: flex;
  flex-direction: column;
  width: min(340px, calc(100vw - 32px));
  border: 1px solid var(--rw-panel-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--rw-shadow);
  overflow: hidden;
}

.ra-quick__bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 6px 8px 6px 12px;
  background: var(--rw-navy-shine);
  color: #fff;
}

.ra-quick__bar h2{
  margin: 0;
  font-size: 0.95rem;
}

.ra-quick__bar button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.ra-quick__bar button:hover{
  background: rgba(255, 255, 255, 0.14);
}

.ra-quick__body{
  display: grid;
  gap: 10px;
  padding: 12px;
}

.ra-quick__row{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ra-quick__row button,
.ra-quick__ask button,
.ra-quick__answer button{
  padding: 6px 12px;
  border: 1px solid var(--rw-gray-border);
  border-radius: 999px;
  background: #fff;
  color: var(--rw-text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.ra-quick__row button:hover,
.ra-quick__row button.is-active{
  border-color: var(--rw-navy-2);
  background: var(--rw-navy-2);
  color: #fff;
}

.ra-quick__say{
  margin: 0;
  color: var(--rw-text);
  font-size: 0.9rem;
}

.ra-quick__back{
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--rw-navy-2);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.ra-quick__back::before{
  content: "\2039\00a0";
}

.ra-quick__back[hidden]{
  display: none;
}

.ra-quick__ask{
  display: grid;
  gap: 6px;
}

.ra-quick__ask textarea{
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rw-gray-border);
  border-radius: 10px;
  font: inherit;
  resize: none;
}

.ra-quick__ask button{
  justify-self: end;
  border-color: var(--rw-navy-2);
  background: var(--rw-navy-2);
  color: #fff;
}

.ra-quick__answer{
  display: grid;
  gap: 8px;
  color: var(--rw-muted);
  font-size: 0.9rem;
}

.ra-quick__answer p{
  margin: 0;
}

.ra-quick__answer button{
  justify-self: start;
}

/* Bank chat in the AI tab: questions on the right, replies on the left, scrolling once it grows. */
.ra-quick__answer p.ra-quick__chat{
  display: grid;
  gap: 8px;
  max-height: min(46vh, 360px);
  overflow-y: auto;
}

.ra-quick__turn{
  max-width: 88%;
  padding: 7px 11px;
  border-radius: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.ra-quick__turn--me{
  justify-self: end;
  background: var(--rw-navy-2);
  color: #fff;
}

.ra-quick__turn--ai{
  justify-self: start;
  background: #eef2f7;
  color: #0f172a;
}

/* Pay tabs: "From" sits inside the Treasury account box, before the account name. */
.ra-owner-pay-from{
  flex: 0 0 auto;
  color: #64748b;
}

/* Signatures (e-signature through SignWell): agent list, signer list, send dialog, embedded signer. */
.ra-esign-grid th,
.ra-esign-grid td{
  padding: 4px 8px;
  vertical-align: middle;
}
.ra-esign-grid__act{
  text-align: right;
  white-space: nowrap;
}
.ra-esign-pill{
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #e0ecf8;
  color: #203e64;
  font-size: 0.82rem;
  font-weight: 700;
}
/* Documents (every role): filters in the toolbar, type tags, the Signature column, the viewer. */
.ra-docs__filters{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* Same outline, corners and height as the search box beside them (.ra-owner-tx-search). */
.ra-docs__filter{
  box-sizing: border-box;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #6d8299;
  border-radius: 6px;
  background-color: #fff;
  font: inherit;
  font-size: 0.85rem;
}

.ra-docs__filters .ra-search-select__btn{ width: 220px; padding-left: 10px; }

.ra-docs-grid .ra-docs__row{ cursor: pointer; }
.ra-docs-grid .ra-docs__row:hover td{ background: #f8fafc; }

/* New documents: a blue dot before the name and a bold name; read ones lose the bold. */
.ra-docs-grid .ra-docs__title{ font-weight: 500; }
.ra-docs-grid tr.is-unread .ra-docs__title{ font-weight: 700; }
.ra-docs__new{
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 7px 1px 0;
  border-radius: 50%;
  background: #2563eb;
  vertical-align: middle;
}

.ra-docs__mark-read{ height: 32px; white-space: nowrap; }
.ra-docs__mark-read[hidden]{ display: none; }

.ra-docs__tag{
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 650;
  background: #e5e7eb;
  color: #374151;
}

.ra-docs__tag--lease{ background: #dbeafe; color: #1e3a8a; }
.ra-docs__tag--agreement{ background: #ede9fe; color: #5b21b6; }
.ra-docs__tag--notice{ background: #fef3c7; color: #92400e; }
.ra-docs__tag--tax{ background: #dcfce7; color: #166534; }

.ra-docs__role{
  margin-left: 4px;
  font-size: 0.75rem;
  color: #64748b;
}

.ra-docs__signed{ color: #166534; white-space: nowrap; }

.ra-docs__sign{ padding: 4px 14px; }

/* The × sits inside the picker, left of the arrow, so showing it never moves the other filters. */
.ra-docs__pick{
  position: relative;
  display: inline-flex;
  align-items: center;
}

.ra-docs__pick .ra-search-select__btn{ padding-right: 46px; }

/* Nothing picked: the label reads like the search box's hint, not like an error. */
.ra-docs__filters .ra-search-select__btn[data-value=""]{ color: #757575; }

.ra-docs__clear{
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  padding: 0 4px;
  border: 0;
  background: none;
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.ra-docs__clear[hidden]{ display: none; }

@media (max-width: 640px){
  .ra-docs__filters .ra-search-select__btn{ width: 100%; }
}

.ra-esign-pill.is-good{ background: #dcfce7; color: #166534; }
.ra-esign-pill.is-bad{ background: #fee2e2; color: #991b1b; }
.ra-esign-pill.is-muted{ background: #e5e7eb; color: #4b5563; }
.ra-esign-bad{ color: #b91c1c; }
.ra-esign-link{
  margin-left: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: #1d4ed8;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ra-esign-link:hover{ text-decoration: underline; }
.ra-esign-link--bad{ color: #b91c1c; }
.ra-esign-sign{ padding: 6px 16px; }
#rwEsignDialog .ra-esign-dialog{
  width: min(560px, calc(100vw - 24px));
  max-height: 85vh;
  overflow: visible;
}
#rwEsignFileField[hidden]{ display: none; }
/* Send for signature: a company template's fields, filled for the signer. */
.ra-esign-values{
  max-height: 34vh;
  overflow-y: auto;
  margin: 0 0 10px;
  padding: 10px 12px 0;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fafc;
}
.ra-esign-values__title{
  margin: 0 0 8px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #203e64;
}
.ra-esign-values .ra-comp__field small{ font-weight: 400; }
/* Signing templates: a big dialog, from the top of the window. */
#rwEsignTplDialog:not([hidden]){
  top: 0;
  z-index: 100;
  align-items: start;
  padding-top: 10px;
}
#rwEsignTplDialog .ra-portal__modal.ra-esign-templates{
  width: min(1100px, calc(100vw - 24px));
  max-width: none;
  height: calc(100dvh - 20px);
  max-height: none;
  overflow-y: auto;
}
.ra-esign-templates h4.ra-esign-values__title{ margin-top: 18px; }
.ra-esign-markers{ margin: 0 0 14px; }
.ra-esign-markers code{ font-weight: 700; color: #203e64; }
.ra-esign-tpl-form{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 14px;
  align-items: end;
}
@media (max-width: 760px){
  .ra-esign-tpl-form{ grid-template-columns: 1fr; }
}
/* The signer fills the content area: the shared 50vw / 50vh modal caps don't apply. */
#rwEsignSignDialog .ra-esign-signer{
  position: relative;
  box-sizing: border-box;
  width: calc(100vw - 24px) !important;
  max-width: none !important;
  height: calc(100dvh - var(--rw-header-h, 56px) - 13px) !important;
  max-height: none !important;
  padding: 36px 8px 8px;
}
.ra-esign-frame{
  width: 100%;
  height: 100%;
}
.ra-esign-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
}
/* Dialogs open centered on their parent: the content area right of the side nav. */
@media (min-width: 1025px){
  #rwEsignDialog:not([hidden]),
  #rwEsignTplDialog:not([hidden]),
  #rwEsignSignDialog:not([hidden]){
    padding-left: calc(var(--rw-side-nav, 144px) + 32px) !important;
    padding-right: 32px !important;
    justify-content: center;
    justify-items: center;
  }
  #rwEsignSignDialog .ra-esign-signer{
    width: calc(100vw - var(--rw-side-nav, 144px) - 64px) !important;
  }
  #rwEsignTplDialog .ra-portal__modal.ra-esign-templates{
    width: min(1100px, calc(100vw - var(--rw-side-nav, 144px) - 64px));
  }
}

/* Owners > Invite: the invitation dialog and its list. */
#rwInviteDialog .ra-esign-dialog{
  width: min(620px, calc(100vw - 24px));
  max-height: 85vh;
  overflow-y: auto;
}
.ra-owner-invites{ margin-top: 18px; }
.ra-owner-invites__title{
  margin: 0 0 8px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #203e64;
}
@media (min-width: 1025px){
  #rwInviteDialog:not([hidden]){
    padding-left: calc(var(--rw-side-nav, 144px) + 32px) !important;
    padding-right: 32px !important;
    justify-content: center;
    justify-items: center;
  }
}

/* Owner form: "Owned by an LLC or corporation", and its fields greyed out until it is ticked. */
.ra-owner-entity__check{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
}
.ra-owner-entity__check input{ width: 18px; height: 18px; margin: 0; }
/* Owner form: what the management fee counts, one line of ticks. Greyed for a fixed fee. */
.ra-owner-fee-on{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  min-height: 40px;
}
.ra-owner-fee-on__label{ font-size: 0.9rem; font-weight: 700; color: #0f172a; }
.ra-owner-fee-on .ra-owner-entity__check{ font-weight: 600; }
.ra-owner-fee-on.is-off{ opacity: 0.45; }
.ra-owner-fee-on .ra-owner-entity__check:has(input:disabled){ cursor: default; }
#rwOwnerEntityNameField:has(input:disabled),
#rwOwnerEntityEinField:has(input:disabled){ opacity: 0.45; }
#rwOwnerEntityNameField input:disabled,
#rwOwnerEntityEinField input:disabled{ background: #f1f5f9; cursor: not-allowed; }

/* Invite dialog: first and last name side by side. */
#rwInviteDialog .ra-people__pair{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 16px;
}

/* Toolbar buttons on light pages: solid navy like the + button, or outlined. */
.ra-tool-btn{
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #102d4e;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.ra-tool-btn:hover{ background: #1b4471; }
.ra-tool-btn--outline{
  background: #fff;
  color: #102d4e;
  border: 1.5px solid #102d4e;
}
.ra-tool-btn--outline:hover{ background: #eef4fb; }
.ra-tool-btn[hidden]{ display: none !important; }

/* Invite dialog: the app's input boxes, and the invitations as plain rows. */
#rwInviteDialog .ra-comp__field input{
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid #6d8299;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: #0f172a;
}
.ra-invite-list{
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.ra-invite-row{
  display: grid;
  /* Fixed date and button columns, so every row lines up. */
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) 92px 148px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5edf5;
  color: #0f172a;
}
.ra-invite-row:last-child{ border-bottom: 0; }
.ra-invite-row__who,
.ra-invite-row__state{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}
.ra-invite-row__who strong{ font-size: 0.92rem; }
.ra-invite-row small{ color: #475569; font-size: 0.78rem; line-height: 1.3; }
.ra-invite-row__date{ color: #475569; font-size: 0.8rem; white-space: nowrap; }
.ra-invite-row__acts{ display: flex; gap: 6px; justify-content: flex-end; }

/* Taxes > Request form: who it goes to, what is on file, the forms as choice cards (name, who it is
   for, how they return it), and Cancel / navy Send in the dialog's footer. */
#rwTaxRequest .ra-tax-request,
#rwTaxHold .ra-tax-hold{ width: min(600px, calc(100vw - 24px)); }
@media (min-width: 1025px){
  #rwTaxRequest:not([hidden]),
  #rwTaxHold:not([hidden]){
    padding-left: calc(var(--rw-side-nav, 144px) + 32px) !important;
    padding-right: 32px !important;
    justify-content: center;
    justify-items: center;
  }
}
.ra-tax-request__to{ margin: 0 0 4px; color: var(--ad-ink-2, #334155); font-size: 0.92rem; overflow-wrap: anywhere; }
.ra-tax-request__to strong{ color: var(--ad-ink, #0f1b2d); font-weight: 600; }
.ra-tax-request__state{ margin: 0 0 16px; color: var(--ad-mute, #64748b); font-size: 0.85rem; }
.ra-tax-request__withdraw{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -8px 0 16px; }
.ra-tax-request__withdraw[hidden]{ display: none; }
.ra-tax-request__withdraw .ra-comp__hint{ margin: 0; }
.ra-tax-request__forms{ display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.ra-tax-request__forms legend{
  margin: 0 0 8px;
  padding: 0;
  color: var(--ad-mute, #64748b);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ra-tax-request__opt{
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--ad-line, #e2e8f0);
  border-radius: 12px;
  background: var(--ad-paper, #fff);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.ra-tax-request__opt:hover{ border-color: var(--ad-ring, #94a3b8); }
.ra-tax-request__opt input{ position: absolute; opacity: 0; pointer-events: none; }
.ra-tax-request__opt:has(input:checked){
  border-color: var(--ad-navy, #102d4e);
  background: color-mix(in srgb, var(--ad-navy, #102d4e) 5%, var(--ad-paper, #fff));
  box-shadow: inset 0 0 0 1px var(--ad-navy, #102d4e);
}
.ra-tax-request__opt:has(input:focus-visible){ box-shadow: inset 0 0 0 1px var(--ad-navy, #102d4e), 0 0 0 3px rgba(37, 99, 235, 0.22); }
.ra-tax-request__name{ color: var(--ad-ink, #0f1b2d); font-weight: 650; font-size: 0.95rem; white-space: nowrap; }
.ra-tax-request__who{ color: var(--ad-ink-2, #334155); font-size: 0.86rem; line-height: 1.35; }
.ra-tax-request__how{
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--ad-line-2, #f1f5f9);
  color: var(--ad-mute, #64748b);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.ra-tax-request__opt:has(input:checked) .ra-tax-request__how{ background: var(--ad-gold-bg, #fdf3dc); color: var(--ad-gold-ink, #8f6418); }
.ra-tax-request__note{ margin: 14px 0 0; }
/* Pay, held for a missing tax form: who and what is missing, then the choice cards (name, what it does). */
.ra-tax-hold__lead{ margin: 0 0 12px; color: var(--ad-ink-2, #334155); font-size: 0.92rem; line-height: 1.45; }
.ra-tax-hold__who{
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ad-gold-bg, #fdf3dc);
  list-style: none;
}
.ra-tax-hold__who li{ display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 0.9rem; }
.ra-tax-hold__who strong{ color: var(--ad-ink, #0f1b2d); font-weight: 600; overflow-wrap: anywhere; }
.ra-tax-hold__who span{ color: var(--ad-gold-ink, #8f6418); font-size: 0.85rem; }
.ra-tax-hold__next{ margin: 0; color: var(--ad-ink-2, #334155); font-size: 0.9rem; line-height: 1.45; }
.ra-tax-hold__opt{ grid-template-columns: minmax(150px, 34%) minmax(0, 1fr); }
.ra-tax-hold__opt .ra-tax-request__name{ white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 560px){
  .ra-tax-hold__opt{ grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
.ra-tax-sheet__note{ margin: 2px 0 0 26px; font-size: 0.82rem; }
.ra-tax-asked{ color: var(--ad-gold-ink, #8f6418) !important; }
@media (max-width: 560px){
  .ra-tax-request__opt{ grid-template-columns: 64px minmax(0, 1fr); }
  .ra-tax-request__how{ grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce){
  .ra-tax-request__opt{ transition: none; }
}
.ra-mini-btn{
  padding: 5px 10px;
  border: 1.5px solid #102d4e;
  border-radius: 8px;
  background: #fff;
  color: #102d4e;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.ra-mini-btn:hover{ background: #eef4fb; }
.ra-mini-btn--bad{ border-color: #b91c1c; color: #b91c1c; }
.ra-mini-btn--bad:hover{ background: #fef2f2; }

/* Dialog title row: the title on the left, the red × on the right. */
.ra-dialog-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.ra-dialog-head .ra-portal__modal-title{ margin: 0; }
.ra-dialog-head .ra-estimate-bubble-x{ flex: 0 0 auto; cursor: pointer; }
.ra-comp__actions--end .ra-portal__primary-btn{ flex: 0 0 auto; width: auto; padding-left: 22px; padding-right: 22px; }

/* Payment settings → Owner settings → Default fees for new owners: label over [% / $] [amount]. */
.ra-fee-defaults{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.ra-fee-defaults > .ra-people__field{
  flex: 0 1 160px;
  min-width: 140px;
}

.ra-fee-defaults__line{
  display: flex;
  gap: 6px;
}

.ra-fee-defaults__line select,
html.ad-on body.ra-portal--signed-in .ra-fee-defaults__line select{
  flex: 0 0 auto;
  width: 72px !important;
  min-width: 72px;
}

.ra-fee-defaults__line input{
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Pay now opened from inside an invoice, and the payment report after it, show in front of that
   invoice's window (the paper viewer is at 1200). */
#rwAgentInvoiceBatchModal:not([hidden]),
#rwOwnerTxStripeModal:not([hidden]){
  z-index: 1300 !important;
}
/* Asked while Pay now is open: the tax-form choice, and the Request form it may open, sit in front of it. */
#rwTaxHold:not([hidden]),
#rwTaxRequest:not([hidden]){
  z-index: 1320 !important;
}

/* Invite: Invite history on the left of the actions row, Send invitation on the right. */
#rwInviteDialog .ra-invite-actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Invite history: its own big dialog, high on the window, wide, centered on the page area. Tabs
   (Vendors, Owners, Agents, Tenants, each with its count) and the search share one bar; the list
   scrolls under them. */
#rwInviteHistory:not([hidden]){
  top: 0 !important;
  z-index: 110 !important;
  align-items: start !important;
  align-content: start !important;
  justify-content: center;
  justify-items: center;
  padding: 10px 16px !important;
}

@media (min-width: 1025px){
  #rwInviteHistory:not([hidden]){
    padding-left: calc(var(--rw-side-nav, 144px) + 32px) !important;
    padding-right: 32px !important;
  }
}

#rwInviteHistory .ra-portal__modal.ra-invite-history{
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(1040px, 100%) !important;
  max-width: 100% !important;
  height: calc(100dvh - 20px);
  max-height: calc(100dvh - 20px) !important;
  margin: 0;
  padding: 22px 24px 18px;
  overflow: hidden;
}

.ra-invite-history .ra-dialog-head{
  flex: none;
}

.ra-invite-history__bar{
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
}

.ra-invite-history__tabs{
  display: flex;
  gap: 4px;
  margin: 0 !important;
}

.ra-invite-history__tabs button{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ra-invite-history__count{
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef1f5;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  text-align: center;
}

.ra-invite-history__count:empty{
  display: none;
}

.ra-invite-history__tabs button[aria-selected="true"] .ra-invite-history__count{
  background: #102d4e;
  color: #fff;
}

#rwInviteHistorySearch{
  flex: 0 1 300px;
  min-width: 200px;
  height: 38px;
  box-sizing: border-box;
}

#rwInviteHistoryHint{
  flex: none;
  min-height: 1lh;
  margin: 0 0 6px;
}

.ra-invite-history__list{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.ra-invite-history__list .ra-invite-row--head{
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 9px;
  padding-bottom: 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ra-invite-history__empty{
  margin: 48px 0;
  color: #64748b;
  text-align: center;
}

@media (max-width: 640px){
  #rwInviteHistory .ra-portal__modal.ra-invite-history{
    padding: 18px 14px 14px;
  }

  #rwInviteHistorySearch{
    flex: 1 1 100%;
  }

  .ra-invite-history__list .ra-invite-row--head{
    display: none;
  }

  .ra-invite-history__list .ra-invite-row{
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .ra-invite-history__list .ra-invite-row__acts{
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

html.ad-on #rwInviteHistory .ra-invite-list{
  border-color: var(--ad-line, #ebe7df);
  border-radius: 14px;
}

html.ad-on #rwInviteHistory .ra-invite-row{
  border-bottom-color: var(--ad-line-2, #f1eee8);
  font-family: var(--ad-sans);
}

html.ad-on #rwInviteHistory .ra-invite-row--head{
  background: var(--ad-bg, #f9f7f3);
  color: var(--ad-mute, #6b7686);
}

html.ad-on .ra-invite-history__count{
  background: var(--ad-track, #efece6);
  color: var(--ad-ink-2, #3d4a5c);
}

html.ad-on .ra-invite-history__tabs button[aria-selected="true"] .ra-invite-history__count{
  background: var(--ad-navy, #102d4e);
  color: #fff;
}

/* Cancel invitation's Yes / No shows in front of Invite history. */
body:has(#rwInviteHistory:not([hidden])) #rwAppConfirm:not([hidden]){
  z-index: 120 !important;
}


/* A vendor's file opened from any list is its From file sheet, read-only: Bill to, Property, Vendor
   invoice and Category share one label width, a row apart, as on the Drafts' sheet. */
.ra-tx-paper[data-rw-file-invoice] .ra-invoice-paper__party,
.ra-tx-paper[data-rw-file-invoice] [data-rw-paper-party-slot]{
  display: flex;
  flex-direction: column;
  gap: 1lh;
}
.ra-tx-paper[data-rw-file-invoice] .ra-invoice-paper__party-line,
.ra-tx-paper[data-rw-file-invoice] [data-rw-paper-party-slot] .ra-estimate-pair{
  margin: 0 !important;
}
.ra-tx-paper[data-rw-file-invoice] .ra-invoice-paper__party-label,
.ra-tx-paper[data-rw-file-invoice] [data-rw-paper-party-slot] .ra-estimate-pair > span:first-child{
  flex: 0 0 112px;
  min-width: 112px;
}
.ra-tx-paper[data-rw-file-invoice] [data-rw-paper-party-slot] .ra-estimate-pair > :last-child{
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  min-width: 0;
}
.ra-tx-paper[data-rw-file-invoice] [data-rw-paper-party-slot] .ra-invoice-original__got{
  color: var(--paper-muted, #64748b);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}
/* Drafts' sheet: Vendor, Property and Category are three boxes of one width; a ✓ sits just
   outside its box, so it does not narrow it. */
#rwAgentUploadForm [data-rw-paper-party-slot] .ra-invoice-ai-field{
  position: relative;
}
#rwAgentUploadForm [data-rw-paper-party-slot] #rwEmailInvoiceCategory{
  flex: 1 1 auto;
  width: auto;
  max-width: none;
}
#rwAgentUploadForm [data-rw-paper-party-slot] .ra-invoice-ai-field > .ra-estimate-check-mark{
  position: absolute;
  top: 50%;
  left: calc(100% + 8px);
  transform: translateY(-50%);
}
/* A total the AI did not confirm reads red in the total bar. */
/* The new design paints the bar's text; the warning red wins. */
.ra-invoice-paper .ra-invoice-file-total .ra-invoice-file-total__amount.is-unsure{
  color: #b91c1c !important;
  -webkit-text-fill-color: #b91c1c;
}

/* Tenant payments checklist on Bank accounts: one compact row per step, a green check when it is
   done and a red cross when not, with the step's button on the right. */
.ra-bank-check{
  margin: 0 0 14px;
  border: 1px solid #d6e0ea;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.35;
  overflow: hidden;
}

.ra-bank-check[hidden]{
  display: none;
}

.ra-bank-check__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid #e6ecf2;
  background: #f7f9fb;
  font-weight: 650;
}

.ra-bank-check__list{
  margin: 0;
  padding: 0;
  list-style: none;
}

.ra-bank-check__row{
  display: grid;
  grid-template-columns: 20px minmax(130px, 180px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  min-height: 42px;
  padding: 6px 14px;
}

.ra-bank-check__row + .ra-bank-check__row{
  border-top: 1px solid #eef2f6;
}

.ra-bank-check__mark{
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #dc2626 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M16 8 8 16M8 8l8 8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.ra-bank-check__row[data-done] .ra-bank-check__mark{
  background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.ra-bank-check__label{
  font-weight: 650;
}

.ra-bank-check__detail{
  color: #b91c1c;
}

.ra-bank-check__row[data-done] .ra-bank-check__detail{
  color: #475569;
}

.ra-bank-check__action{
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #102d4e;
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.ra-bank-check__action:hover{
  background: #1b4472;
}

@media (max-width: 640px){
  .ra-bank-check__row{
    grid-template-columns: 20px minmax(0, 1fr) auto;
  }

  .ra-bank-check__detail{
    grid-column: 2 / -1;
    grid-row: 2;
    font-size: 0.84rem;
  }
}

/* Stripe onboarding for the account tenants pay into: opens high and wide, full height. It ends
   above the window bottom (the overlay starts under the header), so Stripe's errors under the
   bank fields stay in reach of the scroll. */
.ra-portal__modal.ra-collection-modal{
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  height: calc(100dvh - var(--rw-header-h) - env(safe-area-inset-top, 0px) - 21px);
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* + on Bank accounts: a trust bank is added in Stripe's form, any other bank in ours. */
.ra-bank-add-choice{
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.ra-bank-add-choice__item{
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #d6e0ea;
  border-radius: 12px;
  background: #fff;
  color: #102d4e;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ra-bank-add-choice__item:hover,
.ra-bank-add-choice__item:focus-visible{
  border-color: #102d4e;
}

.ra-bank-add-choice__item span{
  color: #4a5d72;
  font-size: 0.92rem;
}

/* Your bank accounts: the three slots. The first column names the slot and what it is for. */
#rwBankSlots td:first-child{
  white-space: normal;
}

#rwBankSlots th:first-child,
#rwBankSlots td:first-child{
  width: 34%;
}

#rwBankSlots td:first-child strong{
  font-weight: 650;
}

.ra-bank-slot__note{
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 0.8rem;
}

/* Bank accounts views. The tabs (Accounts, Setup, Stripe Settings) sit under the title. Accounts
   shows the banks and, under them, the Stripe accounts; the money-flow drawing and a finished
   checklist live under Setup. One bank's moves, Help and a Stripe account's ledger each fill the
   page alone, without the title or the tabs. Help and + only belong with the accounts. */
#rwBankList[data-rw-bank-balances][data-rw-bank-view="main"][data-rw-setup-done] #rwBankCollection,
#rwBankList[data-rw-bank-view="setup"] #rwBankPrivateBlock,
#rwBankList[data-rw-bank-view="setup"] #rwBankTreasuryBlock,
#rwBankList[data-rw-bank-view="setup"] > :is(#rwBankIntro, #rwBankAlerts),
#rwBankList[data-rw-bank-view="stripe"] > :not(.ra-people__bar, #rwBankTabs, #rwBankOnboarding),
#rwBankList[data-rw-bank-view="help"] > :not(#rwBankGuide),
#rwBankList[data-rw-bank-view="activity"] > :not(#rwBankActivity),
#rwBankList[data-rw-bank-view="ledger"] > :not(#rwBankLedger),
#rwBankList[data-rw-bank-view="stripe"] :is(#rwBankHelp, #rwBankAdd),
#rwBankTabs[hidden],
[data-rw-money-pane][hidden]{
  display: none !important;
}

/* Financials > Payment settings (money-page.js). The Schedule tab (money-schedule.js): one card per
   schedule, the page's full width. Each tab scrolls by itself. */
[data-rw-agent-page="money"] > [data-rw-money-pane]:not([hidden]){
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 40px;
}

/* Payment settings > Fees: the fees drawing in its box, then Processing fees; its title scrolls away with the tab. */
#rwMoneyFeesPane .ra-invoice-toolbar{ position: static; }
#rwMoneyFeesPane #rwBankProcessing[hidden]{ display: none; }

/* Money schedule (money-schedule.js): one card per schedule, the page's full width. */
.ra-money-schedule{ display: grid; gap: 14px; }
.ra-money-schedule__lead{ margin: 0; color: #475569; font-size: 0.9rem; line-height: 1.55; }
.ra-money-schedule{ gap: 10px; }
.ra-money-schedule__card{ padding-top: 0; padding-bottom: 0; }
.ra-money-schedule__head{ display: flex; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; }
.ra-money-schedule__head::-webkit-details-marker{ display: none; }
.ra-money-schedule__head::before{ content: ""; flex: none; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s ease; opacity: 0.6; }
.ra-money-schedule__card[open] > .ra-money-schedule__head::before{ transform: rotate(45deg); }
.ra-money-schedule__head .ra-owner-paynow__title{ margin: 0; }
.ra-money-schedule__head .ra-owner__muted{ margin: 0 0 0 auto; text-align: right; }
.ra-money-schedule__body{ display: grid; gap: 8px; padding-bottom: 16px; }
/* Fees moving with owner payments: their own schedule shows, greyed out. */
.ra-money-schedule__body [data-ms-fees-own].is-off .ra-people__field{ opacity: .5; }
.ra-money-schedule__card .ra-rent-settings__line{ display: flex; flex-wrap: wrap; gap: 10px 14px; }
.ra-money-schedule__card .ra-bank-help{ justify-self: start; }
.ra-money-schedule__card [data-ms-hint]:empty{ display: none; }
.ra-money-schedule__save{ display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ra-money-schedule__card[open] > .ra-money-schedule__head .ra-money-schedule__meta{ visibility: hidden; }
.ra-money-schedule__meta{ display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px 0; font-size: 0.8rem; color: #64748b; }
.ra-money-schedule__meta > span + span::before{ content: "·"; margin: 0 7px; opacity: 0.6; }

/* Setup, Stripe Settings and Help: the title on the left, a quiet Back on the right of the same row. */
.ra-bank-view-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.ra-bank-view-head[hidden]{
  display: none;
}

.ra-bank-view-head > :is(h2, h3){
  margin: 0;
}

.ra-bank-view-head .ra-owner__back{
  flex: none;
  margin-right: -12px;
  color: #475569;
}

.ra-bank-view-head .ra-owner__back:hover{
  color: #0f172a;
}

/* Problems on the money's way (a negative Stripe balance, a failed payout): one quiet red box. */
.ra-bank-alerts{
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid #f3c4c4;
  border-radius: 12px;
  background: #fff6f6;
  color: #991b1b;
  font-size: 0.9rem;
  line-height: 1.4;
}

.ra-bank-alerts[hidden]{
  display: none;
}

.ra-bank-alerts__row{
  margin: 0;
}

.ra-bank-alerts__row + .ra-bank-alerts__row{
  margin-top: 6px;
}

/* The banks with balances: money columns right-aligned. */
#rwBankSlots[data-rw-balances] th:first-child,
#rwBankSlots[data-rw-balances] td:first-child{
  width: 26%;
}

#rwBankSlots[data-rw-balances] .ra-ledger__money{
  text-align: right;
  white-space: nowrap;
}

#rwBankSlots[data-rw-balances] .ra-ledger__money .ra-bank-slot__note{
  font-weight: 400;
}

/* One bank on its own page. */
.ra-bank-activity__sub{
  margin: -4px 0 14px;
  color: #64748b;
  font-size: 0.9rem;
}

.ra-bank-activity__sub:empty{
  display: none;
}

.ra-bank-activity .ra-invoice-head__actions{
  display: flex;
  align-items: center;
  gap: 10px;
}

.ra-bank-tiles{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.ra-bank-tiles:empty{
  display: none;
}

.ra-bank-tile{
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid #d6e0ea;
  border-radius: 12px;
  background: #fff;
}

.ra-bank-tile__label{
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}

.ra-bank-tile__value{
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ra-bank-tile--in .ra-bank-tile__value{
  color: #15803d;
}

.ra-bank-tile--out .ra-bank-tile__value{
  color: #b91c1c;
}

.ra-bank-tile--total{
  border-color: #102d4e;
}

.ra-bank-tile__note{
  color: #64748b;
  font-size: 0.78rem;
}

@media (max-width: 720px){
  .ra-bank-tiles{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#rwBankActivityTable .ra-ledger__money{
  text-align: right;
  white-space: nowrap;
}

/* A move's state: a small chip, grey once it is in the bank or did not happen. */
.ra-bank-state{
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f0fb;
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.ra-bank-state--arrived,
.ra-bank-state--taken,
.ra-bank-state--passing{
  background: #eef2f6;
  color: #475569;
}

.ra-bank-state--failed,
.ra-bank-state--returned{
  background: #fde8e8;
  color: #991b1b;
}

.ra-bank-move--done td{
  color: #64748b;
}


/* Allow payments from a trust bank: why the full number is asked for. */
.ra-bank-pull__lead{
  margin: 0 0 14px;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.45;
}

/* The Stripe account's own payout bank: not one of the three, so a quiet line. */
.ra-bank-payout-note{
  margin: 10px 2px 0;
  color: #94a3b8;
  font-size: 0.78rem;
  cursor: pointer;
}

.ra-bank-payout-note:hover{
  color: #64748b;
  text-decoration: underline;
}

/* Bank accounts: how money moves, above the Stripe accounts table. Three framed zones
   (roles, Stripe accounts, the PM's banks). Six equal rows, one per arrow, so a box that
   several arrows reach (Collection, Payments, Trust: Rent) spans their rows and every
   arrow meets its box level. */
.ra-flow{
  --flow-ink: #0f1b2d;
  --flow-mute: #5f6b7b;
  --flow-line: #e4dfd5;
  --flow-navy: #102d4e;
  margin: 4px auto 28px;
  padding: 0;
  max-width: 1080px;
}

.ra-flow__caption{
  margin: 0 auto 14px;
  max-width: 72ch;
  text-align: center;
  color: var(--flow-mute);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Rows: titles, top pad, six arrow rows (3-8), bottom pad. */
.ra-flow__grid{
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(56px, 7vw, 104px) minmax(0, 1fr) clamp(56px, 7vw, 104px) minmax(0, 0.8fr);
  grid-template-rows: auto 10px repeat(6, 1fr) 10px;
  max-width: 1080px;
  margin: 0 auto;
}

.ra-flow__title{
  grid-row: 1;
  margin: 0 0 8px;
  color: var(--flow-mute);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.ra-flow__title--roles,
.ra-flow__zone--roles,
.ra-flow__cell--roles{ grid-column: 1; }
.ra-flow__title--stripe,
.ra-flow__zone--stripe,
.ra-flow__cell--stripe{ grid-column: 3; }
.ra-flow__title--banks,
.ra-flow__zone--banks,
.ra-flow__cell--banks{ grid-column: 5; }

.ra-flow__zone{
  grid-row: 2 / 10;
  border: 1px solid var(--flow-line);
  border-radius: 18px;
}

.ra-flow__zone--roles{ background: #fbfaf7; }
.ra-flow__zone--stripe{ background: #f1f3fb; border-color: #dde2f3; }
.ra-flow__zone--banks{ background: #fbf6ec; border-color: #eee2c9; }

.ra-flow__cell{
  position: relative;
  display: grid;
  align-content: center;
  padding: 4px 14px;
}

/* Where each box sits: row 3 deposits in, 4 rent in, 5 owners, 6 vendors, 6-7 fees, 8 deposit refunds. */
.ra-flow__cell--tenants{ grid-row: 3 / 5; }
.ra-flow__cell--collect-security,
.ra-flow__cell--security{ grid-row: 3; }
.ra-flow__cell--collect-rent{ grid-row: 4; }
.ra-flow__cell--rent{ grid-row: 4 / 7; }
.ra-flow__cell--owners{ grid-row: 5; }
.ra-flow__cell--vendors{ grid-row: 6; }
.ra-flow__cell--payments{ grid-row: 5 / 9; }
.ra-flow__cell--operating{ grid-row: 7; }
.ra-flow__cell--refunds,
.ra-flow__cell--security2{ grid-row: 8; }

/* A box that spans rows stands as tall as all of them. */
.ra-flow__cell:is(.ra-flow__cell--tenants, .ra-flow__cell--rent, .ra-flow__cell--payments){ align-content: stretch; }
.ra-flow__cell:is(.ra-flow__cell--tenants, .ra-flow__cell--rent, .ra-flow__cell--payments) .ra-flow__node{ align-content: center; }

.ra-flow__node{
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--flow-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 27, 45, 0.04);
}

.ra-flow__node strong{
  color: var(--flow-ink);
  font-size: 0.95rem;
  font-weight: 650;
}

.ra-flow__node span{
  color: var(--flow-mute);
  font-size: 0.84rem;
}

.ra-flow__node b{
  font-weight: 600;
  color: var(--flow-ink);
}

.ra-flow__node :is(span, b)[data-rw-flow-empty]{
  color: #8f5a06;
}

/* Reconcile state, in gold at the foot of the Stripe box. */
.ra-flow__node{ position: relative; }
.ra-flow__status{
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  color: #8f5a06;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 600;
}

/* A Collection box is one row tall: its state is a line of its own. */
.ra-flow__cell--collection .ra-flow__status{ position: static; margin-top: 2px; }

/* An arrow between two zones: a line with a head and a small label above it. */
.ra-flow__arrow{
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  height: 40px;
  color: var(--flow-navy);
}

.ra-flow__arrow--pay-security{ grid-column: 2; grid-row: 3; }
.ra-flow__arrow--pay-rent{ grid-column: 2; grid-row: 4; }
.ra-flow__arrow--payout-security{ grid-column: 4; grid-row: 3; }
.ra-flow__arrow--payout-rent{ grid-column: 4; grid-row: 4; }
.ra-flow__arrow--pay-owners{ grid-column: 2; grid-row: 5; }
.ra-flow__arrow--pay-vendors{ grid-column: 2; grid-row: 6; }
.ra-flow__arrow--pull-owners{ grid-column: 4; grid-row: 5; }
.ra-flow__arrow--pull-fees{ grid-column: 4; grid-row: 6; }
.ra-flow__arrow--fees{ grid-column: 4; grid-row: 7; }
.ra-flow__arrow--refund{ grid-column: 2; grid-row: 8; }
.ra-flow__arrow--pull-refund{ grid-column: 4; grid-row: 8; }

.ra-flow__arrow::before{
  content: "";
  position: absolute;
  left: 6px;
  right: 10px;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.ra-flow__arrow::after{
  content: "";
  position: absolute;
  right: 4px;
  top: calc(50% - 5px);
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  transform: translateY(1px);
}

.ra-flow__arrow--left::before{ left: 10px; right: 6px; }
.ra-flow__arrow--left::after{ right: auto; left: 4px; transform: translateY(1px) scaleX(-1); }

.ra-flow__arrow span{
  position: relative;
  top: -13px;
  padding: 0 4px;
  color: var(--flow-mute);
  font-size: 0.74rem;
  font-weight: 600;
}

/* Fees turn around inside Payments: in from Trust: Rent on row 6, back out to Operating
   on row 7. The U opens toward the banks, its ends level with those two arrows. */
.ra-flow__uturn{
  grid-column: 3;
  grid-row: 6 / 8;
  position: relative;
  pointer-events: none;
}

.ra-flow__uturn::before{
  content: "";
  position: absolute;
  right: 15px;
  top: calc(25% - 1px);
  bottom: calc(25% - 1px);
  width: 52px;
  border: 2px solid var(--flow-navy);
  border-right: 0;
  border-radius: 22px 0 0 22px;
}

/* Under each arrow: a green tick when that move of money works today, a red cross when not. */
.ra-flow__mark{
  position: absolute;
  left: 50%;
  top: calc(50% + 7px);
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: #dc2626 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M16 8 8 16M8 8l8 8'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.ra-flow__mark[data-ok]{
  background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* A setup step on its box: shown until that box's arrows are green. */
.ra-flow__action{
  justify-self: start;
  height: 26px;
  margin-top: 6px;
  padding: 0 11px;
  border: 0;
  border-radius: 7px;
  background: #102d4e;
  color: #fff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.ra-flow__action:hover{ background: #1b4472; }

/* A box's buttons side by side; Change and Connect again are not a step, so they stay quiet. */
.ra-flow__actions{ display: flex; flex-wrap: wrap; gap: 0 6px; }
.ra-flow__action--quiet{
  border: 1px solid #c9d3df;
  background: #fff;
  color: #102d4e;
}
.ra-flow__action--quiet:hover{ background: #f1f4f8; }

/* A box with a step left has nothing to reconcile yet. */
.ra-flow__node[data-rw-flow-todo] .ra-flow__status{ display: none; }

/* Banks setup: the title on the bar, then the caption and the drawing, in one thin-outlined box. */
/* As wide as the drawing (900px) plus the same 16px on each side, not the whole page. */
.ra-bank-setup{ box-sizing: border-box; max-width: calc(900px + 2 * 16px + 2px); margin-bottom: 24px; }
.ra-bank-setup .ra-flow--small,
.ra-bank-setup .ra-flow--small .ra-flow__grid{ max-width: none; }
.ra-bank-setup__title{
  margin: 0;
  color: inherit;
  font: inherit;
  font-weight: 650;
}
.ra-bank-setup .ra-flow--small{ margin: 0; padding: 14px 16px 18px; }
/* One empty line of the caption's text between it and the column titles. */
.ra-bank-setup .ra-flow--small .ra-flow__caption{ margin-bottom: calc(12px + 1.5em); }
.ra-flow__cell--banks .ra-flow__action{ height: 22px; margin-top: 4px; padding: 0 9px; font-size: 0.7rem; }

/* The PM's banks are destinations only: smaller boxes. */
.ra-flow__cell--banks .ra-flow__node{ padding: 8px 12px; border-radius: 10px; }
.ra-flow__cell--banks .ra-flow__node strong{ font-size: 0.86rem; }
.ra-flow__cell--banks .ra-flow__node span{ font-size: 0.78rem; }

/* The drawing at a smaller size, on the left, two rows below the banks setup checklist. */
.ra-flow--small{ max-width: 900px; margin: 3em 0 calc(24px + 1.5em); }
.ra-flow--small .ra-flow__caption{ max-width: none; margin: 0 0 12px; text-align: left; font-size: 0.86rem; }
.ra-flow--small .ra-flow__grid{
  grid-template-columns: minmax(0, 1fr) clamp(48px, 6vw, 86px) minmax(0, 1fr) clamp(48px, 6vw, 86px) minmax(0, 0.8fr);
  grid-template-rows: auto 8px repeat(6, 1fr) 8px;
  max-width: 900px;
  margin: 0;
}
.ra-flow--small .ra-flow__title{ margin-bottom: 7px; font-size: 0.69rem; }
.ra-flow--small .ra-flow__zone{ border-radius: 15px; }
.ra-flow--small .ra-flow__cell{ padding: 4px 12px; }
.ra-flow--small .ra-flow__node{ padding: 10px 12px; border-radius: 10px; }
.ra-flow--small .ra-flow__node strong{ font-size: 0.86rem; }
.ra-flow--small .ra-flow__node span{ font-size: 0.76rem; }
.ra-flow--small .ra-flow__status{ left: 12px; right: 12px; bottom: 8px; font-size: 0.71rem; }
.ra-flow--small .ra-flow__arrow{ height: 35px; }
.ra-flow--small .ra-flow__arrow span{ top: -12px; font-size: 0.68rem; }
.ra-flow--small .ra-flow__uturn::before{ right: 12px; width: 43px; border-radius: 18px 0 0 18px; }
.ra-flow--small .ra-flow__cell--banks .ra-flow__node{ padding: 6px 10px; border-radius: 8px; }
.ra-flow--small .ra-flow__cell--banks .ra-flow__node strong{ font-size: 0.78rem; }
.ra-flow--small .ra-flow__cell--banks .ra-flow__node span{ font-size: 0.71rem; }


/* Phone: one column, every arrow pointing down: tenants pay in, Stripe pays out to the
   banks, Payments pulls from them and pays owners, vendors and deposit refunds (one arrow
   into the list of the three). */
@media (max-width: 640px){
  .ra-flow__grid{ grid-template-columns: minmax(0, 1fr); grid-template-rows: none; row-gap: 8px; }
  .ra-flow__grid > *{ grid-column: 1; grid-row: auto; }
  .ra-flow__caption{ text-align: left; }
  .ra-flow__title,
  .ra-flow__zone,
  .ra-flow__uturn,
  .ra-flow__cell--security2,
  .ra-flow__arrow:is(.ra-flow__arrow--pay-rent, .ra-flow__arrow--payout-rent, .ra-flow__arrow--pay-vendors, .ra-flow__arrow--pull-fees, .ra-flow__arrow--fees, .ra-flow__arrow--refund, .ra-flow__arrow--pull-refund){ display: none; }
  .ra-flow__cell{ padding: 0; }
  .ra-flow__cell--tenants{ order: 1; }
  .ra-flow__arrow--pay-security{ order: 2; }
  .ra-flow__cell--collection{ order: 3; }
  .ra-flow__arrow--payout-security{ order: 4; }
  .ra-flow__cell--security{ order: 5; }
  .ra-flow__cell--rent{ order: 6; }
  .ra-flow__cell--operating{ order: 7; }
  .ra-flow__arrow--pull-owners{ order: 8; }
  .ra-flow__cell--payments{ order: 9; }
  .ra-flow__arrow--pay-owners{ order: 10; }
  .ra-flow__cell--owners{ order: 11; }
  .ra-flow__cell--vendors{ order: 12; }
  .ra-flow__cell--refunds{ order: 13; }
  .ra-flow__arrow{ height: 34px; transform: rotate(90deg); width: 34px; justify-self: center; }
  .ra-flow__arrow--left{ transform: rotate(-90deg); }
  .ra-flow__arrow span{ display: none; }
  .ra-flow__mark{ display: none; }
  .ra-flow__status{ position: static; margin-top: 4px; }
}

/* Payment settings → Settings: the fees each side pays (tax documents, application fee), the footer of
   that side's card: a hairline above, the card's own padding, title and note, then the amounts in an
   even grid with $ inside each field, Save at the right. */
.ra-fin-fees{
  display: grid;
  gap: 16px;
  padding: 20px 24px 22px;
  border-top: 1px solid var(--ad-line, #e5e7eb);
  background: var(--ad-side, #fafafa);
  font-family: var(--ad-sans, inherit);
}
.ra-fin-fees__head{ display: grid; gap: 4px; }
.ra-fin-fees__title{
  margin: 0;
  color: var(--ad-ink, #0f172a);
  font: 600 0.95rem/1.3 var(--ad-sans, inherit);
}
.ra-fin-fees__note{
  margin: 0;
  max-width: 78ch;
  color: var(--ad-mute, #64748b);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.ra-fin-fees__grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px 16px;
  max-width: 880px;
}
/* Default fees for new owners: [% / $] + amount needs a little more room than a plain $ field. */
.ra-fin-fees__grid--wide{
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  max-width: 1040px;
}
.ra-fin-fees__field{ display: grid; gap: 6px; min-width: 0; }
.ra-fin-fees__field > :is(input, select){ width: 100%; min-width: 0; box-sizing: border-box; }
.ra-fin-fees__label{
  color: var(--ad-ink-2, #334155);
  font: 550 0.8125rem/1.2 var(--ad-sans, inherit);
}
/* The $ sits inside the field, the amount lines up on the right like money in the tables. */
.ra-fin-fees__money{ position: relative; display: block; }
.ra-fin-fees__money > span{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ad-mute, #64748b);
  font-size: 0.875rem;
  pointer-events: none;
}
/* The id beats the shared field padding of the new design (design.css). */
#rwFinSettingsPane.ra-fin-settings .ra-fin-fees .ra-fin-fees__money > input,
html.ad-on body.ra-portal--signed-in #rwFinSettingsPane.ra-fin-settings .ra-fin-fees .ra-fin-fees__money > input{
  width: 100%;
  padding-left: 26px !important;
  text-align: right;
  font-variant-numeric: tabular-nums !important;
}
/* The footer's hairline is the table's last line, so the last row draws none of its own. */
html.ad-on body.ra-portal--signed-in #rwFinSettingsPane .ra-fin-settings__grid tbody tr:last-child > td{
  border-bottom: 0 !important;
}
.ra-fin-fees__actions{ display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.ra-fin-fees__actions .ra-portal__primary-btn{ width: auto; }
@media (max-width: 640px){
  .ra-fin-fees{ padding: 16px; }
  .ra-fin-fees__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ra-fin-fees__actions .ra-portal__primary-btn{ width: 100%; justify-content: center; }
}

/* Homes maps (rentals-map.js): price pins; the pin of the card under the pointer lights. */
#rwRentals .rw-map-pin{ width: 0; height: 0; }
#rwRentals .rw-map-pin span{ position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 6px)); padding: 4px 10px; border: 1.5px solid #102d4e; border-radius: 999px; background: #fff; color: #102d4e; font: 700 12.5px/1.2 "Geist", system-ui, sans-serif; white-space: nowrap; box-shadow: 0 4px 12px -4px rgba(15, 27, 45, 0.35); cursor: pointer; }
#rwRentals .rw-map-pin span::after{ content: ""; position: absolute; left: 50%; bottom: -6px; width: 8px; height: 8px; background: inherit; border-right: 1.5px solid #102d4e; border-bottom: 1.5px solid #102d4e; transform: translateX(-50%) rotate(45deg); }
#rwRentals .rw-map-pin:hover span, #rwRentals .rw-map-pin.is-hot span{ background: #102d4e; color: #fff; }

/* ---------- Taxes → E-file with Nelco ---------- */
.ra-efile{ display: grid; gap: 16px; margin-top: 4px; }
.ra-efile[hidden]{ display: none; }
.ra-efile__main{ display: grid; gap: 16px; min-width: 0; }
.ra-efile__main[hidden]{ display: none; }
/* File | Setup: one view at a time. */
.ra-efile-views{ display: inline-flex; justify-self: start; gap: 2px; padding: 3px; border-radius: 999px; background: var(--ad-wash, #f1f4f8); border: 1px solid var(--ad-line, #e3e7ee); }
.ra-efile-views button{ border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font: inherit; font-size: 0.88rem; font-weight: 600; color: var(--ad-mute, #64748b); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ra-efile-views button:hover{ color: var(--ad-ink, #0f1b2d); }
.ra-efile-views button[aria-selected="true"]{ background: var(--ad-card, #fff); color: var(--ad-ink, #0f1b2d); box-shadow: 0 1px 3px rgba(15, 27, 45, 0.12); }
.ra-efile-views__count{ font-size: 0.76rem; font-weight: 650; padding: 1px 7px; border-radius: 999px; background: var(--ad-gold-bg, #fdf3dc); color: var(--ad-gold-ink, #8f6418); }
.ra-efile-views__ok{ color: var(--ad-green-ink, #166534); }
.ra-efile-notice{ margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--ad-gold-bg, #fdf3dc); color: var(--ad-gold-ink, #8f6418); font-size: 0.88rem; }
.ra-efile-notice__go{ border: 0; background: none; padding: 0; font: inherit; font-weight: 650; color: inherit; text-decoration: underline; cursor: pointer; }
.ra-efile__setup{ max-width: 760px; }
.ra-efile-card,
.ra-efile__setup{
  background: var(--ad-card, #fff);
  border: 1px solid var(--ad-line, #e3e7ee);
  border-radius: 14px;
  padding: 18px 20px;
  min-width: 0;
}
.ra-efile-card__title{ margin: 0 0 6px; font-size: 1.02rem; font-weight: 650; color: var(--ad-ink, #0f1b2d); }
.ra-efile-step__text{ margin: 0 0 8px; color: var(--ad-ink-2, #334155); font-size: 0.88rem; line-height: 1.45; overflow-wrap: anywhere; }
.ra-efile-badge{
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--ad-gold-bg, #fdf3dc);
  color: var(--ad-gold-ink, #8f6418);
  font-size: 0.86rem;
}
.ra-efile .ra-comp__hint.is-ok{ color: var(--ad-green-ink, #166534); }
.ra-efile-ready__head{ display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ra-efile-ready__head .ra-portal__primary-btn{ flex: 0 0 auto; }
.ra-efile-skipped{ margin: 4px 0 10px; padding-left: 18px; font-size: 0.86rem; color: var(--ad-gold-ink, #8f6418); }
.ra-efile-deadlines{ list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--ad-line, #e3e7ee); display: grid; gap: 4px; font-size: 0.84rem; }
.ra-efile-deadlines li{ display: flex; justify-content: space-between; gap: 12px; color: var(--ad-mute, #64748b); }
.ra-efile-deadlines strong{ color: var(--ad-ink, #0f1b2d); font-weight: 600; white-space: nowrap; }

.ra-efile-steps{ list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.ra-efile-step{ display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--ad-line, #e3e7ee); }
.ra-efile-step:first-child{ border-top: 0; }
.ra-efile-step__n{
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 650;
  background: var(--ad-gold-bg, #fdf3dc); color: var(--ad-gold-ink, #8f6418);
}
.ra-efile-step.is-done .ra-efile-step__n{ background: var(--ad-green-bg, #e7f6ec); color: var(--ad-green-ink, #166534); }
.ra-efile-step__title{ margin: 3px 0 6px; font-size: 0.93rem; font-weight: 650; color: var(--ad-ink, #0f1b2d); }
.ra-efile-form{ display: grid; gap: 10px; }
.ra-efile-form label{ display: grid; gap: 4px; font-size: 0.82rem; color: var(--ad-ink-2, #334155); }
.ra-efile-form input[type="email"],
.ra-efile-form input:not([type]){ padding: 8px 10px; border: 1px solid var(--ad-line, #cbd5e1); border-radius: 8px; font: inherit; min-width: 0; }
.ra-efile-form__row{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ra-efile .ra-efile-consent{ display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 0.85rem; line-height: 1.4; color: var(--ad-ink-2, #334155); }
.ra-efile-consent input{ margin-top: 2px; }
.ra-efile-form .ra-portal__primary-btn{ justify-self: start; }

.ra-efile-states{ width: 100%; border-collapse: collapse; margin: 4px 0 10px; font-size: 0.84rem; table-layout: fixed; }
.ra-efile-states th{ text-align: left; font-weight: 600; color: var(--ad-mute, #64748b); padding: 4px 6px; }
.ra-efile-states th:first-child{ width: 54px; }
.ra-efile-states th:last-child{ width: 40%; }
.ra-efile-states td small{ display: block; color: var(--ad-mute, #64748b); font-size: 0.74rem; white-space: nowrap; }
.ra-efile-states td{ padding: 4px 6px; border-top: 1px solid var(--ad-line, #eef1f5); vertical-align: middle; }
.ra-efile-states input,
.ra-efile-states select{ width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--ad-line, #cbd5e1); border-radius: 8px; font: inherit; }

.ra-efile-grid td small,
.ra-tax-status small{ display: block; color: var(--ad-mute, #64748b); font-size: 0.78rem; margin-top: 2px; }
.ra-tax-efile{ display: block; margin-top: 4px; }
.ra-efile-details td{ background: var(--ad-wash, #f8fafc); }
.ra-efile-agencies{ list-style: none; margin: 4px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.84rem; color: var(--ad-ink-2, #334155); }
.ra-efile-forms{ list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ra-efile-forms li{ display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 0.86rem; }
.ra-efile-forms__who{ flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.ra-efile-forms__why{ flex: 1 1 100%; color: #b91c1c; font-size: 0.82rem; }
/* Buttons keep their own width (Check status, File correction): the shared button rules stretch them. */
.ra-efile .ra-efile-ready__head .ra-vendor__btn,
.ra-efile .ra-efile-forms .ra-vendor__btn{ flex: 0 0 auto !important; width: auto !important; }

#rwEfileReview .ra-efile-review{ width: min(620px, calc(100vw - 24px)); }
/* Nelco's words on one line, ours on the next. */
#rwEfileReviewHint{ white-space: pre-line; }
.ra-efile-review__lead{ margin: 0 0 10px; color: var(--ad-ink-2, #334155); }
.ra-efile-review__forms{ max-height: 240px; overflow: auto; padding: 8px 10px; border: 1px solid var(--ad-line, #e3e7ee); border-radius: 10px; }
.ra-efile-review__forms li{ justify-content: space-between; }
.ra-efile-price{ width: 100%; margin: 12px 0 0; border-collapse: collapse; font-size: 0.85rem; color: var(--ad-ink-2, #334155); }
.ra-efile-price td{ padding: 3px 0; }
.ra-efile-price td:last-child{ text-align: right !important; padding-right: 0 !important; }
.ra-efile-review__total{ display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 6px; padding-top: 10px; border-top: 1px solid var(--ad-line, #e3e7ee); }
.ra-efile-review__total strong{ font-size: 1.25rem; color: var(--ad-ink, #0f1b2d); }

@media (max-width: 640px){
  .ra-efile-card, .ra-efile__setup{ padding: 14px; }
  .ra-efile-form__row{ grid-template-columns: 1fr; }
  .ra-efile-grid th:nth-child(3), .ra-efile-grid td:nth-child(3){ display: none; }
}

/* Owner name on Owner accounts opens the owner: same colour, a quiet underline. */
.ra-name-link{
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  cursor: pointer;
}

.ra-name-link:hover,
.ra-name-link:focus-visible{
  text-decoration-color: currentColor;
}

/* Clear filters (list-memory.js): a funnel-with-x icon beside a list search, same box as the search. */
.ra-list-reset{
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #6d8299;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.ra-list-reset:hover{
  background: #f1f5f9;
}

/* A saved record opens as a view (view-lock.js): fields read as text, actions wait for Edit. */
.ra-form--view:not(#rwViewA) :is(input, textarea, select):not([type="checkbox"], [type="radio"]){
  background-color: #f1f5f9 !important;
  cursor: default;
}

.ra-form--view select{
  pointer-events: none;
}

.ra-form--view :is(button, [role="button"]):not([data-rw-view-edit], .ra-list-x, [data-rw-sheet-x], [data-rw-detail-back], [data-rw-view-safe], [data-rw-property], [role="tab"]),
.ra-form--view :is(input[type="checkbox"], input[type="radio"]){
  opacity: 0.55;
  cursor: default;
}

/* Documents: the reset button matches its filters' 32px boxes. */
.ra-docs__filters .ra-list-reset{
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

/* Owner accounts, Tenant rent, Vendor bills → List: the people list moved in; the tab's own title bar replaces the list's toolbar. */
[data-rw-people-list] #rwPeopleList > .ra-invoice-toolbar,
[data-rw-people-list] .ra-tx-titlebar > .ra-invoice-head__actions[hidden]{
  display: none !important;
}

/* The list's table gets the page's height and scrolls under its title bar, like the other tabs. A
   person's form or detail open in it scrolls as a whole instead. */
[data-rw-people-list] > .ra-tx-titlebar{
  flex: 0 0 auto;
}
[data-rw-people-list] > [id$="ListHost"],
[data-rw-people-list] > [id$="ListHost"] > #rwPeople:not([hidden]){
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
[data-rw-people-list]:has(#rwPeople > :is(#rwOwnerDetail, #rwTenantLeases, #rwPeopleForm, #rwPropertyForm):not([hidden])) > [id$="ListHost"]{
  overflow-y: auto;
}
[data-rw-people-list] > [id$="ListHost"] > #rwPeople > #rwPeopleList:not([hidden]){
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* A person's name clicked on another tab (Charge, Pay, ...): only their sheet shows, over that tab;
   the page stays on the tab and the people list stays on its List tab. */
/* The id twice: it must beat ".ra-owner__page:not([hidden]) #rwPeople:...:has(#rwPeopleForm...) #rwPeopleList" (display: flex !important). */
#rwPeopleSheetHost#rwPeopleSheetHost > #rwPeople > :not(#rwPeopleForm, #rwOwnerDetail, #rwPropertyForm, #rwTenantLeases){
  display: none !important;
}

@media (max-width: 1024px){
  /* On a phone the sheet shows in place: the tab's own rows wait behind it. */
  .ra-owner__page:has(> #rwPeopleSheetHost > #rwPeople:not([hidden])) > :not(#rwPeopleSheetHost){
    display: none !important;
  }
}

/* Money is green above zero and red below, everywhere (money-color.js marks the amounts). */
[data-rw-money="pos"]{ color: #15803d !important; }
[data-rw-money="neg"]{ color: #b91c1c !important; }

/* Owner → Properties: a property row opens its rent history (owner-property-rent.js), a big dialog
   high on the window, wide, centered on the page area. */
#rwOwnerPropertyList tr[data-rw-owner-property]{ cursor: pointer; }
#rwOwnerPropertyRent:not([hidden]){
  top: 0 !important;
  z-index: 100 !important;
  align-items: start !important;
  align-content: start !important;
  justify-content: center;
  justify-items: center;
  padding: 10px 16px !important;
}
@media (min-width: 1025px){
  #rwOwnerPropertyRent:not([hidden]){
    padding-left: calc(var(--rw-side-nav, 144px) + 32px) !important;
    padding-right: 32px !important;
  }
}
#rwOwnerPropertyRent .ra-portal__modal.ra-property-rent{
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(1040px, 100%) !important;
  max-width: 100% !important;
  height: calc(100dvh - 20px);
  max-height: calc(100dvh - 20px) !important;
  margin: 0;
  padding: 22px 24px 18px;
  overflow: hidden;
}
.ra-property-rent .ra-dialog-head,
.ra-property-rent__where,
.ra-property-rent__note{ flex: none; }
.ra-property-rent__where{ margin: 4px 0 8px; color: #475569; }
.ra-property-rent__body{ flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ra-property-rent__lease{ margin: 14px 0 6px; font-size: 0.95rem; color: #203e64; }
.ra-property-rent__lease:first-child{ margin-top: 4px; }
.ra-property-rent__current{ font-weight: 600; color: #15803d; }
.ra-property-rent__scroll{ overflow-x: auto; }
.ra-property-rent__grid{ width: 100%; min-width: 640px; }
.ra-property-rent__grid :is(th, td){ white-space: nowrap; }
.ra-property-rent__num{ text-align: left; }
.ra-property-rent__grid tfoot td{ border-top: 2px solid #cbd5e1; }
.ra-property-rent__note{ margin: 10px 0 0; font-size: 0.8rem; }
@media (max-width: 640px){
  #rwOwnerPropertyRent .ra-portal__modal.ra-property-rent{ padding: 16px 12px 12px; }
}

/* Masked like a password, but Chrome does not offer to save it (see no-autofill.js). */
.ra-secret{ -webkit-text-security: disc; }
