/* frontend-src/src/dashboard-cards.css */
.dashboard-metrics {
  margin: 0 0 26px;
  min-width: 0;
}
.metric-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.metric-section-title h2 {
  font-size: 14px;
  margin: 0;
  color: #34445c;
}
.metric-section-title > span {
  font-size: 11px;
  color: #7c899b;
}
.metric-main-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}
.metric-main-grid > .metric-card:nth-child(-n+4) {
  grid-column: span 3;
}
.metric-main-grid > .metric-card:nth-child(n+5) {
  grid-column: span 4;
}
.metric-card {
  --metric-color:#53789f;
  min-width: 0;
  padding: 20px 17px;
  background: #fff;
  border: 1px solid #e1e7ef;
  border-top: 3px solid var(--metric-color);
  border-radius: 12px;
  box-shadow: 0 3px 12px #203c6104;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.metric-label {
  font-size: 13px;
  font-weight: 700;
  color: #46556a;
  display: block;
}
.metric-card > strong {
  font-size: clamp(19px, 1.7vw, 29px);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  color: #24364f;
}
.metric-card .metric-negative {
  color: #c44c59;
}
.metric-rate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #7e8a9b;
}
.metric-rate b {
  font-size: 15px;
  color: var(--metric-color);
  font-variant-numeric: tabular-nums;
}
.metric-card > small {
  font-size: 10px;
  color: #7c899b;
  line-height: 1.6;
}
.metric-sales {
  --metric-color:#3979d6;
}
.metric-cost {
  --metric-color:#d78a29;
}
.metric-gross {
  --metric-color:#319fba;
}
.metric-profit {
  --metric-color:#299375;
}
.metric-flr {
  --metric-color:#8764bc;
  background:
    linear-gradient(
      145deg,
      #fff,
      #f7f3ff);
  border-color: #e3d9f2;
  border-top-color: #8764bc;
}
.metric-labor {
  --metric-color:#4c83d6;
}
.metric-rent {
  --metric-color:#9a74ce;
}
.metric-other {
  --metric-color:#6c7f97;
}
.metric-help {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #8a7ca0;
  margin-top: 5px;
}
.metric-composition {
  height: 7px;
  display: flex;
  gap: 2px;
  overflow: hidden;
  border-radius: 5px;
  background: #e9e3f0;
}
.metric-composition > span {
  min-width: 0;
}
.metric-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  font-size: 9px;
  color: #7a7186;
}
.metric-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.metric-legend i {
  width: 6px;
  height: 6px;
  border-radius: 2px;
}
.metric-subtitle {
  margin-top: 20px;
}
.metric-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.metric-secondary {
  border-top-width: 1px;
  border-left: 3px solid var(--metric-color);
  padding: 16px 18px;
  gap: 9px;
}
.metric-secondary > strong {
  font-size: 23px;
}
.metric-footnote {
  font-size: 10px;
  color: #8290a2;
  margin: 12px 0 0;
  line-height: 1.7;
}
@media (max-width:1300px) {
  .metric-card > strong {
    font-size: 25px;
  }
}
@media (max-width:900px) {
  .metric-main-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-main-grid > .metric-card:nth-child(n) {
    grid-column: span 1;
  }
  .metric-sub-grid {
    grid-template-columns: 1fr;
  }
  .metric-section-title > span {
    font-size: 10px;
  }
  .metric-card > strong {
    font-size: 24px;
  }
}
@media (max-width:480px) {
  .metric-main-grid {
    grid-template-columns: 1fr;
  }
  .metric-flr {
    grid-column: auto;
  }
  .metric-section-title {
    align-items: flex-start;
  }
  .metric-section-title > span {
    max-width: 145px;
    text-align: right;
  }
  .metric-card {
    padding: 17px;
  }
  .metric-card > strong {
    font-size: 27px;
  }
}

/* frontend-src/src/financial-categories.css */
.finance-category-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 17px;
  padding: 12px 20px;
  border-top: 1px solid #eef1f6;
  font-size: 11px;
  color: #66748a;
}
.finance-category-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.finance-category-legend i {
  height: 8px;
  width: 8px;
  border-radius: 2px;
  background: var(--finance-color);
}
.finance-tone-sales {
  --finance-color:#3979d6;
  --finance-bg:#f0f6ff;
}
.finance-tone-cost {
  --finance-color:#e69434;
  --finance-bg:#fff7eb;
}
.finance-tone-labor {
  --finance-color:#4c83d6;
  --finance-bg:#eef5fe;
}
.finance-tone-rent {
  --finance-color:#9a74ce;
  --finance-bg:#f7f1ff;
}
.finance-tone-profit {
  --finance-color:#299375;
  --finance-bg:#edf8f4;
}
.finance-tone-other {
  --finance-color:#6c7f97;
  --finance-bg:#f5f7fa;
}
.pl-annual-view tr[data-finance-tone] td {
  background: var(--finance-bg) !important;
}
.pl-annual-view tr[data-finance-tone] td:first-child {
  border-left: 4px solid var(--finance-color) !important;
  color: var(--finance-color);
}
.pl-annual-view tr[data-finance-tone] td:nth-child(2) {
  color: var(--finance-color);
  font-weight: 650;
}
.pl-annual-view tr.pl-total-row[data-finance-tone] td {
  font-weight: 750;
  border-top: 2px solid var(--finance-color) !important;
}
.pl-annual-view tr[data-finance-tone]:hover td {
  filter: brightness(.98);
}
.flr-breakdown {
  margin-top: 14px;
  padding: 0 18px;
  border: 1px solid #e4d9f1;
  background: #fff;
  border-radius: 12px;
  min-width: 0;
}
.flr-breakdown summary {
  cursor: pointer;
  padding: 16px 0;
  color: #7454a1;
  font-size: 12px;
  font-weight: 650;
}
.flr-breakdown > p {
  font-size: 11px;
  color: #7c899b;
  line-height: 1.7;
}
.flr-detail-scroll {
  overflow-x: auto;
  padding-bottom: 12px;
}
.flr-detail-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
}
.flr-detail-table th,
.flr-detail-table td {
  padding: 12px 14px !important;
  border-bottom: 1px solid #edf0f5;
  text-align: right;
  font-size: 12px;
}
.flr-detail-table th:first-child,
.flr-detail-table td:first-child {
  text-align: left;
}
.flr-detail-table th {
  color: #78859b;
  font-weight: 500;
  background: #faf8fd;
}
.flr-detail-table td:first-child {
  border-left: 4px solid var(--finance-color);
  color: var(--finance-color);
  font-weight: 650;
}
.flr-detail-table tr td {
  background: var(--finance-bg);
}
.flr-detail-table tfoot td {
  font-weight: 750;
  background: #f7f3fc;
}
.flr-part-percent {
  font-variant-numeric: tabular-nums;
}
