/* Client portal + billing pages — page-specific polish */

.portal-shell {
  max-width: 960px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  color: #0f2740;
}

.portal-header {
  background: #154162;
  color: #fff;
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}

.portal-header h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.portal-header p {
  margin: 0;
  opacity: 0.92;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.portal-card {
  background: #f7fafc;
  border: 1px solid #d5e2ef;
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
  box-shadow: 0 8px 24px rgba(21, 65, 98, 0.08);
}

.portal-login-card {
  max-width: 420px;
  margin: 2rem auto;
}

.portal-card h1,
.portal-card h2 {
  margin-top: 0;
  color: #154162;
}

.lede {
  color: #3a5168;
  line-height: 1.5;
}

.portal-form .field {
  margin-bottom: 1rem;
  text-align: left;
}

.portal-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.portal-form input,
.portal-form select,
.portal-form textarea,
.form-control {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #b7c9da;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 1rem;
  background: #fff;
}

.btn-primary,
.btn-secondary,
.btn-lg {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.15rem;
  font-weight: 650;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

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

.btn-primary:hover {
  background: #2469b0;
}

.btn-secondary {
  background: #e8eef5;
  color: #154162;
}

.btn-lg {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-size: 1.05rem;
}

.btn-link {
  display: inline-block;
  margin-left: 0.75rem;
  color: #154162;
}

.hint {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: #4a6278;
}

.invoice-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.invoice-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 0;
  border-bottom: 1px solid #dbe6f0;
}

.invoice-list.muted {
  opacity: 0.9;
}

.invoice-list p {
  margin: 0.25rem 0 0;
  color: #3a5168;
  font-size: 0.95rem;
}

.subhead {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: #154162;
}

.status {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #dfeaf6;
  color: #154162;
}

.status-paid {
  background: #d9f2e3;
  color: #0f5c34;
}

.status-open,
.status-draft {
  background: #fff3d6;
  color: #7a5400;
}

.pay-card .amount {
  font-size: 2rem;
  font-weight: 750;
  color: #154162;
  margin: 0.25rem 0 0.75rem;
}

.pay-card .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: #5b738a;
  margin: 0;
}

.pay-card .desc {
  white-space: pre-wrap;
  line-height: 1.5;
}

.pay-card .meta {
  color: #4a6278;
  font-size: 0.95rem;
}

.banner {
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}

.banner.ok {
  background: #e5f7ec;
  border-left: 4px solid #1f8a4c;
}

.banner.warn {
  background: #fff6e5;
  border-left: 4px solid #d4a017;
}

.pure-thanks {
  text-align: center;
  padding: 1.5rem 0;
}

@media (max-width: 640px) {
  .invoice-list li {
    flex-direction: column;
  }
}
