/* My Ledger page */
.ml-page h1 { margin-bottom: 1rem; }
.ml-page h2 { font-size: 1rem; font-weight: 600; color: #1e293b; margin: 0 0 0.5rem; }

.ml-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.ml-tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}
.ml-tile-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.ml-tile-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}
.ml-tile-detail { font-size: 0.75rem; color: #475569; }

.ml-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1rem;
}
.ml-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  min-width: 0;
}
.ml-caption { font-size: 0.8rem; color: #64748b; margin: 0 0 0.5rem; }
.ml-chart { position: relative; height: 280px; }
.ml-scroll { max-height: 320px; overflow-y: auto; }

.ml-table { font-variant-numeric: tabular-nums; }
.ml-table th, .ml-table td { white-space: nowrap; }
.ml-table th.ml-num, .ml-table td.ml-num { text-align: right; }
.ml-table td.ml-desc { white-space: normal; min-width: 220px; }
.ml-table tr.ml-total td { font-weight: 700; border-top: 2px solid #cbd5e1; }

.ml-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.ml-filters .form-control { width: auto; min-width: 170px; flex: 0 1 auto; }

.ml-pill {
  display: inline-block;
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  background: #eef2f7;
  color: #475569;
  border: 1px solid transparent;
}
.ml-pill-current { background: #2a78d6; color: #ffffff; }
.ml-pill-paid { background: #eef2f7; color: #475569; }
.ml-pill-awaiting_client { background: #ffffff; border-color: #eb6834; color: #1e293b; }
.ml-pill-payable { background: #ffffff; border-color: #1baf7a; color: #1e293b; }
.ml-pill-not_invoiced { background: #ffffff; border-color: #eda100; color: #1e293b; }

@media (max-width: 900px) {
  .ml-grid { grid-template-columns: minmax(0, 1fr); }
  .ml-filters .form-control { width: 100%; }
}
