* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, sans-serif;
  background: #f4f6f9;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

body.page {
  display: block;
  padding: 0;
}

.card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.subtitle {
  margin: 0 0 1.5rem;
  color: #666;
  font-size: 0.95rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  background: #2a9d8f;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #238b7e;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error {
  color: #c0392b;
  font-size: 0.9rem;
  margin-top: 0.75rem;
  min-height: 1.25rem;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-bar label {
  margin: 0;
  font-size: 0.85rem;
}

.filter-bar select {
  width: auto;
  min-width: 140px;
  margin: 0;
  padding: 0.45rem 0.6rem;
}

.filter-bar input[type='date'] {
  width: auto;
  margin: 0;
  padding: 0.45rem 0.6rem;
}

.badge-finance {
  background: #eef2ff;
  color: #4338ca;
}

.line-items-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 0.5rem;
}

.line-items-header h3 {
  margin: 0;
  font-size: 1rem;
}

.line-item {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #e5e7eb;
}

.line-grid {
  align-items: end;
}

.line-remove-wrap .btn-row {
  width: 100%;
}

.hint {
  font-size: 0.8rem;
  color: #888;
  margin: 0.35rem 0 0;
}

.inner-table {
  box-shadow: none;
  margin-bottom: 1rem;
}

.reports-main {
  max-width: 1100px;
}

.report-note {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: #f0faf8;
  border-radius: 8px;
  border: 1px solid #b8e6df;
}

.empty-state {
  text-align: center;
  color: #888;
  padding: 3rem 1rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
}

.stat-sub {
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.25rem;
}

.report-columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 800px) {
  .report-columns {
    grid-template-columns: 1fr;
  }
}

.report-panel {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.report-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.breakdown-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #444;
  line-height: 1.8;
}

.bar-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 80px;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.bar-label {
  color: #555;
}

.bar-track {
  background: #eef2f5;
  border-radius: 4px;
  height: 10px;
  overflow: hidden;
}

.bar-fill {
  background: #2a9d8f;
  height: 100%;
  border-radius: 4px;
  min-width: 2px;
}

.bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dashboard.card {
  max-width: 520px;
}

.user-box {
  background: #f0faf8;
  border: 1px solid #b8e6df;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0 1.5rem;
}

.user-box p {
  margin: 0.35rem 0;
}

.links {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.links li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
  color: #444;
}

.logout {
  background: #fff;
  color: #c0392b;
  border: 1px solid #e0b4b4;
}

.logout:hover {
  background: #fdf2f2;
}

.module-link {
  color: #2a9d8f;
  font-weight: 600;
  text-decoration: none;
}

.module-link:hover {
  text-decoration: underline;
}

.muted {
  color: #999;
}

/* —— Coaches / list pages —— */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.back-link {
  color: #2a9d8f;
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.btn-text {
  width: auto;
  padding: 0.4rem 0.75rem;
  background: transparent;
  color: #c0392b;
  border: 1px solid #e0b4b4;
  font-size: 0.9rem;
}

.page-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.toolbar h1 {
  margin: 0;
}

.btn-primary {
  background: #2a9d8f;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}

.btn-auto {
  width: auto;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.flash {
  min-height: 1.25rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.flash.success {
  color: #1e7e34;
}

.flash.error {
  color: #c0392b;
}

.hidden {
  display: none !important;
}

.form-panel {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.form-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0 1rem;
}

.field {
  margin-bottom: 0.75rem;
}

.field label {
  margin-bottom: 0.25rem;
}

.field input,
.field select,
.field textarea {
  margin-bottom: 0;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.table-wrap {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.data-table th {
  background: #f8fafb;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

.data-table tr:hover td {
  background: #fafcfc;
}

.data-table .empty {
  text-align: center;
  color: #888;
  padding: 2rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #e8f5f3;
  color: #2a6b63;
  font-size: 0.8rem;
  text-transform: capitalize;
}

.actions-cell {
  white-space: nowrap;
}

.btn-row {
  width: auto;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  margin-right: 0.25rem;
}

.btn-edit {
  background: #fff;
  color: #2a9d8f;
  border-color: #2a9d8f;
}

.btn-edit:hover {
  background: #e8f5f3;
}

.btn-delete {
  background: #fff;
  color: #c0392b;
  border-color: #e0b4b4;
}

.btn-delete:hover {
  background: #fdf2f2;
}

.uuid-cell {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: #555;
  max-width: 280px;
  word-break: break-all;
}
