:root {
  --teal:#198c9d;
  --pine:#087585;
  --deep:#12616f;
  --dark:#293641;
  --muted:#566872;
  --line:#d7e0e5;
  --canvas:#fff;
  --white:#fff;
  --panel:#fff;
  --wash:#f3f6f8;
  --ink:#293641;
  --rail:240px;
  --bar:50px;
  background:var(--canvas);
  color:var(--ink);
  font-family:Roboto,"Segoe UI",Arial,sans-serif;
  font-size:15px;
}
:root[data-theme=dark] {
  color-scheme:dark;
  --canvas:#18232a;
  --panel:#202d34;
  --wash:#283740;
  --ink:#edf2f4;
  --dark:#edf2f4;
  --muted:#bac8ce;
  --line:#455660;
  --pine:#2193a4;
  --deep:#165764;
}
[hidden] {
  display:none!important;
}
body {
  background:var(--canvas);
  color:var(--ink);
}
button,input,select,.box,.stat,details {
  border-radius:4px;
}
input,select,button.subtle,.queue-filter,.switch,.box,.stat {
  background:var(--panel);
  color:var(--ink);
  border-color:var(--line);
}
button {
  font-weight:600;
}
button:hover {
  filter:none;
  box-shadow:inset 0 0 0 100px #66798513;
}
button:focus-visible,a:focus-visible,summary:focus-visible,:focus-visible {
  outline:3px solid #da8e19;
  outline-offset:1px;
}
svg {
  width:20px;
  height:20px;
  flex:none;
  vertical-align:middle;
}
#topbar {
  position:sticky;
  top:0;
  z-index:12;
  height:var(--bar);
  display:flex;
  align-items:center;
  gap:8px;
  color:white;
  background:var(--teal);
  border:0;
  box-shadow:0 1px 4px #17384220;
}
#topbar button {
  display:inline-grid;
  place-items:center;
  min-width:44px;
  min-height:44px;
  padding:4px;
  background:transparent;
  color:white;
  border:0;
  position:relative;
}
#topbar button:hover {
  background:#0002;
}
#header-actions {
  margin-left:auto;
  display:flex;
  padding-right:8px;
}
.wordmark {
  padding:0 16px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  flex-shrink:0;
  align-self:stretch;
  background:#117b8a;
  color:white;
  font-weight:700;
  font-size:20px;
  letter-spacing:-.5px;
}
.wordmark small {
  font-size:10px;
  font-weight:500;
  letter-spacing:1.5px;
  text-transform:uppercase;
}
#page-name {
  font-size:18px;
  font-weight:600;
  min-width:0;
  line-height:1.15;
}
#header-actions sup {
  position:absolute;
  right:0;
  top:1px;
  border-radius:16px;
  background:#982f38;
  color:white;
  padding:1px 4px;
  font:700 11px system-ui;
}
body.workspace {
  padding-bottom:0;
}
.workspace .wordmark {
  width:var(--rail);
}
.workspace #navigation.workspace-nav {
  position:fixed;
  display:block;
  inset:var(--bar) auto 0 0;
  width:var(--rail);
  z-index:15;
  background:var(--panel);
  padding:0 0 20px;
  border:0;
  border-right:1px solid var(--line);
  box-shadow:none;
  overflow:auto;
}
.workspace main.wrap,.workspace footer.wrap {
  margin-left:var(--rail);
  margin-right:0;
  padding:12px 16px;
  width:calc(100% - var(--rail));
  max-width:none;
}
.workspace #app {
  min-width:0;
  display:block;
}
.workspace #app>* {
  min-width:0;
  margin-bottom:12px;
}
.profile {
  display:flex;
  align-items:center;
  gap:10px;
  padding:20px 15px;
  border-bottom:1px solid var(--line);
}
.profile small,.signout,.rail-disabled small {
  color:var(--muted);
}
.avatar {
  display:grid;
  place-items:center;
  flex:none;
  width:36px;
  height:36px;
  border-radius:50%;
  background:#daeff1;
  color:#116574;
  font-weight:700;
}
.rail-item,.rail-group summary {
  display:flex;
  align-items:center;
  gap:13px;
  width:100%;
  text-align:left;
  border:0;
  background:transparent;
  color:var(--ink);
  padding:9px 16px;
  border-radius:0;
  min-height:44px;
  font-size:15px;
  font-weight:500;
}
.rail-item svg,.rail-group summary svg {
  color:var(--muted);
}
.rail-item[aria-current],.rail-item[data-parent-active] {
  box-shadow:inset 3px 0 var(--teal);
  background:#178d9e16;
  color:var(--ink);
  font-weight:700;
}
.rail-group {
  border:0;
  border-top:1px solid var(--line);
  border-radius:0;
  padding:0;
}
.rail-group summary {
  list-style:none;
}
.rail-group summary::-webkit-details-marker {
  display:none;
}
.rail-group summary svg:last-child {
  width:14px;
  margin-left:auto;
}
.rail-group[open] summary svg:last-child {
  transform:rotate(180deg);
}
.rail-group button,.rail-disabled {
  margin:0;
  padding-left:48px;
}
.rail-disabled {
  display:flex;
  align-items:center;
  gap:5px;
  color:var(--muted);
  padding-block:9px;
  font-size:14px;
}
.rail-disabled small {
  font-size:10px;
}
.signout {
  display:block;
  margin:18px 16px;
  font-size:13px;
}
.workspace.nav-collapsed #navigation {
  display:none;
}
.workspace.nav-collapsed main.wrap,.workspace.nav-collapsed footer.wrap {
  margin-left:0;
  width:100%;
}
h1,#title {
  font:600 23px/1.25 Roboto,"Segoe UI",Arial,sans-serif;
  margin:0;
}
h2 {
  font-size:17px;
}
.page-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  min-height:41px;
}
.hero {
  padding:0 0 6px;
}
.hero p {
  font-size:14px;
  margin-top:5px;
}
.box {
  padding:13px;
  margin:0 0 12px;
}
.box h2 {
  margin-bottom:10px;
}
.box .fine {
  margin:5px 0;
}
.stat.primary,.queue-filter[aria-pressed=true] {
  background:var(--pine);
  color:white;
}
.metric-grid {
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px;
}
.metric {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 10px;
  border:1px solid var(--line);
  border-top:3px solid var(--teal);
  border-radius:4px;
  background:var(--panel);
  min-width:0;
}
.metric svg {
  width:24px;
  height:24px;
  color:var(--pine);
}
.metric span,.metric-note {
  color:var(--muted);
  font-size:12px;
}
.metric strong {
  display:block;
  font-variant-numeric:tabular-nums;
  font-size:clamp(17px,1.5vw,23px);
  overflow-wrap:anywhere;
}
.metric-note {
  margin-top:-7px;
}
.section-band,.box.band h2 {
  background:var(--wash);
  border-bottom:1px solid var(--line);
  padding:8px 12px;
  letter-spacing:.045em;
  font-size:13px;
  text-transform:uppercase;
}
.box.band h2 {
  margin:-13px -13px 14px;
}
.box.band input,.box.band select {
  font-weight:400;
}
.list-tools,.view-tabs,.detail-tabs,.shortcuts,.detail-actions,.section-actions {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.list-tools {
  padding:9px 0;
}
.list-tools label {
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--muted);
}
.list-tools label:first-child {
  flex:1;
  max-width:420px;
}
.list-tools input,.list-tools select {
  margin:0;
}
.table-scroll {
  max-width:100%;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:3px;
}
.table-scroll table {
  width:100%;
  border-collapse:collapse;
  font-size:14px;
  text-align:left;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.table-scroll :is(td,th) {
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:8px;
}
.table-scroll th,.table-scroll tfoot {
  background:var(--wash);
  font-weight:650;
}
.table-scroll tr:last-child td {
  border-bottom:0;
}
.table-scroll tbody tr:hover {
  background:var(--wash);
}
.table-scroll button {
  margin:0;
}
.empty {
  padding:15px;
  color:var(--muted);
}
.text-link {
  border:0;
  color:var(--pine);
  background:transparent;
  text-decoration:underline;
  text-underline-offset:3px;
  padding:2px 3px;
}
.view-tabs,.detail-tabs {
  border-bottom:1px solid var(--line);
  gap:0;
}
.view-tab {
  border-radius:0;
  border:0;
  border-bottom:3px solid transparent;
  background:transparent;
  color:var(--muted);
  padding:8px 12px;
}
.view-tab[aria-current],.view-tab[aria-pressed=true] {
  border-color:var(--teal);
  color:var(--ink);
  font-weight:700;
}
.detail-tabs label {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:7px;
}
.detail-tabs input {
  width:16px;
  min-height:16px;
  margin:0;
}
.detail-banner {
  display:grid;
  grid-template-columns:minmax(170px,1fr) 3fr;
  border:1px solid var(--line);
}
.identity {
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:7px;
  padding:14px;
  border-right:1px solid var(--line);
}
.avatar.big {
  width:60px;
  height:60px;
  font-size:21px;
}
.identity .loan-state {
  width:100%;
  background:#d8f1f7;
  color:#135865;
  padding:5px;
  margin:0;
}
.detail-banner dl {
  margin:0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  background:var(--wash);
}
.detail-banner dl div {
  padding:10px;
  border-bottom:1px solid var(--line);
}
dt {
  font-size:13px;
  color:var(--muted);
}
dd {
  margin:3px 0 0;
  font-weight:650;
  font-variant-numeric:tabular-nums;
}
.add-action {
  display:inline-flex;
  align-items:center;
  gap:5px;
}
.shortcuts {
  justify-content:flex-end;
}
.shortcuts summary {
  color:var(--pine);
}
.shortcuts details {
  position:relative;
}
.shortcuts details[open] .row-actions {
  margin-top:6px;
}
.subtle-link,.text-link {
  color:#087283;
}
:root[data-theme=dark] :is(.text-link,.subtle-link) {
  color:#70d2df;
}
.receipt,.code {
  background:var(--wash);
}
.workspace .queue-filter {
  min-height:44px;
}
.workspace .due-row {
  background:var(--panel);
}
.detail-actions select {
  width:auto;
  margin:0;
}
.detail-actions label {
  display:flex;
  align-items:center;
  gap:6px;
}
.workspace footer {
  border-top:1px solid var(--line);
  font-size:12px;
}
.workspace #app[data-view=collections] .box {
  margin-bottom:12px;
}
@media(max-width:1220px) {
  .metric-grid {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:940px) {
  .workspace .wordmark {
    width:auto;
  }
  .workspace #navigation.workspace-nav {
    display:none;
  }
  .workspace.drawer-open #navigation.workspace-nav {
    display:block;
  }
  .workspace main.wrap,.workspace footer.wrap {
    margin-left:0;
    width:100%;
    padding:10px;
  }
  .workspace.drawer-open #scrim {
    display:block;
    position:fixed;
    z-index:14;
    inset:var(--bar) 0 0;
    width:100%;
    background:#15252d66;
    border:0;
    border-radius:0;
  }
  .workspace #topbar {
    gap:3px;
  }
  .workspace #menu-toggle {
    order:-1;
  }
  .workspace .wordmark {
    display:none;
  }
  .detail-banner {
    grid-template-columns:165px 1fr;
  }
}
@media(max-width:600px) {
  .metric-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .metric {
    padding:9px 7px;
    gap:7px;
  }
  .metric strong {
    font-size:18px;
  }
  .metric svg {
    width:20px;
  }
  .detail-banner {
    grid-template-columns:1fr;
  }
  .identity {
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .detail-banner dl {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .detail-tabs label {
    padding:0 5px;
  }
  .list-tools {
    align-items:stretch;
  }
  .list-tools label:first-child {
    min-width:100%;
  }
  .page-heading h1 {
    font-size:21px;
  }
  .box {
    padding:10px;
  }
  .box.band h2 {
    margin:-10px -10px 12px;
  }
  .detail-actions label {
    width:100%;
  }
  .detail-actions select {
    flex:1;
    min-width:0;
  }
  .add-action {
    padding:6px 9px;
  }
}
@media print {
  #topbar,#scrim,.view-tabs,.detail-tabs,.workspace #navigation,.detail-actions,.page-heading button,.shortcuts,.print-tools,.section-actions {
    display:none!important;
  }
  .workspace main.wrap {
    margin:0;
    width:100%;
    padding:0;
  }
  .table-scroll {
    overflow:visible;
  }
  .workspace #app>* {
    margin:0 0 8px;
  }
  .workspace #app:has(.receipt)>*:not(.receipt) {
    display:none!important;
  }
  .table-scroll table {
    white-space:normal;
    font-size:10px;
  }
  .table-scroll td,.table-scroll th {
    padding:3px;
  }
  .workspace .text-link {
    color:black;
  }
  .workspace footer {
    display:none;
  }
  body {
    background:white;
  }
}
.workspace main.wrap {
  padding:8px;
}
.home-tools {
  display:flex;
  justify-content:flex-end;
  background:var(--wash);
  border-bottom:1px solid var(--line);
  height:34px;
}
.home-tools button {
  min-height:32px;
  margin:0 8px;
  font-size:13px;
}
.metric-grid {
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.metric {
  position:relative;
  border:1px solid var(--line);
  border-radius:0;
  min-height:98px;
  padding:13px 16px;
  justify-content:space-between;
}
.metric:before {
  content:"";
  position:absolute;
  inset:50% 0 auto;
  height:1px;
  background:var(--line);
}
.metric-icon,.metric>div {
  position:relative;
}
.metric-icon {
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:50%;
  width:46px;
  height:46px;
}
.metric-icon svg {
  color:#bc5055;
}
.metric:nth-child(2) svg {
  color:#b77923;
}
.metric:nth-child(3) svg {
  color:#137b85;
}
.metric:nth-child(4) svg {
  color:#715aaa;
}
.metric>div {
  text-align:right;
}
.metric strong {
  margin-bottom:12px;
  font-weight:500;
  font-size:18px;
}
.metric span {
  font-size:14px;
}
.dashboard-body {
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);
  gap:14px;
}
.dashboard-body>div {
  min-width:0;
}
.cashflow {
  display:flex;
  justify-content:space-around;
  align-items:center;
  gap:8px;
  border:1px solid var(--line);
  padding:12px;
  margin:0 0 10px;
  background:var(--panel);
  text-align:center;
}
.cashflow strong,.cashflow span {
  display:block;
}
.cashflow strong {
  font-weight:500;
}
.cashflow span {
  color:var(--muted);
  font-size:13px;
  margin-top:4px;
}
.cashflow select,#income-year {
  width:auto;
  margin:0;
  min-height:32px;
  padding:4px 6px;
}
.queue-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  border-bottom:1px solid var(--line);
  margin-bottom:8px;
}
.queue-head h2 {
  font-size:16px;
  font-weight:550;
  margin:0;
}
.icon-btn {
  width:38px;
  padding:0;
  color:var(--muted);
  background:transparent;
}
.income-plot {
  width:100%;
  height:auto;
  max-height:245px;
}
.income-plot text {
  fill:currentColor;
  font-size:9px;
}
.legend {
  font-size:12px;
  text-align:center;
  color:var(--muted);
  margin-bottom:9px;
}
.legend i {
  display:inline-block;
  width:10px;
  height:10px;
  margin-left:8px;
  background:#2397aa;
}
.legend i+i {
  background:#cf8d40;
}
#income-chart .queue-head {
  padding-bottom:7px;
}
.shortcuts {
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:4;
}
.shortcuts details {
  border:0;
  padding:0;
}
.shortcuts summary,.workspace .page-heading .add-action {
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  width:50px;
  height:50px;
  background:var(--teal);
  color:white;
  box-shadow:0 2px 6px #16353c44;
  list-style:none;
}
.shortcuts summary::-webkit-details-marker {
  display:none;
}
.shortcuts .row-actions {
  position:absolute;
  right:0;
  bottom:56px;
  width:max-content;
  background:var(--panel);
  border:1px solid var(--line);
  padding:6px;
  border-radius:5px;
}
.workspace .page-heading .add-action {
  position:fixed;
  z-index:4;
  bottom:18px;
  right:18px;
}
.add-action span {
  position:absolute;
  clip-path:inset(50%);
  width:1px;
  height:1px;
  overflow:hidden;
}
.workspace:has(.add-action,.shortcuts) footer {
  padding-bottom:64px;
}
.collection-queue .due-row {
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.collection-queue .due-row button {
  grid-column:1/-1;
  justify-self:start;
}
@media(min-width:1600px) {
  .collection-queue .due-row {
    grid-template-columns:1.3fr repeat(3,1fr);
  }
  .collection-queue .due-row button {
    grid-column:auto;
  }
}
@media(max-width:1100px) {
  .dashboard-body {
    grid-template-columns:1fr;
  }
  .metric-grid {
    gap:6px;
  }
  .metric {
    padding:8px;
  }
}
@media(max-width:640px) {
  .metric-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .metric {
    min-height:75px;
  }
  .metric-icon {
    width:30px;
    height:30px;
  }
  .metric-icon svg {
    width:16px;
  }
  .metric strong {
    font-size:15px;
  }
  .metric span {
    font-size:12px;
  }
  .dashboard-body {
    gap:0;
  }
  .queue-head h2 {
    font-size:15px;
  }
  .icon-btn {
    width:34px;
  }
}

.borrower .borrower-details {
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin-top:14px;
}
.borrower .metric-grid {
  margin:.5rem 0 1rem;
}
.borrower .metric > div {
  min-width:0;
  overflow-wrap:anywhere;
}

.garbell-login{max-width:29rem;margin:clamp(2rem,10vh,6rem) auto;padding:clamp(1.25rem,4vw,2.5rem)}
.garbell-login h1{margin:0;color:var(--ink)}
.garbell-login p{color:var(--muted);margin-bottom:1.5rem}
.garbell-login .subtle{margin-top:1rem}
