/* Visual refinements loaded after the base stylesheet. */
a { color: inherit; }
header {
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 3px 14px rgba(16,38,61,.15);
}
.top { max-width: 1240px; min-height: 68px; gap: 30px; }
.brand,
.brand:visited { color: #fff; font-weight: 800; white-space: nowrap; }
.nav { align-items: center; gap: 5px; }
.nav a,
.nav a:visited { color: #eaf1f7; padding: 10px 13px; font-weight: 650; }
.nav a:hover,
.nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.container { max-width: 1240px; padding-top: 30px; }
.page-head { align-items: center; margin-bottom: 24px; }
.grid { gap: 18px; }
.card { box-shadow: 0 4px 16px rgba(23,54,83,.06); }
.stat { min-height: 112px; display: flex; flex-direction: column; justify-content: center; }
.alerts { margin: 20px 0; }
@media (max-width: 900px) {
  .nav { align-items: stretch; }
  .nav a { padding: 12px 14px; }
}

/* Monthly entry tables: align headings with the embedded edit form. */
.table-wrap:has(.inline-form) table > tbody > tr:first-child {
  display: grid;
  grid-template-columns: 18% 10% 10% 10% minmax(220px, 1fr) 96px;
}
.table-wrap:has(.inline-form) table > tbody > tr:first-child th {
  display: flex;
  align-items: center;
}
.table-wrap:has(.inline-form) table > tbody > tr:first-child th:last-child {
  justify-content: center;
}
.table-wrap:has(.inline-form) .inline-form {
  grid-template-columns: minmax(110px, .8fr) minmax(110px, .8fr) minmax(150px, .85fr) minmax(220px, 3fr) auto;
}
.table-wrap:has(.inline-form) .inline-form > label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .table-wrap:has(.inline-form) table > tbody > tr:first-child {
    display: table-row;
  }
  .table-wrap:has(.inline-form) .inline-form {
    grid-template-columns: 120px 120px 150px minmax(220px, 1fr) auto;
  }
}
