/* ==========================================================================
   The Sole Provider — Client Portal styles
   Unified styles for the client portal. Replaces the per-page inline styles
   that drifted into three different "brand reds" (#dc143c, #d11030, #c41230).
   Uses the canonical brand red #c41230 throughout, matching the website
   and admin tool.
   ========================================================================== */

:root {
  --portal-bg:        #f9f9f9;
  --portal-ink:       #121212;
  --portal-ink-2:     #555;
  --portal-ink-3:     #888;
  --portal-line:      #e5e7eb;
  --portal-line-soft: #f3f4f6;
  --portal-brand:     #c41230;
  --portal-brand-deep:#9b0e25;
  --portal-brand-soft:#fce4ec;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Assistant', sans-serif;
  background: var(--portal-bg);
  color: var(--portal-ink);
  min-height: 100vh;
}

/* ── Preview banner (only shown via /portal-preview routes) ───────────── */
.preview-banner {
  background: #fde68a;
  color: #78350f;
  padding: 6px 24px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid #f59e0b;
}

/* ── Portal nav (P-01: unified branded chrome) ────────────────────────── */
.portal-nav {
  background: var(--portal-ink);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--portal-brand);
}
.portal-nav .brand {
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.portal-nav .brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--portal-brand);
}
.portal-nav .nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}
.portal-nav .nav-links a {
  color: #999;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
  position: relative;
  padding-bottom: 2px;
}
.portal-nav .nav-links a:hover { color: #fff; }
.portal-nav .nav-links a.active {
  color: #fff;
  border-bottom: 2px solid var(--portal-brand);
}
/* P-03: unread badge on Messages link */
.portal-nav .nav-badge {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--portal-brand);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  margin-left: 6px;
  vertical-align: middle;
}
.portal-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.portal-nav .user-name { color: #888; font-size: 0.8rem; }
.portal-nav .logout-btn {
  color: var(--portal-brand);
  font-size: 0.8rem;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s;
}
.portal-nav .logout-btn:hover { color: #fff; }

/* ── Layout primitives ────────────────────────────────────────────────── */
.container { max-width: 1000px; margin: 0 auto; padding: 24px; }
h1.page-title {
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.section {
  background: #fff;
  border: 1px solid var(--portal-line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}
.section-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--portal-brand);
  margin-bottom: 12px;
  border-bottom: 2px solid var(--portal-brand-soft);
  padding-bottom: 8px;
}

/* ── Buttons (unified) ────────────────────────────────────────────────── */
.btn-primary, .btn-send, .btn-pdf {
  background: var(--portal-ink);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary:hover, .btn-send:hover, .btn-pdf:hover { background: var(--portal-brand); }
.btn-primary:disabled, .btn-send:disabled { background: #ccc; cursor: not-allowed; }

.btn-review {
  background: var(--portal-brand);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
}
.btn-review:hover { background: var(--portal-brand-deep); }

/* ── Status pills ─────────────────────────────────────────────────────── */
.badge {
  font-size: 0.65rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-paid     { background: #dcfce7; color: #166534; }
.badge-sent     { background: #dbeafe; color: #1e40af; }
.badge-draft    { background: #f3f4f6; color: #6b7280; }
.badge-overdue  { background: #fee2e2; color: #991b1b; }
.badge-pending  { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-changes_requested,
.badge-changes  { background: #fee2e2; color: #991b1b; }
.badge-rejected { background: #f3f4f6; color: #6b7280; }
/* P-02 (soft): a calm status pill, not a nagging banner */
.badge-awaiting {
  background: var(--portal-brand-soft);
  color: var(--portal-brand-deep);
}

/* ── Form fields (login + change password etc.) ──────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--portal-line);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--portal-brand);
}

.error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

/* Login page */
.login-container {
  width: 100%;
  max-width: 420px;
  padding: 40px 24px;
  margin: auto;
}
.login-logo { text-align: center; margin-bottom: 40px; }
.login-logo img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--portal-brand);
}
.login-logo h1 {
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 14px;
}
.login-logo p { color: #888; font-size: 0.85rem; margin-top: 4px; }
.btn-primary.btn-block { width: 100%; padding: 14px; }
.login-footer {
  text-align: center;
  margin-top: 24px;
  color: #aaa;
  font-size: 0.78rem;
}
.login-footer a {
  color: var(--portal-brand);
  text-decoration: none;
  font-weight: 600;
}
.login-help {
  text-align: center;
  font-size: 0.8rem;
  color: var(--portal-ink-3);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--portal-line);
}
.login-help a {
  color: var(--portal-brand);
  text-decoration: none;
  font-weight: 700;
}
