.iv-money-appbar {
  position: sticky;
  top: 0;
  z-index: 9000;
  color: #eef6ff;
  background:
    radial-gradient(circle at 78% -80%, rgba(70, 231, 196, .17), transparent 48%),
    rgba(6, 13, 22, .97);
  border-bottom: 1px solid rgba(70, 231, 196, .27);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
}

.iv-money-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 12px 20px 13px;
}

.iv-money-topline {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.iv-money-back,
.iv-money-brand,
.iv-money-link {
  text-decoration: none !important;
}

.iv-money-back {
  justify-self: start;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  color: #dbe7f5 !important;
  background: rgba(15, 27, 42, .94);
  border: 1px solid rgba(148, 163, 184, .31);
  border-radius: 11px;
  font: 800 12px/1.15 Inter, "Segoe UI", system-ui, sans-serif;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.iv-money-back:hover,
.iv-money-back:focus-visible {
  color: #fff !important;
  border-color: rgba(70, 231, 196, .78);
  background: rgba(23, 42, 57, .98);
  transform: translateY(-1px);
  outline: none;
}

.iv-money-back-arrow {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  color: #05211b;
  background: #61e1c5;
  border-radius: 8px;
  font-size: 17px;
}

.iv-money-brand {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit !important;
  white-space: nowrap;
}

.iv-money-wordmark {
  font: 900 20px/1 Inter, "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.035em;
}

.iv-money-wordmark strong { color: #61e1c5; }

.iv-money-product {
  padding: 5px 8px;
  color: #8af4dd;
  background: rgba(70, 231, 196, .09);
  border: 1px solid rgba(70, 231, 196, .35);
  border-radius: 999px;
  font: 800 9px/1 Inter, "Segoe UI", system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.iv-money-context {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.iv-money-context .badge-status,
.iv-money-context .iv-money-status {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 10px;
  color: #8af4dd;
  background: rgba(70, 231, 196, .10);
  border: 1px solid rgba(70, 231, 196, .34);
  border-radius: 999px;
  font: 800 10px/1 Inter, "Segoe UI", system-ui, sans-serif;
}

.iv-money-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  padding: 7px;
  background: rgba(10, 20, 33, .88);
  border: 1px solid rgba(70, 231, 196, .16);
  border-radius: 14px;
}

.iv-money-link {
  min-width: 0;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 7px;
  color: #c4d2e4 !important;
  background: linear-gradient(180deg, rgba(25, 40, 57, .96), rgba(14, 26, 40, .96));
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 9px;
  font: 800 11.5px/1.15 Inter, "Segoe UI", system-ui, sans-serif;
  text-align: center;
  transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease;
}

.iv-money-link:hover,
.iv-money-link:focus-visible {
  color: #fff !important;
  border-color: rgba(70, 231, 196, .7);
  background: linear-gradient(180deg, rgba(31, 54, 65, .98), rgba(17, 36, 48, .98));
  transform: translateY(-1px);
  outline: none;
}

.iv-money-link[aria-current="page"] {
  color: #041712 !important;
  border-color: #70ecd2;
  background: linear-gradient(135deg, #70ecd2, #42d5bb);
  box-shadow: 0 7px 21px rgba(70, 231, 196, .18);
}

.iv-money-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 7px;
  background: rgba(70, 231, 196, .10);
}

.iv-money-link[aria-current="page"] .iv-money-icon { background: rgba(4, 23, 18, .12); }

/* Let wide accounting tables scroll inside their card instead of widening the page. */
.workspace-grid > * { min-width: 0; }
.table-responsive { max-width: 100%; }

@media (max-width: 980px) {
  .iv-money-topline { grid-template-columns: 1fr auto; }
  .iv-money-brand { justify-self: start; grid-column: 1; grid-row: 1; }
  .iv-money-back { justify-self: end; grid-column: 2; grid-row: 1; }
  .iv-money-context { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .iv-money-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .iv-money-appbar { position: relative; }
  .iv-money-shell { padding: 10px 10px 11px; }
  .iv-money-topline { gap: 8px; margin-bottom: 8px; }
  .iv-money-wordmark { font-size: 17px; }
  .iv-money-product { display: none; }
  .iv-money-back { min-height: 38px; padding: 6px 9px; font-size: 10.5px; }
  .iv-money-back-arrow { width: 23px; height: 23px; flex-basis: 23px; }
  .iv-money-context { width: 100%; }
  .iv-money-context .badge-status,
  .iv-money-context .iv-money-status { max-width: 100%; font-size: 9.5px; }
  .iv-money-nav { gap: 5px; padding: 5px; }
  .iv-money-link { min-height: 46px; gap: 4px; padding: 7px 4px; font-size: 10px; }
  .iv-money-icon { width: 19px; height: 19px; flex-basis: 19px; font-size: 11px; }
}

@media (max-width: 370px) {
  .iv-money-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
