.ro-money {
  max-width: 1100px;
}
.ro-money [hidden],
.ro-money-dialog [hidden] {
  display: none !important;
}
.ro-money-head,
.ro-money-controls,
.ro-money-actions,
.ro-money-dates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ro-money h1 {
  font:
    900 clamp(36px, 5vw, 62px)/1 Archivo,
    system-ui,
    sans-serif;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  margin: 0;
}
.ro-money-head p,
.ro-money-entries p,
.ro-money-card > p,
.ro-money-dialog p {
  color: var(--muted);
  margin: 6px 0 12px;
}
.ro-money-primary {
  background: var(--accent);
  color: #0a1b1e;
  font-weight: 750;
  border: none;
  min-height: 44px;
}
.ro-money-controls {
  justify-content: flex-start;
  margin-top: 24px;
}
.ro-money-segment {
  display: inline-flex;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  gap: 2px;
}
.ro-money-segment legend {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.ro-money-segment button {
  min-height: 38px;
  background: transparent;
  border: 0;
  padding: 0.45rem 0.85rem;
  color: var(--muted);
}
.ro-money-segment button[aria-pressed='true'] {
  background: var(--raised);
  color: var(--text);
  font-weight: 700;
}
.ro-money-dates {
  gap: 6px;
  align-items: flex-end;
}
.ro-money-dates > button {
  font-size: 1.35rem;
  width: 40px;
  height: 42px;
  padding: 0;
}
.ro-money label,
.ro-money-dialog label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}
.ro-money input,
.ro-money select,
.ro-money-dialog input,
.ro-money-dialog select,
.ro-money-dialog textarea {
  min-width: 0;
  color: var(--text);
  min-height: 40px;
  padding: 6px 9px;
}
.ro-money-dates input[type='number'] {
  width: 88px;
}
.ro-money-period {
  font-size: 1.3rem;
  margin: 28px 0 10px;
}
.ro-money-summary {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: clamp(16px, 2.3vw, 28px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
}
.ro-money-summary p {
  margin: 18px 0 2px;
}
.ro-money-total {
  font:
    780 clamp(31px, 5vw, 56px)/1.1 Archivo,
    system-ui,
    sans-serif;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  color: var(--accent);
}
.ro-money-total.ro-negative {
  color: var(--bad);
}
.ro-money-totals-note {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 230px;
}
.ro-money-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr);
  gap: 15px;
  margin: 15px 0;
}
.ro-money-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px 17px;
  background: var(--panel);
}
.ro-money-card h3 {
  font:
    680 1.08rem Archivo,
    system-ui,
    sans-serif;
  margin: 0 0 9px;
}
.ro-money-card h3:not(:first-child) {
  margin: 22px 0 8px;
}
.ro-money-line,
.ro-money-record,
.ro-money-detail button {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 44px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
}
.ro-money-line i {
  font:
    normal 0.9rem Inter,
    sans-serif;
  color: var(--accent);
}
.ro-money-line b,
.ro-money-record b {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ro-money-subtotal .ro-money-line {
  font-weight: 750;
}
.ro-money-detail {
  padding: 8px 12px;
  background: var(--raised);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
}
.ro-money-detail p {
  margin: 6px 0;
}
.ro-money a {
  color: var(--accent);
  display: inline-block;
  padding-block: 9px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ro-money-coverage .ro-money-warning {
  border-left: 2px solid var(--warn);
  padding-left: 9px;
  color: var(--warn);
}
.ro-money-record {
  align-items: center;
}
.ro-money-record span:last-child {
  text-align: right;
}
.ro-money-record small {
  display: block;
  color: var(--muted);
  font-size: 0.82em;
}
.ro-money-status:empty {
  display: none;
}
.ro-money-dialog {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 14px;
  width: min(470px, 94vw);
  max-height: 88svh;
  padding: 18px;
}
.ro-money-dialog::backdrop {
  background: #000b;
}
.ro-money-dialog form {
  display: grid;
  gap: 12px;
}
.ro-money-dialog h2 {
  margin: 0;
}
.ro-money-fieldpair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ro-money-dialog fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
}
.ro-money-dialog [role='alert'] {
  color: var(--bad);
}
.ro-money-dialog p {
  font-size: 0.88rem;
}
.ro-money-dialog p:empty {
  display: none;
}
.ro-money-actions {
  justify-content: flex-start;
}
@media (max-width: 700px) {
  .ro-money-columns {
    grid-template-columns: 1fr;
  }
  .ro-money-summary {
    display: block;
  }
  .ro-money-totals-note {
    margin-top: 13px;
    max-width: none;
  }
  .ro-money-controls {
    gap: 9px;
  }
  .ro-money-entries .ro-money-head {
    align-items: flex-end;
  }
}
@media (max-width: 360px) {
  .ro-money-dates,
  .ro-money-fieldpair {
    gap: 4px;
  }
  .ro-money-fieldpair {
    grid-template-columns: 1fr;
  }
  .ro-money-record {
    flex-wrap: wrap;
  }
}
.ro-money-detail .ro-money-source {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 9px 0;
  width: 100%;
  text-align: left;
}
.ro-money-source span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ro-money-source small {
  display: block;
  color: var(--muted);
}
.ro-money-source b {
  white-space: nowrap;
}
