/* Applicant / endorser portal — signed-out pages: 50/50 split (welcome panel | form), form only below 1024px. */
body.portal-auth { margin: 0; background: #fff; font-family: Montserrat, -apple-system, "Segoe UI", Roboto, sans-serif; }
.portal-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
/* Left half: same look as the admin sign-in panel (login/admin_login.php). */
.portal-welcome { display: flex; align-items: center; padding: 56px 64px; color: #fff; background: linear-gradient(160deg, #1C4489 0%, #534588 100%); }
.portal-welcome-inner { max-width: 460px; }
.portal-welcome h2 { font-size: 30px; font-weight: 700; line-height: 1.2; margin: 0 0 14px; }
.portal-welcome-lead { font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, .85); margin: 0 0 28px; }
.welcome-feature { display: flex; align-items: flex-start; margin: 18px 0; }
.welcome-icon { width: 36px; height: 36px; min-width: 36px; margin-right: 14px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #00d4a8; background: rgba(0, 147, 121, .3); }
.welcome-feature-text h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: #fff; }
.welcome-feature-text p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .7); }
.portal-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #f6f8fc; }
.portal-card { background: #fff; width: 100%; max-width: 440px; border-radius: 14px; padding: 32px 28px; box-shadow: 0 10px 30px rgba(28, 68, 137, .10); }
.portal-brand { display: block; text-align: center; margin-bottom: 20px; }
.portal-brand img { height: 64px; }
.portal-card h1 { color: #1c4489; margin-bottom: 18px; }
.portal-card .btn-primary { background: #1c4489; border-color: #1c4489; }
.portal-hp { position: absolute; left: -9999px; }
@media (max-width: 1023.98px) {
    .portal-split { grid-template-columns: 1fr; }
    .portal-welcome { display: none; }
    .portal-form { min-height: 100vh; padding: 24px 16px; }
}
.portal-lang { position: fixed; top: 16px; right: 16px; z-index: 10; padding: 6px 14px; border-radius: 999px; background: #fff; color: #1c4489; border: 1px solid #d0d5dd; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-decoration: none; box-shadow: 0 2px 6px rgba(28, 68, 137, .08); }
.portal-lang:hover { background: #1c4489; color: #fff; border-color: #1c4489; }
.portal-welcome-logo { display: inline-block; background: #fff; border-radius: 14px; padding: 14px 20px; margin-bottom: 28px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.portal-welcome-logo img { height: 72px; display: block; }
@media (min-width: 1024px) { .portal-brand { display: none; } } /* the welcome half shows the logo */

/* Signed-in pages */
body.portal-app { margin: 0; background: #f4f6fb; font-family: Montserrat, -apple-system, "Segoe UI", Roboto, sans-serif; color: #1f2937; }
.portal-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: linear-gradient(90deg, #1C4489 0%, #534588 100%); }
.portal-topbar-logo { background: #fff; border-radius: 10px; padding: 6px 10px; display: inline-block; }
.portal-topbar-logo img { height: 40px; display: block; }
.portal-topbar-right { display: flex; align-items: center; gap: 12px; }
.portal-topbar-user { color: rgba(255, 255, 255, .85); font-size: 13px; }
.portal-lang-inline { color: #fff; font-weight: 600; font-size: 13px; letter-spacing: .04em; text-decoration: none; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; padding: 4px 12px; }
.portal-lang-inline:hover { background: #fff; color: #1c4489; }
.portal-main { padding: 28px 16px 64px; }
.portal-container { max-width: 1140px; margin: 0 auto; }
.portal-view { margin-bottom: 32px; }
.portal-view-title { font-size: 18px; font-weight: 700; color: #1c4489; margin: 0 0 16px; }
.portal-switch { text-align: center; font-size: 13px; margin-top: 8px; }
.portal-switch a { color: #667085; }
/* "What brings you here?" — two large, unmistakable choices */
.portal-choose { max-width: 900px; margin: 12px auto 0; text-align: center; }
.portal-choose h1 { color: #1c4489; font-weight: 700; margin-bottom: 24px; }
.portal-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.portal-choice { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 36px 28px; border-radius: 18px; background: #fff; color: inherit; text-decoration: none; border: 2px solid #dde3ee; box-shadow: 0 6px 18px rgba(28, 68, 137, .08); }
a.portal-choice[href]:hover { border-color: #1c4489; box-shadow: 0 10px 26px rgba(28, 68, 137, .16); transform: translateY(-1px); }
.portal-choice-icon { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #fff; }
.portal-choice.is-borrow .portal-choice-icon { background: #1c4489; }
.portal-choice.is-endorse .portal-choice-icon, .portal-choice.is-invite .portal-choice-icon { background: #009379; }
.portal-choice-title { font-size: 20px; font-weight: 700; color: #1c4489; line-height: 1.3; }
.portal-choice.is-endorse .portal-choice-title, .portal-choice.is-invite .portal-choice-title { color: #00745f; }
.portal-choice-text { font-size: 14px; color: #475467; }
.portal-choice-soon { font-size: 12px; color: #98a2b3; }
.portal-choice.is-blocked { opacity: .7; }
.portal-choice.is-blocked .portal-choice-text { color: #b42318; }
.portal-choice.is-invite { max-width: 560px; margin: 0 auto; border-color: #009379; }
.portal-choice-foot { font-size: 13px; color: #667085; margin-top: 14px; }
@media (max-width: 767.98px) { .portal-choices { grid-template-columns: 1fr; } }
.portal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.portal-tile { display: flex; flex-direction: column; background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 4px 14px rgba(28, 68, 137, .07); color: inherit; text-decoration: none; border: 1px solid transparent; min-height: 170px; }
a.portal-tile:hover { border-color: #1c4489; box-shadow: 0 8px 22px rgba(28, 68, 137, .14); }
.portal-tile.is-wide { grid-column: span 2; }
.portal-tile-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #667085; margin-bottom: 8px; }
.portal-tile-value { font-size: 22px; font-weight: 700; color: #1c4489; line-height: 1.25; margin-bottom: 8px; }
.portal-tile-note { font-size: 13px; color: #475467; margin-bottom: 4px; }
.portal-tile-action { margin-top: auto; padding-top: 10px; font-size: 13px; font-weight: 600; color: #009379; }
.portal-tile.is-soon .portal-tile-action, .portal-tile.is-info .portal-tile-action { color: #98a2b3; font-weight: 500; }
.portal-tile.is-blocked .portal-tile-value { color: #98a2b3; }
.portal-tile.has-todo { border-color: #f5b041; }
.portal-notice { background: #fff; border-radius: 14px; padding: 24px; text-align: center; color: #b42318; box-shadow: 0 4px 14px rgba(28, 68, 137, .07); }
.portal-panel { background: #fff; border-radius: 14px; padding: 20px; margin-top: 20px; box-shadow: 0 4px 14px rgba(28, 68, 137, .07); }
@media (max-width: 991.98px) { .portal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .portal-grid { grid-template-columns: 1fr; } .portal-tile.is-wide { grid-column: auto; } .portal-topbar-logo img { height: 32px; } }
.portal-pagehead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 14px; }
.portal-pagehead a { color: #1c4489; text-decoration: none; }
.portal-stat { font-size: 18px; font-weight: 700; color: #1c4489; }
.portal-ledger-head { text-align: center; margin-bottom: 18px; color: #1f2937; }
.portal-grid-2 { grid-template-columns: 1fr 1fr; margin-bottom: 4px; }
.portal-grid-2 .portal-tile { min-height: 0; }
@media print { .portal-topbar, .d-print-none { display: none !important; } body.portal-app { background: #fff; } .portal-panel, .portal-tile { box-shadow: none; border: 1px solid #ddd; } }
.portal-choose-history { grid-template-columns: minmax(0, 320px); justify-content: center; margin-top: 20px; text-align: left; }

/* ===== Borrower dashboard: journey hero, to-do, file list, loan ===== */
:root { --hf-navy: #1C4489; --hf-purple: #534588; --hf-teal: #009379; --hf-amber: #E8A33D; --hf-ink: #1E2A3B; --hf-muted: #5B6779; --hf-line: #E1E6EF; }
.portal-hero { position: relative; overflow: hidden; color: #fff; border-radius: 22px; padding: 30px 34px 26px; margin-bottom: 22px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(0, 147, 121, .55) 0%, rgba(0, 147, 121, 0) 55%), linear-gradient(135deg, var(--hf-navy) 0%, var(--hf-purple) 100%); }
.portal-hero::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, .06); }
.portal-hero-hello { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.portal-hero-title { margin: 0 0 26px; font-size: clamp(22px, 3vw, 30px); font-weight: 700; line-height: 1.2; max-width: 30ch; }
.portal-path { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0 0 24px; padding: 0; counter-reset: none; }
.portal-path li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.portal-path li::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 3px; background: rgba(255, 255, 255, .22); z-index: -1; }
.portal-path li:first-child::before { display: none; }
.portal-path li.is-done::before, .portal-path li.is-now::before { background: #7fe0cd; }
.portal-path-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
  background: rgba(255, 255, 255, .14); border: 2px solid rgba(255, 255, 255, .35); color: rgba(255, 255, 255, .8); }
.portal-path li.is-done .portal-path-dot { background: #7fe0cd; border-color: #7fe0cd; color: var(--hf-navy); }
.portal-path li.is-now .portal-path-dot { background: #fff; border-color: #fff; color: var(--hf-navy); box-shadow: 0 0 0 6px rgba(255, 255, 255, .18); }
.portal-path-label { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.portal-path li.is-now .portal-path-label { color: #fff; }
.portal-hero-foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.portal-hero-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 12px; background: #fff; color: var(--hf-navy); font-weight: 700; text-decoration: none; box-shadow: 0 8px 20px rgba(10, 20, 50, .25); }
a.portal-hero-btn:hover { background: #7fe0cd; color: var(--hf-navy); }
a.portal-hero-btn:focus-visible, .portal-tile:focus-visible { outline: 3px solid #7fe0cd; outline-offset: 3px; }
.portal-hero-btn.is-soon { opacity: .85; cursor: default; }
.portal-hero-btn small { font-weight: 500; color: var(--hf-muted); }
.portal-hero-note { margin: 0; color: rgba(255, 255, 255, .9); max-width: 60ch; }
.portal-hero-date { font-size: 13px; color: rgba(255, 255, 255, .7); }
@media (prefers-reduced-motion: no-preference) {
  .portal-path li.is-now .portal-path-dot { animation: hf-now 2.4s ease-in-out 3; }
  @keyframes hf-now { 50% { box-shadow: 0 0 0 11px rgba(255, 255, 255, .08); } }
}
.portal-section-title { font-size: 17px; font-weight: 700; color: var(--hf-ink); margin: 26px 0 12px; }
.portal-todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.portal-todo-item { flex-direction: row; align-items: flex-start; gap: 14px; min-height: 0; padding: 18px; border: 1px solid var(--hf-line); box-shadow: none; }
.portal-todo-item.has-todo { border-color: var(--hf-amber); background: linear-gradient(0deg, #fff 60%, #FFF7EA 100%); }
.portal-todo-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #EAF0FA; color: var(--hf-navy); }
.portal-todo-item.has-todo .portal-todo-icon { background: #FCEBD0; color: #9A5B00; }
.portal-todo-body { display: flex; flex-direction: column; gap: 4px; }
.portal-todo-title { font-weight: 700; color: var(--hf-ink); display: flex; align-items: center; gap: 8px; }
.portal-todo-text { font-size: 14px; color: var(--hf-muted); line-height: 1.4; }
.portal-badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--hf-amber); color: #3b2500; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.portal-soon { font-size: 12px; color: #98a2b3; }
.portal-tile.is-soon { opacity: .78; }
.portal-list { background: #fff; border: 1px solid var(--hf-line); border-radius: 16px; overflow: hidden; }
.portal-list-row { flex-direction: row; align-items: center; gap: 14px; min-height: 0; padding: 14px 18px; border-radius: 0; border: 0; border-bottom: 1px solid var(--hf-line); box-shadow: none; }
.portal-list-row:last-child { border-bottom: 0; }
a.portal-list-row:hover { border-color: var(--hf-line); box-shadow: none; background: #F6F8FC; }
.portal-list-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #E6F4F1; color: var(--hf-teal); }
.portal-list-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.portal-list-title { font-weight: 700; color: var(--hf-ink); }
.portal-list-text { font-size: 14px; color: var(--hf-muted); }
.portal-list-row.is-muted .portal-list-icon { background: #EEF1F5; color: #98a2b3; }
.portal-list-go { color: #98a2b3; }
.portal-loan { flex-direction: row; flex-wrap: wrap; gap: 24px; min-height: 0; padding: 24px; margin-bottom: 4px; border: 1px solid var(--hf-line); box-shadow: none; }
.portal-loan-main { flex: 1 1 320px; }
.portal-loan-side { flex: 0 1 260px; padding-left: 24px; border-left: 1px solid var(--hf-line); }
.portal-loan-name, .portal-loan-next-label { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--hf-muted); }
.portal-loan-balance { margin: 0 0 12px; font-size: 30px; font-weight: 700; color: var(--hf-navy); }
.portal-loan-balance span { font-size: 15px; font-weight: 500; color: var(--hf-muted); }
.portal-loan-bar { height: 10px; border-radius: 999px; background: #E6EBF3; overflow: hidden; margin-bottom: 8px; }
.portal-loan-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--hf-teal), #2fc7a6); }
.portal-loan-meta { margin: 0; font-size: 13px; color: var(--hf-muted); }
.portal-loan-next { margin: 0 0 2px; font-size: 22px; font-weight: 700; color: var(--hf-ink); }
.portal-loan-alert { color: #b42318; font-weight: 600; }
.portal-loan-done { color: var(--hf-teal); font-weight: 700; }
.portal-loan-link { display: inline-block; margin-top: 12px; font-weight: 600; color: var(--hf-teal); }
.pi { width: 22px; height: 22px; }
@media (max-width: 767.98px) {
  .portal-hero { padding: 24px 20px; border-radius: 18px; }
  .portal-path-label { font-size: 11px; }
  .portal-path-dot { width: 30px; height: 30px; font-size: 13px; }
  .portal-path li::before { top: 14px; }
  .portal-todo { grid-template-columns: 1fr; }
  .portal-loan-side { padding-left: 0; border-left: 0; border-top: 1px solid var(--hf-line); padding-top: 16px; flex-basis: 100%; }
}
/* Endorser view: teal-led variant of the hero, 4-step path */
.portal-hero.is-endorser { background: radial-gradient(120% 140% at 100% 0%, rgba(28, 68, 137, .55) 0%, rgba(28, 68, 137, 0) 55%), linear-gradient(135deg, #00745f 0%, var(--hf-purple) 100%); }
.portal-path.is-4 { grid-template-columns: repeat(4, 1fr); }
.portal-list-amount { flex: none; text-align: right; font-weight: 700; color: var(--hf-ink); display: flex; flex-direction: column; }
.portal-list-amount small { font-size: 12px; font-weight: 500; color: var(--hf-muted); }
.portal-list-more .portal-list-title { color: var(--hf-teal); }

/* ===== Loan application ===== */
.lf-gate .portal-hero-note { margin-bottom: 22px; }
.lf-gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; position: relative; z-index: 1; }
.lf-gate-alt { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.lf-intro ul { padding-left: 20px; margin-bottom: 10px; }
.lf-intro li { margin-bottom: 6px; }
.lf-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 18px; }
.lf-kicker { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--hf-teal); }
.lf-title { margin: 0; font-size: clamp(22px, 3vw, 28px); font-weight: 700; color: var(--hf-navy); }
.lf-progress-wrap { flex: 0 1 300px; min-width: 220px; }
.lf-progress-text { font-size: 13px; font-weight: 600; color: var(--hf-muted); margin-bottom: 6px; }
.lf-progress { height: 8px; border-radius: 999px; background: #E1E6EF; overflow: hidden; }
.lf-progress span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--hf-navy), var(--hf-teal)); transition: width .3s ease; }
.lf-saved { font-size: 12px; color: var(--hf-muted); margin-top: 6px; min-height: 18px; }
.lf-saved.is-bad { color: #b42318; font-weight: 600; }
.lf-form { padding: 28px; border: 1px solid var(--hf-line); box-shadow: none; }
.lf-step { display: grid; gap: 18px; max-width: 680px; }
.lf-item.is-hidden { display: none; }
.lf-heading { font-size: 18px; font-weight: 700; color: var(--hf-ink); margin: 10px 0 0; padding-top: 6px; }
.lf-step > .lf-heading:first-child { margin-top: 0; padding-top: 0; }
.lf-note { background: #F1F5FB; border-left: 4px solid var(--hf-navy); border-radius: 8px; padding: 12px 16px; font-size: 14px; color: var(--hf-ink); }
.lf-note p:last-child { margin-bottom: 0; }
.lf-item .form-label, .lf-item legend.form-label { font-weight: 600; color: var(--hf-ink); font-size: 15px; margin-bottom: 6px; }
.lf-item legend.form-label { float: none; }
.lf-req { color: #b42318; }
.lf-help { font-size: 13px; color: var(--hf-muted); margin-top: 4px; }
.lf-error { font-size: 13px; color: #b42318; font-weight: 600; margin-top: 4px; }
.lf-error:empty { display: none; }
.lf-item.has-error .form-control, .lf-item.has-error .form-select { border-color: #b42318; }
.lf-item .form-control, .lf-item .form-select { padding: 10px 12px; border-radius: 10px; border-color: #cfd6e3; }
.lf-item .form-control:focus, .lf-item .form-select:focus { border-color: var(--hf-navy); box-shadow: 0 0 0 3px rgba(28, 68, 137, .15); }
.lf-file-name { font-size: 14px; margin-top: 6px; color: var(--hf-teal); font-weight: 600; }
.lf-file.has-file .lf-file-name::before { content: "✓ "; }
.lf-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--hf-line); max-width: 680px; }
.lf-nav .btn { padding: 10px 22px; border-radius: 10px; font-weight: 600; }
.lf-nav .btn-primary { background: var(--hf-navy); border-color: var(--hf-navy); margin-left: auto; }
.lf-nav .btn-success { background: var(--hf-teal); border-color: var(--hf-teal); margin-left: auto; }
.lf-foot { font-size: 13px; color: var(--hf-muted); margin-top: 14px; }
@media (max-width: 575.98px) { .lf-form { padding: 20px 16px; } }

/* ---- Brand colours instead of Bootstrap's default blue (2026-11-02) ------------------------- */
a { color: var(--hf-navy); }
a:hover, a:focus { color: var(--hf-purple); }
.btn-link { color: var(--hf-navy); }
.btn-link:hover, .btn-link:focus { color: var(--hf-purple); }
.btn-primary { background: var(--hf-navy); border-color: var(--hf-navy); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active { background: var(--hf-purple) !important; border-color: var(--hf-purple) !important; }
.btn-primary:focus, .btn-outline-primary:focus { box-shadow: 0 0 0 .25rem rgba(28, 68, 137, .25); }
.btn-outline-primary { color: var(--hf-navy); border-color: var(--hf-navy); }
.btn-outline-primary:hover, .btn-outline-primary:active { color: #fff; background: var(--hf-navy); border-color: var(--hf-navy); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: #7f97c4; box-shadow: 0 0 0 .25rem rgba(28, 68, 137, .2); }
.form-check-input:checked { background-color: var(--hf-navy); border-color: var(--hf-navy); }
.alert-info { color: #1c3a6e; background: #eef2fa; border-color: #d3dcef; }
.page-link { color: var(--hf-navy); }

/* ---- Endorsers page --------------------------------------------------------------------------- */
.en-slot { border-left: 4px solid var(--hf-line); }
.en-slot.is-empty { border-left-color: var(--hf-amber); }
.en-slot.is-sent { border-left-color: var(--hf-navy); }
.en-slot.is-endorsed, .en-slot.is-approved { border-left-color: var(--hf-teal); }
.en-badge { font-size: 13px; font-weight: 600; color: var(--hf-muted); white-space: nowrap; }
.en-slot.is-approved .en-badge, .en-slot.is-endorsed .en-badge { color: var(--hf-teal); }
.en-slot.is-refused { border-left-color: #b42318; background: #fef3f2; }
.en-slot.is-refused .en-badge { color: #b42318; }

/* ---- Questions page --------------------------------------------------------------------------- */
.q-item { border-left: 4px solid var(--hf-amber); }
.q-item.is-answered { border-left-color: var(--hf-teal); }
.q-item.has-error { border-left-color: #c0392b; }
.q-topic { font-size: 13px; font-weight: 600; color: var(--hf-purple); text-transform: uppercase; letter-spacing: .03em; }
.q-question { font-size: 17px; font-weight: 600; color: var(--hf-ink); }
.q-item.is-answered .en-badge { color: var(--hf-teal); }

/* ---- Messages --------------------------------------------------------------------------------- */
.m-row.is-new { border-left: 4px solid var(--hf-teal); }
.m-thread { display: flex; flex-direction: column; gap: 12px; }
.m-msg { max-width: 88%; padding: 12px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--hf-line); }
.m-msg.is-customer { align-self: flex-end; background: #eef2fa; border-color: #d3dcef; }
.m-msg.is-staff { align-self: flex-start; border-left: 4px solid var(--hf-teal); }
.m-meta { font-size: 12px; font-weight: 600; color: var(--hf-muted); margin-bottom: 4px; }
.m-body { color: var(--hf-ink); overflow-wrap: anywhere; }
.m-files { font-size: 12px; color: var(--hf-muted); margin-top: 6px; }

/* ---- Documents -------------------------------------------------------------------------------- */
.doc-item { border-left: 4px solid var(--hf-amber); }
.doc-item.is-rejected { border-left-color: #c0392b; }
.doc-note { background: #eef2fa; border-left: 3px solid var(--hf-navy); padding: 8px 12px; border-radius: 0 6px 6px 0; font-size: 14px; margin-top: 8px; }
.doc-reject { background: #fdecea; border-left: 3px solid #c0392b; padding: 8px 12px; border-radius: 0 6px 6px 0; font-size: 14px; color: #8a1f12; margin-top: 8px; }
.doc-file { flex: 1; min-width: 220px; }
