/* Client portal — layered on top of styles.css, reusing its tokens. */

.portal-shell { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }

.portal-head {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  padding-bottom: 1.25rem; margin-bottom: 2rem;
  border-bottom: 1px solid #E2E8F0;
}
.portal-head h1 { font-size: 1.5rem; margin: 0 0 .25rem; color: #1B3A6B; }
.portal-head .muted { color: #64748B; font-size: .9rem; }

.portal-card {
  background: #fff; border: 1px solid #E2E8F0; border-radius: 12px;
  padding: 1.5rem; margin-bottom: 1.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.portal-card h2 { font-size: 1.1rem; margin: 0 0 1rem; color: #1B3A6B; }

.pill {
  display: inline-block; padding: .2rem .6rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
}
.pill-ok   { background: #D1FAE5; color: #065F46; }
.pill-warn { background: #FEF3C7; color: #92400E; }
.pill-bad  { background: #FEE2E2; color: #991B1B; }

.orders-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.orders-table th {
  text-align: left; padding: .6rem .5rem; color: #64748B;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid #E2E8F0;
}
.orders-table td { padding: .75rem .5rem; border-bottom: 1px solid #F1F5F9; }
.orders-table code { font-size: .82rem; color: #334155; }
.orders-table .empty { color: #64748B; text-align: center; padding: 2rem 0; }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; }

/* Scheme search */
.scheme-results { list-style: none; margin: .5rem 0 0; padding: 0; max-height: 260px; overflow-y: auto; }
.scheme-results li { border-bottom: 1px solid #F1F5F9; }
.scheme-results button {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: .65rem .5rem; display: flex; flex-direction: column; gap: .15rem;
}
.scheme-results button:hover, .scheme-results button:focus-visible { background: #F8FAFC; }
.scheme-results strong { font-size: .88rem; color: #1E293B; font-weight: 600; }
.scheme-results span   { font-size: .75rem; color: #64748B; }
.scheme-results .muted { padding: .65rem .5rem; color: #64748B; font-size: .85rem; }

.scheme-chosen {
  margin-top: .5rem; padding: .6rem .75rem; border-radius: 8px;
  background: #EFF6FF; color: #1E40AF; font-size: .88rem; font-weight: 600;
}

.notice {
  padding: 1rem 1.25rem; border-radius: 10px; font-size: .9rem; line-height: 1.55;
  border-left: 4px solid;
}
.notice-warn { background: #FFFBEB; border-color: #F59E0B; color: #78350F; }
.notice-info { background: #EFF6FF; border-color: #2563EB; color: #1E3A8A; }
.notice-error{ background: #FEF2F2; border-color: #EF4444; color: #991B1B; }

/* Toasts */
.toast-host { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 9999; }
.portal-toast {
  padding: .8rem 1.1rem; border-radius: 10px; color: #fff; font-size: .9rem;
  max-width: 380px; box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
}
.portal-toast-ok    { background: #10B981; }
.portal-toast-error { background: #EF4444; }
.portal-toast-warn  { background: #D97706; }
.portal-toast-info  { background: #2563EB; }

/* Auth pages */
.auth-wrap { min-height: 72vh; display: grid; place-items: center; padding: 3rem 1.25rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.4rem; margin: 0 0 .4rem; color: #1B3A6B; }
.auth-card .muted { color: #64748B; font-size: .9rem; margin-bottom: 1.5rem; }
.auth-alt { margin-top: 1.25rem; font-size: .88rem; color: #64748B; text-align: center; }

@media (max-width: 640px) {
  .orders-table thead { display: none; }
  .orders-table tr { display: block; border-bottom: 1px solid #E2E8F0; padding: .6rem 0; }
  .orders-table td { display: flex; justify-content: space-between; border: 0; padding: .3rem .25rem; }
  .orders-table td::before { content: attr(data-label); color: #64748B; font-size: .78rem; font-weight: 600; }
}
