:root {
  --bears-navy: #1f2a44;
  --bears-navy-dark: #17203a;
  --bears-amber: #f5a623;
  --bears-amber-soft: #fdf3e0;
  --bears-bg: #f6f7fb;
}

body {
  background: var(--bears-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-wrap { flex: 1; max-width: 1200px; margin: 0 auto; width: 100%; }

.bears-nav {
  background: var(--bears-navy);
  border-bottom: 3px solid var(--bears-amber);
}
.bears-nav .navbar-brand { font-weight: 700; letter-spacing: .3px; }
.bears-nav .nav-link.active { color: var(--bears-amber); font-weight: 600; }
.brand-bear { font-size: 1.3rem; }

.card { border: none; box-shadow: 0 1px 3px rgba(31, 42, 68, .1); border-radius: .75rem; }
.card-header { background: #fff; border-bottom: 1px solid #eef0f4; font-weight: 600; border-radius: .75rem .75rem 0 0 !important; }

.btn-bears {
  background: var(--bears-amber);
  border-color: var(--bears-amber);
  color: var(--bears-navy-dark);
  font-weight: 600;
}
.btn-bears:hover { background: #e0961a; border-color: #e0961a; color: var(--bears-navy-dark); }

.amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amt-credit { color: #1a7f37; }
.balance-due { color: #b42318; }
.balance-credit { color: #1a7f37; }

/* Dashboard tiles */
.tile {
  display: block;
  text-decoration: none;
  color: var(--bears-navy);
  background: #fff;
  border-radius: .75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(31, 42, 68, .1);
  border-left: 4px solid var(--bears-amber);
  transition: transform .1s ease, box-shadow .1s ease;
  height: 100%;
}
.tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(31, 42, 68, .15); color: var(--bears-navy); }
.tile h5 { margin: 0 0 .25rem; font-weight: 700; }
.tile p { margin: 0; color: #6b7280; font-size: .875rem; }

.stat-card { background: var(--bears-navy); color: #fff; border-radius: .75rem; padding: 1rem 1.25rem; }
.stat-card .stat-value { font-size: clamp(1.05rem, 4vw, 1.5rem); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-card .stat-label { font-size: .8rem; opacity: .75; text-transform: uppercase; letter-spacing: .5px; }

/* Tables */
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .4px; color: #6b7280; border-bottom-width: 2px; }
.table-hover tbody tr { cursor: pointer; }

/* Login */
.login-page { background: var(--bears-navy); }
.login-card { max-width: 400px; width: 100%; }
.login-logo { font-size: 3rem; }

/* On-screen "paper" reports (fees list, outstanding amounts) */
.report-sheet {
  background: #fff;
  max-width: 210mm;
  margin: 0 auto;
  padding: 12mm 10mm;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  font-family: Georgia, 'Times New Roman', serif;
}
.report-head { display: flex; justify-content: space-between; align-items: flex-end;
  border-bottom: 4px double #333; padding-bottom: .4rem; margin-bottom: .8rem; }
.report-head h1 { font-size: 1.6rem; font-style: italic; font-weight: 700; margin: 0; line-height: 1.15; }
.report-date { color: #555; font-size: .85rem; }
.report-table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.report-table th { text-align: left; font-style: italic; border-bottom: 3px double #333;
  padding: 4px 6px; font-size: .95rem; }
.report-table td { padding: 4px 6px; font-size: .95rem; border-bottom: 1px solid #ddd; }
.report-table .amt-col { text-align: right; white-space: nowrap; width: 15%; }
.report-table .num { width: 2.2rem; color: #666; text-align: right; }
.report-table .accno { width: 6.5rem; font-weight: 700; }
.fees-table tr.new-acc td { border-top: 2px solid #345; }
.outst-table thead th { border-bottom: 2px solid #333; background: #f4f4f4; font-style: normal; }
.outst-table tr.subtotal td { border-top: 1px solid #333; border-bottom: 3px double #333; }
.report-table tr.grand td { border-top: 3px double #333; border-bottom: none; font-size: 1.05rem; }
.text-end { text-align: right; }
.print-footer { margin-top: 1rem; text-align: right; color: #777; font-size: .8rem; font-style: italic; }

@media print {
  .bears-nav, footer, .btn, .no-print { display: none !important; }
  body { background: #fff; }
  .main-wrap { max-width: none; padding: 0 !important; }
  .report-sheet { box-shadow: none; max-width: none; padding: 0 0 10mm; }
  .outst-table { page-break-inside: avoid; }
  /* date/time at the bottom of every printed page */
  .print-footer { position: fixed; bottom: 0; right: 0; margin: 0; }
}
