body.m5-company-finances-active {
  background: var(--m5-surface,#f5f8fc);
}
body.m5-company-finances-active main {
  min-height: 0;
}
body.m5-company-finances-active #admin {
  padding: 22px 0 8px;
}
body.m5-company-finances-active #admin > .container {
  width: calc(100% - 88px);
  max-width: 1510px;
  margin: 0 auto;
  padding: 0;
}
body.m5-company-finances-active #admin > .container > .section-head,
body.m5-company-finances-active .m5-admin > .m5-admin-stats,
body.m5-company-finances-active .m5-admin-tabs {
  display: none;
}
body.m5-company-finances-active #adminTabContent {
  background: transparent;
  border: 0;
  padding: 0;
  overflow: visible;
}
#m5CompanyFinances {
  color: var(--m5-foreground,#101349);
  font-size: 12px;
  line-height: 1.4;
}
#m5CompanyFinances *,
.m5-cf-detail * {
  box-sizing: border-box;
}
#m5CompanyFinances h2,
#m5CompanyFinances h3 {
  margin: 0;
  color: var(--m5-foreground,#0d1247);
}
#m5CompanyFinances p {
  margin: 0;
}
#m5CompanyFinances h2 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.7px;
}
#m5CompanyFinances h3 {
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}
#m5CompanyFinances small {
  display: block;
  color: var(--m5-foreground-muted,#727fb3);
  font-size: 10px;
  line-height: 1.35;
}
#m5CompanyFinances button,
#m5CompanyFinances select,
#m5CompanyFinances input {
  font: inherit;
}
#m5CompanyFinances button {
  cursor: pointer;
}
#m5CompanyFinances button:focus-visible,
#m5CompanyFinances select:focus-visible,
#m5CompanyFinances input:focus-visible,
#m5CompanyFinances circle:focus-visible,
#m5CompanyFinances [tabindex]:focus-visible {
  outline: 2px solid #7842ff;
  outline-offset: 3px;
}
#m5CompanyFinances svg,
.m5-cf-detail svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.m5-cf-heading {
  display: flex;
  gap: 25px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.m5-cf-heading > div:first-child {
  min-width: 0;
}
#m5CompanyFinances .m5-cf-heading p {
  font-size: 15px;
  color: var(--m5-foreground-muted,#6c79ad);
  margin-top: 3px;
}
.m5-cf-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--m5-surface-purple,#e9efff);
  border-radius: 12px;
  padding: 17px 20px;
  max-width: 610px;
  flex: 0 1 43%;
  font-size: 12px;
}
#m5CompanyFinances .m5-cf-notice b {
  font-weight: 600;
}
#m5CompanyFinances .m5-cf-notice svg {
  color: var(--m5-foreground-muted,#0657ff);
  width: 26px;
  height: 26px;
}
#m5CompanyFinances .m5-cf-notice small {
  margin-top: 4px;
}
.m5-cf-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
.m5-cf-metric {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: var(--m5-surface,#fff);
  border: 1px solid var(--m5-border,#eef1f7);
  border-radius: 12px;
  padding: 14px 12px;
  min-width: 0;
}
.m5-cf-metric > div {
  min-width: 0;
  flex: 1;
}
.m5-cf-metric > div > span {
  font-size: 11px;
}
.m5-cf-metric-value {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 4px 0;
}
.m5-cf-metric-value b {
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  white-space: nowrap;
}
.m5-cf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  flex-shrink: 0;
}
.m5-cf-icon.purple {
  background: var(--m5-surface-purple,#f1eaff);
  color: var(--m5-foreground-muted,#7b35ff);
}
.m5-cf-icon.green {
  background: var(--m5-surface-green,#dcfce8);
  color: var(--m5-foreground,#00ad54);
}
.m5-cf-icon.orange {
  background: var(--m5-surface,#fff0d8);
  color: var(--m5-foreground-muted,#ff8906);
}
.m5-cf-icon.pink {
  background: var(--m5-surface,#ffe6ec);
  color: var(--m5-foreground-muted,#ff365f);
}
.m5-cf-icon.blue {
  background: var(--m5-surface-purple,#e3ecff);
  color: var(--m5-foreground-muted,#165cff);
}
.m5-cf-metric > .m5-cf-icon {
  width: 51px;
  height: 51px;
  border-radius: 13px;
}
#m5CompanyFinances .m5-cf-metric > .m5-cf-icon svg {
  width: 29px;
  height: 29px;
}
.m5-cf-change {
  display: inline-block;
  background: var(--m5-surface-green,#e3faee);
  color: var(--m5-foreground,#00a95c);
  border-radius: 5px;
  padding: 3px 6px;
  white-space: nowrap;
  font-size: 10px;
}
.m5-cf-change.bad {
  background: var(--m5-surface,#fff0f3);
  color: var(--m5-foreground-muted,#ed375b);
}
.m5-cf-change.neutral {
  background: var(--m5-surface,#f1f3f8);
  color: var(--m5-foreground-muted,#8390b7);
}
.m5-cf-grid-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 12px;
  align-items: stretch;
}
.m5-cf-panel {
  background: var(--m5-surface,#fff);
  border: 1px solid var(--m5-border,#edf0f6);
  border-radius: 11px;
  padding: 14px;
  min-width: 0;
}
.m5-cf-panel-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}
.m5-cf-section-title {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}
#m5CompanyFinances .m5-cf-section-title p {
  margin-top: 2px;
  color: var(--m5-foreground-muted,#7783b5);
  font-size: 11px;
}
.m5-cf-section-title > div {
  min-width: 0;
}
.m5-cf-periods {
  display: flex;
  padding: 2px;
  border: 1px solid var(--m5-border,#edf0f6);
  background: var(--m5-surface,#f7f8fc);
  border-radius: 8px;
  flex-shrink: 0;
}
.m5-cf-periods button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 7px 10px;
  color: var(--m5-foreground,#44517e);
  font-size: 10px !important;
  white-space: nowrap;
}
.m5-cf-periods [aria-pressed="true"] {
  background: #7436ff;
  color: #fff;
}
#m5CompanyChart {
  margin-top: 12px;
}
#m5CompanyChart > svg {
  width: 100%;
  height: auto;
  stroke-width: 1;
  overflow: visible;
}
.m5-cf-grid line {
  stroke: #eaf0f8;
}
.m5-cf-grid text {
  stroke: none;
  fill: #6d7aaa;
  font-size: 11px;
}
.m5-cf-line {
  stroke: #7b32ff;
  stroke-width: 2 !important;
  fill: none;
}
.m5-cf-area {
  stroke: none;
}
.m5-cf-point {
  fill: #7b32ff;
  stroke: #fff;
  stroke-width: 1.5 !important;
}
#m5CompanyFinances .m5-cf-chart-note {
  text-align: center;
  font-size: 10px;
  color: var(--m5-foreground-muted,#8690b1);
  margin-top: 5px;
}
#m5CompanyPaymentPeriod {
  margin: 8px 0 12px 44px;
}
#m5CompanyDonut {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0 8px;
}
.m5-cf-donut {
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.m5-cf-donut > div {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: var(--m5-surface,#fff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7px;
}
.m5-cf-donut b {
  font-size: 25px;
  line-height: 1.1;
}
.m5-cf-donut span {
  font-size: 12px;
  max-width: 70px;
}
.m5-cf-legend {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 17px;
}
.m5-cf-legend > div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 5px;
  align-items: center;
  font-size: 11px;
}
.m5-cf-legend > div > span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.m5-cf-legend > div > span > i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.m5-cf-progress {
  grid-column: 1/-1;
  background: var(--m5-surface-blue,#edf0f6);
  border-radius: 8px;
  height: 8px;
  margin-left: 21px;
  overflow: hidden;
}
.m5-cf-progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.m5-cf-aside {
  grid-column: 3;
  grid-row: 1/3;
  display: grid;
  align-content: start;
  gap: 12px;
}
.m5-cf-month {
  margin-top: 12px;
  border: 1px solid var(--m5-border,#eef1f7);
  border-radius: 8px;
  overflow: hidden;
}
.m5-cf-month > div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 9px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid var(--m5-border,#f1f3f8);
  font-size: 11px;
}
.m5-cf-month > div:last-child {
  border: 0;
}
.m5-cf-month > div > span:first-child {
  color: var(--m5-foreground-muted,#52618f);
}
.m5-cf-alerts {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}
.m5-cf-alerts > button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--m5-border,#edf0f6);
  background: var(--m5-surface,#fff);
  border-radius: 8px;
  text-align: left;
  color: var(--m5-foreground,#111746);
}
.m5-cf-alerts > button:hover {
  border-color: var(--m5-border,#cfc0ff);
  background: var(--m5-surface,#fdfbff);
}
.m5-cf-alerts > button > span:not(.m5-cf-icon) {
  flex: 1;
  min-width: 0;
}
.m5-cf-alerts b {
  font-size: 11px;
}
.m5-cf-alerts > button > i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.m5-cf-alerts i.pink {
  background: #fa4679;
}
.m5-cf-alerts i.orange {
  background: #ff9a3d;
}
#m5CompanyFinances .m5-cf-alerts > button > svg {
  width: 15px;
  height: 15px;
  color: var(--m5-foreground-muted,#6375a6);
}
#m5CompanyFinances .m5-cf-footnote {
  color: var(--m5-foreground-muted,#7b86ad);
  font-size: 10px;
  margin-top: 12px;
}
.m5-cf-history {
  grid-column: 1/3;
  grid-row: 2;
  padding: 0;
  overflow: hidden;
}
.m5-cf-history > .m5-cf-panel-heading {
  padding: 12px 14px 8px;
  align-items: center;
  flex-wrap: wrap;
}
.m5-cf-tools {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}
.m5-cf-tools button,
.m5-cf-tools select,
.m5-cf-dates {
  border: 1px solid var(--m5-border,#e5e9f4);
  color: var(--m5-foreground,#384b7a);
  background: var(--m5-surface,#fff);
  border-radius: 7px;
}
.m5-cf-tools button,
.m5-cf-tools select {
  min-height: 34px;
  padding: 7px 11px;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px !important;
}
#m5CompanyFinances .m5-cf-tools svg {
  width: 16px;
  height: 16px;
}
.m5-cf-tools select {
  width: 145px;
}
.m5-cf-tools [data-company-export] {
  background: var(--m5-surface,#fcfaff);
  border-color: var(--m5-border,#b397ff);
  color: var(--m5-foreground-muted,#702eff);
}
.m5-cf-dates {
  display: flex;
  padding: 3px 7px;
  gap: 7px;
  align-items: center;
}
.m5-cf-dates label {
  display: flex;
  gap: 3px;
  align-items: center;
  font-size: 9px;
  color: var(--m5-foreground-muted,#6e7ba6);
  margin: 0;
}
.m5-cf-dates input {
  color: var(--m5-foreground,#3d4e82);
  border: 0;
  background: transparent;
  padding: 2px;
  width: 108px;
  font-size: 10px !important;
}
.m5-cf-history-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px 7px;
  font-size: 10px;
  color: var(--m5-foreground-muted,#8090b8);
}
.m5-cf-history-status button {
  background: transparent;
  border: 0;
  color: var(--m5-foreground-muted,#702eff);
  font-size: 10px;
}
.m5-cf-table-scroll {
  width: 100%;
  overflow-x: auto;
}
#m5CompanyFinances table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  min-width: 870px;
  table-layout: fixed;
}
#m5CompanyFinances th {
  font-weight: 600;
  background: var(--m5-surface,#f5f8fc);
  color: var(--m5-foreground-muted,#52608b);
  padding: 9px 10px;
  text-align: left;
}
#m5CompanyFinances td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--m5-border,#f0f3f8);
  vertical-align: middle;
  overflow-wrap: anywhere;
}
#m5CompanyFinances th:nth-child(1) {
  width: 9%;
}
#m5CompanyFinances th:nth-child(2) {
  width: 19%;
}
#m5CompanyFinances th:nth-child(3) {
  width: 14%;
}
#m5CompanyFinances th:nth-child(4) {
  width: 12%;
}
#m5CompanyFinances th:nth-child(n + 5) {
  width: 10%;
  text-align: right;
}
#m5CompanyFinances th:last-child {
  width: 6%;
}
#m5CompanyFinances td:nth-child(n + 5) {
  text-align: right;
}
#m5CompanyFinances td small {
  margin-top: 2px;
}
#m5CompanyFinances td button {
  border: 0;
  background: transparent;
  padding: 5px;
  color: var(--m5-foreground-muted,#6473a0);
}
.m5-cf-user {
  display: flex;
  gap: 7px;
  align-items: center;
}
.m5-cf-user img,
.m5-cf-avatar {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}
.m5-cf-avatar {
  display: inline-grid;
  place-items: center;
  background: var(--m5-surface-purple,#e9e1ff);
  color: var(--m5-foreground-muted,#6d36d0);
  font-weight: 700;
}
.m5-cf-status {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 15px;
  font-size: 9px;
  background: var(--m5-surface-green,#e4f9ed);
  color: var(--m5-foreground,#059955);
}
.m5-cf-status.waiting {
  color: var(--m5-foreground-muted,#dc7500);
  background: var(--m5-surface,#fff3dd);
}
.m5-cf-status.bad {
  color: var(--m5-foreground-muted,#ed375e);
  background: var(--m5-surface,#ffedf2);
}
.m5-cf-negative {
  color: var(--m5-foreground-muted,#f43e65);
}
#m5CompanyFinances .m5-cf-empty {
  text-align: center;
  color: var(--m5-foreground-muted,#7f8bae);
  padding: 15px;
  font-size: 11px;
}
.m5-cf-history-end {
  text-align: center;
}
.m5-cf-history-end button,
.m5-cf-bottom button {
  border: 1px solid var(--m5-border,#e5e9f4);
  background: var(--m5-surface,#fff);
  color: var(--m5-foreground-muted,#6c32de);
  padding: 7px 12px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
#m5CompanyFinances .m5-cf-history-end svg,
#m5CompanyFinances .m5-cf-bottom svg {
  width: 16px;
  height: 16px;
}
.m5-cf-history-end button {
  margin: 9px;
}
.m5-cf-bottom {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
}
#m5CompanyFinances .m5-cf-bottom p {
  color: var(--m5-foreground-muted,#8390b5);
  font-size: 10px;
  max-width: 80%;
}
#m5CompanyFinances [hidden] {
  display: none !important;
}
.m5-cf-detail {
  color: var(--m5-foreground,#101349);
}
.m5-cf-detail dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
}
.m5-cf-detail dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}
.m5-cf-detail p {
  color: var(--m5-foreground-muted,#7180aa);
  font-size: 12px;
}
.m5-cf-detail button {
  border: 0;
  background: #7536ff;
  color: #fff;
  padding: 10px 15px;
  border-radius: 9px;
  display: flex;
  gap: 8px;
  align-items: center;
}
@media (min-width: 1681px) {
  body.m5-company-finances-active #admin,
  body.m5-company-finances-active header,
  body.m5-company-finances-active footer {
    zoom: var(--m5-home-scale, 1);
  }
}
@media (max-width: 1450px) {
  .m5-cf-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .m5-cf-grid-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  }
  .m5-cf-aside {
    grid-column: 1/-1;
    grid-row: 3;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .m5-cf-history {
    grid-column: 1/-1;
  }
}
@media (max-width: 1000px) {
  body.m5-company-finances-active #admin > .container {
    width: calc(100% - 32px);
  }
  .m5-cf-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .m5-cf-notice {
    flex: auto;
    max-width: none;
    width: 100%;
  }
  .m5-cf-panel-heading {
    flex-wrap: wrap;
  }
  .m5-cf-aside {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  #m5CompanyFinances h2 {
    font-size: 25px;
  }
  #m5CompanyFinances .m5-cf-heading p {
    font-size: 13px;
  }
  .m5-cf-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .m5-cf-metric {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }
  .m5-cf-metric > .m5-cf-icon {
    width: 35px;
    height: 35px;
  }
  #m5CompanyFinances .m5-cf-metric > .m5-cf-icon svg {
    width: 22px;
    height: 22px;
  }
  .m5-cf-metric-value b {
    font-size: 20px;
  }
  .m5-cf-grid-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .m5-cf-revenue,
  .m5-cf-payments,
  .m5-cf-history,
  .m5-cf-aside {
    grid-column: 1;
    grid-row: auto;
  }
  .m5-cf-history {
    order: 4;
  }
  .m5-cf-aside {
    order: 3;
  }
  .m5-cf-panel {
    padding: 12px;
  }
  .m5-cf-history {
    padding: 0;
  }
  .m5-cf-periods {
    width: 100%;
    justify-content: space-between;
  }
  .m5-cf-periods button {
    flex: 1;
  }
  .m5-cf-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  #m5CompanyFinances .m5-cf-bottom p {
    max-width: none;
  }
  #m5CompanyDonut {
    gap: 12px;
  }
  .m5-cf-tools {
    width: 100%;
  }
  .m5-cf-tools select {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  #m5CompanyFinances * {
    scroll-behavior: auto !important;
  }
}

/* The axis and point tooltips already provide amounts and units. */
#m5CompanyFinances .m5-cf-chart-note {
  display: none;
}
