:root {
  --navy: #102a43;
  --blue: #1976d2;
  --bg: #f3f6f9;
  --danger: #b42318;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  font:
    15px system-ui,
    sans-serif;
  color: #243b53;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 5%;
  background: var(--navy);
  color: white;
}
.brand {
  color: white;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
}
.brand small {
  font-weight: 400;
}
nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
nav a {
  color: #d9e2ec;
  text-decoration: none;
}
.logout-form {
  margin: 0;
}
.logout-form button {
  background: none;
  color: #d9e2ec;
  padding: 0;
  font: inherit;
}
.logout-form button:hover {
  text-decoration: underline;
}
main {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.cards > div,
.card {
  background: white;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 2px 8px #102a4312;
}
.cards strong {
  display: block;
  font-size: 21px;
  margin-top: 8px;
  color: var(--navy);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}
td,
th {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #d9e2ec;
}
th {
  background: #eaf2fb;
}
.form {
  max-width: 680px;
}
.form p {
  display: grid;
  gap: 5px;
}
input,
select,
textarea {
  padding: 9px;
  border: 1px solid #9fb3c8;
  border-radius: 5px;
  font: inherit;
}
.search-select {
  position: relative;
}
.search-select-native {
  display: none;
}
.search-select-results {
  display: none;
  position: absolute;
  z-index: 10;
  width: 100%;
  max-height: 210px;
  overflow: auto;
  background: white;
  border: 1px solid #9fb3c8;
  border-radius: 5px;
}
.search-select-results.open {
  display: block;
}
.search-select-results button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: white;
  color: #243b53;
  text-align: left;
  padding: 8px;
}
.search-select-results button:hover {
  background: #eaf2fb;
}
button,
.button {
  background: var(--blue);
  color: white;
  border: 0;
  border-radius: 5px;
  padding: 10px 16px;
  text-decoration: none;
  cursor: pointer;
}
.message {
  background: #d1fae5;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.login {
  max-width: 430px;
  margin: 70px auto;
}
.muted {
  color: #627d98;
}
.report-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.report-heading h1 {
  margin-bottom: 4px;
}
.report-heading p {
  margin-top: 0;
}
.report-filter {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin: 20px 0 10px;
}
.report-filter > div {
  display: grid;
  gap: 5px;
}
.filter-actions {
  display: flex !important;
  align-items: center;
  gap: 12px;
}
.filter-actions a {
  color: var(--blue);
  text-decoration: none;
}
.report-summary {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.report-summary span {
  font-size: 13px;
  color: #627d98;
}
.report-section {
  margin-top: 30px;
}
.report-section h2 {
  color: var(--navy);
  margin-bottom: 10px;
}
.report-section table {
  box-shadow: 0 2px 8px #102a4312;
}
.report-section td:last-child,
.report-section th:last-child {
  white-space: nowrap;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-pending {
  background: #fef3c7;
  color: #92400e;
}
.badge-partial {
  background: #bfdbfe;
  color: #1e40af;
}
.badge-paid {
  background: #d1fae5;
  color: #065f46;
}
.badge-overdue {
  background: #fee2e2;
  color: #991b1b;
}
.badge-missed {
  background: #fecaca;
  color: #7c2d12;
}
.badge-cancelled {
  background: #e5e7eb;
  color: #374151;
}
@media (max-width: 700px) {
  header {
    align-items: flex-start;
    flex-direction: column;
  }
  main {
    margin-top: 20px;
  }
  table {
    font-size: 13px;
    display: block;
    overflow: auto;
  }
  .report-heading {
    flex-direction: column;
  }
  .report-filter {
    align-items: stretch;
  }
  .filter-actions {
    align-items: center !important;
  }
}
