/* Paul Anderson Micro Finance — small, mobile-first, system fonts only.
   No web fonts, no images, no outside requests: pages stay light on
   slow mobile connections. */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 17px; line-height: 1.5; color: #1a2436; background: #f4f6fa; }
.topbar { background: #082856; color: #fff; padding: 12px 14px; }
.topbar .brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 36px; height: 36px; border-radius: 50%; background: #fff; flex: none; }
.login-logo { text-align: center; margin: 6px 0 2px; }
.login-logo img { width: 140px; height: 140px; }
.brand-strip { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #d8dee8; border-radius: 8px; padding: 10px 14px; margin: 4px 0 10px; }
.brand-strip img { width: 48px; height: 48px; border-radius: 50%; background: #fff; flex: none; }
.receipt-logo { width: 64px; height: 64px; flex: none; }
.topbar .brand span { color: #fbc850; }
.topbar .who { font-size: 14px; opacity: .9; margin-top: 2px; }
.topbar a { color: #fbc850; }
.wrap { max-width: 860px; margin: 0 auto; padding: 12px 14px 84px; }
h1 { font-size: 24px; margin: 8px 0 12px; }
h2 { font-size: 19px; margin: 18px 0 8px; }
a { color: #082856; }
.card { background: #fff; border: 1px solid #d8dee8; border-radius: 8px; padding: 16px; margin: 10px 0; }
.grid { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
.stat span { color: #5b6b7a; font-size: 14px; }
.stat strong { display: block; font-size: 22px; margin-top: 2px; }
.big { font-size: 30px; font-weight: 700; margin: 4px 0; }
label { display: block; margin: 12px 0; font-weight: 600; font-size: 16px; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; font-size: 17px; border: 1px solid #9aa7b8; border-radius: 8px; background: #fff; min-height: 48px; }
button, .btn { display: inline-block; background: #082856; color: #fff; border: 0; border-radius: 8px; padding: 13px 20px; font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer; margin: 4px 4px 4px 0; min-height: 48px; line-height: 1.2; }
button:hover, .btn:hover { background: #0e3a72; }
.btn.secondary { background: #fff; color: #082856; border: 2px solid #082856; }
/* Big finger-friendly buttons, e.g. on the client home screen. */
.bigbtn { display: block; width: 100%; text-align: center; padding: 18px 20px; font-size: 19px; margin: 8px 0; }
.bigbtn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.nextpay { background: #fef9c3; border-color: #fbc850; }
.nextpay h2 { margin-top: 0; }
.attention { border-left: 5px solid #dc2626; }
.attention h3 { font-size: 16px; margin: 10px 0 4px; }
table { width: 100%; border-collapse: collapse; background: #fff; margin: 8px 0; font-size: 14px; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e3e8f0; white-space: nowrap; }
th { background: #eef2f8; }
td.num, th.num { text-align: right; }
tr.total td { border-top: 2px solid #082856; background: #eef2f8; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid #e3e8f0; }
.list li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 10px; margin: 0; }
.kv dt { color: #5b6b7a; font-size: 14px; }
.kv dd { margin: 0; }
.flash { background: #dbeafe; border: 1px solid #93c5fd; padding: 10px 12px; border-radius: 6px; margin: 8px 0; }
.alert { background: #fee2e2; border: 1px solid #fca5a5; padding: 10px 12px; border-radius: 6px; margin: 8px 0; }
.ok { color: #082856; font-weight: 700; }
.muted { color: #5b6b7a; font-size: 14px; }
.secret { font-size: 18px; letter-spacing: 2px; background: #eef2f8; padding: 6px 8px; border-radius: 4px; word-break: break-all; }
.search { display: flex; gap: 8px; margin: 10px 0; }
.search input { flex: 1; margin: 0; }
.search button { margin: 0; }
.install-banner { background: #fef9c3; border-bottom: 1px solid #fbc850; color: #422006; padding: 10px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.install-banner[hidden] { display: none; }
.install-banner button { background: #082856; color: #fff; border: 0; border-radius: 6px; padding: 8px 14px; font-size: 14px; font-weight: 600; cursor: pointer; margin: 0; }
.install-banner #install-dismiss { background: transparent; color: #422006; padding: 8px; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; background: #082856; display: flex; }
.bottomnav a { flex: 1; text-align: center; color: #fff; text-decoration: none; padding: 15px 2px; font-size: 14px; font-weight: 700; }
.bottomnav a:hover { background: #0e3a72; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.inline-form label { flex: 1 1 160px; margin: 0; }

/* Receipts and statements: clean on paper. */
.receipt { background: #fff; border: 1px solid #9aa7b8; border-radius: 8px; padding: 18px; margin: 12px 0; }
.receipt-head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #082856; padding-bottom: 10px; margin-bottom: 10px; }
.receipt-no { font-weight: 700; white-space: nowrap; }
.receipt-sign { margin-top: 28px; }

@media print {
  body { background: #fff; font-size: 13px; }
  .topbar .who, .bottomnav, .install-banner, .noprint, button { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .card, .receipt { border: 1px solid #999; break-inside: avoid; }
  table { display: table; font-size: 12px; }
  a { color: #000; text-decoration: none; }
}
