html { font-size: 17px; }
:root {
  --cda-navy: #1F3A5F;
  --cda-blue: #1B5E9E;
  --cda-blue-dark: #134472;
  --cda-green: #3F7D20;
  --cda-green-dark: #2E6B1F;
  --bs-primary: #1B5E9E;
  --bs-primary-rgb: 27, 94, 158;
  --bs-link-color: #1B5E9E;
  --bs-link-color-rgb: 27, 94, 158;
  --bs-link-hover-color: #134472;
  --bs-link-hover-color-rgb: 19, 68, 114;
  --bs-body-bg: #F3F5F8;
  --bs-body-color: #1E2833;
  --bs-border-color: #DCE2E8;
}
body { background: #F3F5F8; }
.btn-primary { --bs-btn-bg: #1B5E9E; --bs-btn-border-color: #1B5E9E; --bs-btn-hover-bg: #134472; --bs-btn-hover-border-color: #134472; --bs-btn-active-bg: #134472; --bs-btn-active-border-color: #134472; }
.btn-outline-primary { --bs-btn-color: #1B5E9E; --bs-btn-border-color: #1B5E9E; --bs-btn-hover-bg: #1B5E9E; --bs-btn-hover-border-color: #1B5E9E; --bs-btn-active-bg: #1B5E9E; }
.btn-success { --bs-btn-bg: #3F7D20; --bs-btn-border-color: #3F7D20; --bs-btn-hover-bg: #2E6B1F; --bs-btn-hover-border-color: #2E6B1F; --bs-btn-active-bg: #2E6B1F; }
.text-success { color: #2E6B1F !important; }
.nav-tabs .nav-link.active { color: #1B5E9E; font-weight: 600; }
.form-control:focus, .form-select:focus { border-color: #1B5E9E; box-shadow: 0 0 0 .2rem rgba(27,94,158,.2); }
.btn, .form-control, .form-select { min-height: 44px; }
.btn-sm { min-height: 36px; }
.form-control-lg, .input-group-lg > .form-control { min-height: 52px; }

.cda-nav { background: var(--cda-navy); }
.cda-nav .navbar-brand { font-weight: 700; display: flex; align-items: center; gap: .6rem; }
.cda-mark { width: 30px; height: 30px; border-radius: 6px; background: var(--cda-blue); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cda-nav .nav-link { color: #D6E0EC; }
.cda-nav .nav-link.active { color: #fff; font-weight: 600; background: rgba(255,255,255,.14); border-radius: 6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #fff; }

.card { border-color: #DCE2E8; box-shadow: none; }
.card-header { background: #fff; border-bottom-color: #E8ECF0; font-weight: 600; }
.stat .label { font-size: .75rem; font-weight: 600; color: #5B6B7B; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 1.85rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .8rem; color: #5B6B7B; }

.table > :not(caption) > * > * { padding: .75rem .85rem; }
.table thead th { font-size: .75rem; font-weight: 600; color: #5B6B7B; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table td { font-variant-numeric: tabular-nums; vertical-align: middle; }
.row-link { cursor: pointer; }
.row-link:hover { background: #F8FAFC; }

.badge.st { font-weight: 600; font-size: .78rem; padding: .4em .8em; }
.st-submitted { background: #E3EDF8; color: #1B4F86; }
.st-needsinfo { background: #FBF0D9; color: #7A5300; }
.st-approved  { background: #DDF3EA; color: #1B6B45; }
.st-issued    { background: #E6E4F7; color: #4A3F9B; }
.st-delivered { background: #DFF2DD; color: #2E6B1F; }
.st-denied    { background: #ECE7E7; color: #6B4A4A; }

.doc-slot { border: 1px dashed #C9D2DC; border-radius: 8px; padding: .75rem; background: #fff; height: 100%; }
.doc-slot.present { border-style: solid; background: #F8FAFC; cursor: pointer; }
.doc-slot.present:hover { border-color: var(--cda-blue); }
.doc-thumb { height: 56px; border-radius: 6px; background: #F3F5F8; display: flex; align-items: center; justify-content: center; color: #8A97A4; font-size: .72rem; text-align: center; padding: 0 .4rem; }
.doc-slot.present .doc-thumb { background: #fff; border: 1px solid #E8ECF0; color: var(--cda-blue); }

.activity .item { display: flex; gap: .6rem; padding: .5rem 0; border-top: 1px solid #E8ECF0; font-size: .9rem; }
.activity .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cda-blue); margin-top: 7px; flex-shrink: 0; }

.photo-tile { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border: 1px dashed #A9B6C3; border-radius: 10px; background: #fff; width: 100%; text-align: left; color: inherit; min-height: 64px; }
.photo-tile.done { border: 1px solid #B9D9B0; background: #F2F9EF; }
.photo-tile .ic { width: 46px; height: 46px; border-radius: 8px; background: #EAF1F8; color: var(--cda-blue); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.photo-tile.done .ic { background: #DCE9D6; color: var(--cda-green-dark); }

.big-tile { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; border-radius: 12px; background: #fff; border: 1px solid #DCE2E8; color: inherit; text-decoration: none; min-height: 84px; }
.big-tile:hover { border-color: var(--cda-blue); color: inherit; }
.big-tile .ic { width: 48px; height: 48px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.big-tile .t { font-size: 1.15rem; font-weight: 700; }
.big-tile .s { font-size: .85rem; color: #5B6B7B; }

.progress-fund { height: 12px; background: #E8ECF0; }
.progress-fund .bar-disb { background: var(--cda-green); }
.progress-fund .bar-comm { background: #9BC4E8; }
.legend-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: .35rem; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #1F3A5F 0 46%, #F3F5F8 46%); padding: 1rem; }
.login-card { width: 100%; max-width: 460px; }
.logo-box { height: 56px; flex: 1; border: 1px dashed #C9D2DC; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: .8rem; color: #5B6B7B; background: #fff; }
.secure-notice { border: 2px solid #B42318; border-radius: 8px; background: #FFF6F5; overflow: hidden; }
.secure-notice .head { background: #B42318; color: #fff; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; padding: .45rem .8rem; display: flex; align-items: center; gap: .5rem; }
.secure-notice .body { padding: .7rem .8rem; font-size: .84rem; line-height: 1.45; color: #4B1A14; }
.secure-notice .cite { font-size: .74rem; color: #7A2E25; border-top: 1px solid #F0C9C4; padding-top: .4rem; margin-top: .5rem; font-weight: 600; }

.mock-note { font-size: .8rem; color: #5B6B7B; }
.callout { border-left: 4px solid #7A5300; background: #FBF0D9; color: #5A3E00; border-radius: 8px; padding: .75rem 1rem; }
.callout.green { border-left-color: var(--cda-green); background: #F2F9EF; color: #234F13; }
.callout.blue { border-left-color: var(--cda-blue); background: #EAF1F8; color: #17395E; }
.viewer-frame { background: #E9EDF2; border-radius: 8px; min-height: 380px; display: flex; align-items: center; justify-content: center; color: #5B6B7B; text-align: center; padding: 2rem; }
.check-list .form-check-label { font-size: 1rem; }
.email-preview { background: #fff; border: 1px solid #DCE2E8; border-radius: 8px; max-width: 600px; margin: 0 auto; overflow: hidden; }
@media (max-width: 575.98px) {
  .stat .value { font-size: 1.5rem; }
  h1.h3 { font-size: 1.4rem; }
}


/* ---- portal additions ---- */
:root { --cda-amber: #B7791F; --cda-red: #B42318; --cda-teal: #0F766E; }
.cda-brand-mark { height: 34px; width: auto; border-radius: 6px; background: #fff; padding: 2px 4px; }
.cda-nav .navbar-toggler { border-color: rgba(255,255,255,.35); padding: .3rem .5rem; }
.cda-nav .avatar { text-decoration: none; }
.cda-nav .nav-link.btn-link { color: #D6E0EC; text-decoration: none; }
.viewer-frame { min-height: 70vh; background: #E9EDF2; display: block; padding: 0; }
.viewer-pdf { width: 100%; height: 78vh; border: 0; display: block; }
.viewer-img-wrap { overflow: auto; max-height: 78vh; text-align: center; padding: .5rem; }
.viewer-img { max-width: 100%; height: auto; }
.photo-tile { cursor: pointer; }
.photo-tile:hover { border-color: var(--cda-blue); }
.photo-tile .tile-btn { white-space: nowrap; }
.photo-tile .ic img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.splash { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #1F3A5F 0 48%, #F3F5F8 48%); padding: 1rem; }
.splash-card { width: 100%; max-width: 520px; }
.splash-logos { display: flex; gap: 1.25rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.splash-logos img { max-height: 64px; width: auto; max-width: 46%; }
.login-logos { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-bottom: 1rem; }
.login-logos img { max-height: 50px; width: auto; max-width: 46%; }
.secure-line { font-size: .78rem; color: #5B6B7B; text-align: center; line-height: 1.4; }
.secure-notice { border: 2px solid var(--cda-blue); border-radius: 8px; background: #EAF1F8; overflow: hidden; }
.secure-notice .head { background: var(--cda-blue); color: #fff; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; padding: .45rem .8rem; display: flex; align-items: center; gap: .5rem; }
.secure-notice .body { padding: .6rem .8rem; font-size: .84rem; line-height: 1.45; color: #17395E; }
.step-track { display: flex; justify-content: space-between; text-align: center; font-size: .85rem; }
.step-track .dot { width: 14px; height: 14px; border-radius: 50%; margin: 0 auto .25rem; background: #DEE2E6; }
.step-track .on .dot { background: var(--cda-green); }
.step-track .on { font-weight: 600; }
.nav-tabs.scroll-x { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
.nav-tabs.scroll-x .nav-link { white-space: nowrap; }
.nav-tabs .count { display: inline-block; min-width: 1.6em; padding: .1em .5em; border-radius: 999px; background: #E8ECF0; color: #1E2833; font-size: .78rem; font-weight: 600; margin-left: .35rem; }
.nav-tabs .nav-link.active .count { background: var(--cda-blue); color: #fff; }
.btn-needs { background: var(--cda-amber); color: #fff; }
.btn-needs:hover { background: #8F5E16; color: #fff; }

/* stat cards with a colored edge */
.stat.c-blue { border-left: 5px solid var(--cda-blue); }
.stat.c-green { border-left: 5px solid var(--cda-green); }
.stat.c-amber { border-left: 5px solid var(--cda-amber); }
.stat.c-purple { border-left: 5px solid #4A3F9B; }
.stat.c-teal { border-left: 5px solid var(--cda-teal); }
.stat.c-gray { border-left: 5px solid #8A97A4; }

/* next-step panel: the one thing to do on this case */
.next-step { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-radius: 12px; border: 1px solid transparent; margin-bottom: 1rem; }
.next-step .next-title { font-size: 1.15rem; font-weight: 700; }
.next-step .next-body { font-size: .95rem; }
.next-step .next-action .btn { font-size: 1.05rem; padding: .6rem 1.3rem; }
.next-green { background: #E6F4E0; border-color: #B9D9B0; color: #1E4A12; }
.next-blue { background: #E3EDF8; border-color: #B7CFE8; color: #123B66; }
.next-amber { background: #FBEBC8; border-color: #EBCB85; color: #5A3E00; }
.next-gray { background: #ECEFF2; border-color: #D5DBE1; color: #3A4652; }
.next-purple { background: #ECEAF8; border-color: #CFC9EE; color: #332A75; }

/* document slots and thumbnails */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.doc-slot { border: 1px solid #DCE2E8; border-radius: 10px; background: #fff; padding: .6rem .7rem; height: auto; }
.doc-slot.missing { border-color: #EBB7B1; background: #FFF8F7; }
.doc-slot.has { border-color: #B9D9B0; }
.doc-slot-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .45rem; font-size: .9rem; }
.doc-slot-body { display: flex; flex-wrap: wrap; gap: .5rem; }
.doc-tile, .doc-add { width: 96px; border: 1px solid #DCE2E8; border-radius: 8px; background: #F8FAFC; padding: 0; display: flex; flex-direction: column; align-items: center; cursor: pointer; color: inherit; text-decoration: none; overflow: hidden; }
.doc-tile:hover, .doc-add:hover { border-color: var(--cda-blue); box-shadow: 0 0 0 2px rgba(27,94,158,.15); }
.doc-tile .doc-thumb { width: 96px; height: 96px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid #E8ECF0; }
.doc-tile .doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-tile .doc-ph { color: #8A97A4; }
.doc-tile .doc-cap { font-size: .68rem; color: #5B6B7B; padding: .3rem .25rem; text-align: center; line-height: 1.2; }
.doc-add { height: 128px; border-style: dashed; border-color: #A9B6C3; justify-content: center; gap: .3rem; color: var(--cda-blue); margin: 0; }
.doc-add .doc-add-ic { width: 44px; height: 44px; border-radius: 8px; background: #EAF1F8; display: inline-flex; align-items: center; justify-content: center; }
.doc-add-form { margin: 0; }
.doc-add.uploading { opacity: .5; pointer-events: none; }

/* payment list */
.pay-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .6rem 0; border-top: 1px solid #E8ECF0; }
.pay-row:first-child { border-top: 0; }
.pay-row .pay-num { font-weight: 700; min-width: 9rem; }

/* history */
.history-toggle { font-size: .9rem; }
.activity .item { font-size: .85rem; }

/* ROI chart */
.roi-bar { height: 22px; border-radius: 6px; background: #E8ECF0; overflow: hidden; }
.roi-bar > span { display: block; height: 100%; }
.roi-bar .gap { background: var(--cda-blue); }
.roi-bar .value { background: var(--cda-green); }

@media (max-width: 575.98px) {
  .stat .value { font-size: 1.4rem; }
  .doc-grid { grid-template-columns: 1fr; }
  .next-step .next-action { width: 100%; }
  .next-step .next-action .btn { width: 100%; }
}
.report-row { display: grid; grid-template-columns: 48px 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.25rem; }
@media (max-width: 575.98px) { .report-row { grid-template-columns: 48px 1fr; } .report-row > div:last-child { grid-column: 1 / -1; } }

/* ---- round 3 ---- */
.form-control, .form-select, .input-group-text { background-color: #fff; }
.form-control:disabled, .form-control[readonly] { background-color: #EEF1F4; }
.form-control::placeholder { color: #A3AEB9; }
.doc-slot.missing { border: 2px solid #D9433A; background: #FFF4F3; }
.doc-slot.missing .doc-slot-head span:last-child { color: #B42318; font-weight: 700; }
.photo-tile.is-invalid { border: 2px solid #D9433A; background: #FFF4F3; }
.photo-tile.is-invalid .tile-help { color: #B42318; font-weight: 600; }
.photo-tile .ic .ok { color: #2E6B1F; }
.form-control.is-invalid, .form-select.is-invalid { border-width: 2px; }
.invalid-note { color: #B42318; font-weight: 600; }
.typeahead { position: relative; }
.typeahead-list { position: absolute; z-index: 1050; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid #C9D2DC; border-radius: 0 0 8px 8px; box-shadow: 0 8px 20px rgba(0,0,0,.12); max-height: 280px; overflow: auto; display: none; }
.typeahead-list.show { display: block; }
.typeahead-item { padding: .5rem .75rem; cursor: pointer; border-top: 1px solid #EEF1F4; }
.typeahead-item:hover, .typeahead-item.active { background: #EAF1F8; }
.typeahead-item .sub { font-size: .8rem; color: #5B6B7B; }
.prop-info { font-size: .85rem; background: #EAF1F8; border-left: 4px solid var(--cda-blue); border-radius: 6px; padding: .45rem .7rem; color: #17395E; }
.prop-info .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #5B6B7B; }

/* ---- public pages ---- */
body.bare { background: #fff; }
.site-top { background: #fff; border-bottom: 1px solid #DCE2E8; position: sticky; top: 0; z-index: 10; }
.site-top nav a { color: #1E2833; text-decoration: none; }
.site-top nav a:hover { color: var(--cda-blue); }
.site-mark { height: 36px; width: auto; }
.site-name { font-weight: 700; color: var(--cda-navy); font-size: 1.1rem; }
.hero { background: linear-gradient(135deg, #1F3A5F 0%, #1B5E9E 100%); color: #fff; padding: 3.5rem 0; }
.hero-kicker { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin-bottom: .75rem; }
.hero-title { font-size: 2.1rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.hero-text { font-size: 1.1rem; opacity: .95; margin-bottom: 1.5rem; max-width: 640px; }
.hero .btn-primary { background: #fff; border-color: #fff; color: var(--cda-navy); font-weight: 600; }
.hero .btn-primary:hover { background: #EAF1F8; border-color: #EAF1F8; }
.hero .text-secondary { color: #D6E0EC !important; }
.hero-card { background: #fff; color: #1E2833; border-radius: 12px; padding: 1.5rem; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.hero-logos { display: flex; gap: 1.5rem; align-items: center; justify-content: center; }
.hero-logos img { max-height: 60px; width: auto; max-width: 45%; }
.section { padding: 3rem 0; }
.section-alt { background: #F3F5F8; }
.section-title { font-size: 1.6rem; font-weight: 700; color: var(--cda-navy); margin-bottom: 1.5rem; }
.info-card { background: #fff; border: 1px solid #DCE2E8; border-radius: 12px; padding: 1.5rem; height: 100%; }
.info-card p { color: #3A4652; }
.info-ic { width: 48px; height: 48px; border-radius: 10px; color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.step { background: #fff; border: 1px solid #DCE2E8; border-radius: 12px; padding: 1.25rem; height: 100%; }
.step-n { width: 36px; height: 36px; border-radius: 50%; background: var(--cda-green); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .75rem; }
.site-foot { background: var(--cda-navy); color: #D6E0EC; padding: 1.5rem 0; }
.site-foot a { color: #fff; }
@media (max-width: 767.98px) { .hero { padding: 2.25rem 0; } .hero-title { font-size: 1.6rem; } }
.hero-card .text-secondary { color: #5B6B7B !important; }
