* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1f2937; background: #f3f4f6; }

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Left-side navigation sidebar (authenticated layout).
   body.with-sidebar uses a 2-column grid: sidebar on the left, content/footer on the right.
   Unauthenticated pages (login) leave the class off → fall back to the centered .container. */
body.with-sidebar {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-areas:
        "sidebar main"
        "sidebar footer";
    min-height: 100vh;
}
body.with-sidebar > main.container { grid-area: main; }
body.with-sidebar > .footer        { grid-area: footer; }
body.with-sidebar > .sidebar       { grid-area: sidebar; }

.sidebar {
    background: #1f2937; color: #f9fafb;
    padding: 1rem 1rem;
    display: flex; flex-direction: column; gap: 1rem;
    box-shadow: 1px 0 3px rgba(0,0,0,0.15);
}
.sidebar a { color: #f9fafb; }
.sidebar .brand a { font-weight: 600; font-size: 1.05rem; }
.sidebar .nav { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }
.sidebar .nav a { padding: 0.4rem 0.7rem; border-radius: 4px; font-size: 0.9rem; }
.sidebar .nav a:hover { background: #374151; text-decoration: none; }
.sidebar .nav .nav-section-label {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: #9ca3af; margin: 0.75rem 0.7rem 0.15rem; font-weight: 600;
}

.sidebar .userbox {
    display: flex; flex-direction: column; gap: 0.4rem;
    padding-top: 0.75rem; border-top: 1px solid #374151;
    font-size: 0.85rem;
}
.sidebar .userbox .user-link {
    color: #cbd5e1; text-decoration: none;
    padding: 0.3rem 0.7rem; border-radius: 4px;
}
.sidebar .userbox .user-link:hover { background: #374151; }
.sidebar .userbox .role {
    align-self: flex-start; margin: 0 0.7rem;
    padding: 0.1rem 0.5rem; background: #4b5563; border-radius: 999px;
    font-size: 0.7rem; text-transform: uppercase;
}
.sidebar .userbox form.logout { margin: 0 0.5rem; }
.sidebar .userbox button {
    width: 100%;
    background: transparent; border: 1px solid #6b7280; color: #f9fafb;
    padding: 0.4rem 0.7rem; border-radius: 4px; cursor: pointer;
    font-size: 0.85rem;
}
.sidebar .userbox button:hover { background: #374151; }

/* Default container (used for both anon pages and the main content area). On the
   authenticated grid the max-width is removed so content fills the remaining column. */
.container { max-width: 1200px; margin: 1.5rem auto; padding: 0 1.25rem; }
body.with-sidebar > main.container { max-width: none; margin: 1.5rem 1.25rem; }

.footer { text-align: center; color: #6b7280; padding: 1.5rem 0; }

/* Mobile: collapse the 2-column grid to a single column with the sidebar on top.
   Cheap-but-works for narrow screens; if proper hamburger UX is needed later, swap. */
@media (max-width: 768px) {
    body.with-sidebar {
        grid-template-columns: 1fr;
        grid-template-areas: "sidebar" "main" "footer";
    }
    .sidebar { box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
}

/* Login page */
.login-wrap { max-width: 380px; margin: 4rem auto; background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.login-wrap h1 { margin: 0 0 1.25rem; font-size: 1.5rem; text-align: center; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: #374151; }
.field input { width: 100%; padding: 0.55rem 0.75rem; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.95rem; }
.field input:focus { outline: 2px solid #2563eb; outline-offset: -1px; border-color: #2563eb; }
.btn-primary { width: 100%; padding: 0.65rem; background: #2563eb; color: white; border: none; border-radius: 4px; font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.btn-primary:hover { background: #1d4ed8; }
.error { background: #fee2e2; color: #991b1b; padding: 0.6rem 0.8rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.9rem; }

/* Page header */
.page-header { display: flex; align-items: baseline; gap: 1rem; margin: 0 0 1rem; }
.page-header h1 { margin: 0; font-size: 1.5rem; }
.muted { color: #6b7280; font-size: 0.9rem; }

/* Company tabs */
.company-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid #d1d5db; margin-bottom: 1rem; }
.tab { padding: 0.5rem 1rem; color: #4b5563; border-bottom: 2px solid transparent; }
.tab:hover { background: #e5e7eb; text-decoration: none; }
.tab-active { color: #1f2937; border-bottom-color: #2563eb; font-weight: 600; }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; align-items: center; background: #fff; padding: 0.75rem; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.filter-bar input[type=search], .filter-bar select { padding: 0.4rem 0.6rem; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.9rem; background: white; }
.filter-bar input[type=search] { flex: 1; min-width: 220px; }
.btn-secondary { padding: 0.45rem 0.9rem; background: #1f2937; color: white; border: none; border-radius: 4px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.btn-secondary:hover { background: #111827; }
.btn-link { color: #6b7280; font-size: 0.85rem; padding: 0.45rem 0.5rem; }

/* Data table */
.table-wrap { background: #fff; border-radius: 6px; overflow: auto; box-shadow: 0 1px 2px rgba(0,0,0,0.04); margin-bottom: 1rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table thead { background: #f9fafb; }
.data-table th { text-align: left; padding: 0.65rem 0.75rem; font-weight: 600; color: #374151; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.data-table th.num, .data-table td.num { text-align: right; }
.data-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid #f3f4f6; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover { background: #f9fafb; }
.data-table .empty { text-align: center; color: #9ca3af; padding: 2rem; }

/* Badges */
.badge { display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-gray { background: #e5e7eb; color: #374151; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

/* Pagination */
.pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; padding: 1rem 0; }
.pagination a { padding: 0.4rem 0.8rem; background: #fff; border: 1px solid #d1d5db; border-radius: 4px; }
.pagination a:hover { background: #f3f4f6; text-decoration: none; }
.pagination .disabled { padding: 0.4rem 0.8rem; color: #9ca3af; }
.pagination .pageinfo { color: #6b7280; font-size: 0.9rem; }

/* Member detail */
.detail-header { background: #fff; padding: 1.25rem; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); margin-bottom: 1rem; }
.detail-header h1 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem 1.5rem; font-size: 0.9rem; }
.detail-meta dt { color: #6b7280; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.detail-meta dd { margin: 0; font-weight: 500; color: #111827; }
.section { background: #fff; padding: 1.25rem; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); margin-bottom: 1rem; }
.section h2 { margin: 0 0 0.75rem; font-size: 1.1rem; color: #1f2937; }
.back-link { display: inline-block; color: #6b7280; }
.back-link:hover { color: #2563eb; }
.member-nav { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.member-nav-link { color: #2563eb; padding: 0.25rem 0.6rem; border: 1px solid #d1d5db; border-radius: 4px; background: white; }
.member-nav-link:hover { background: #eff6ff; text-decoration: none; }
.member-nav-link.disabled { color: #9ca3af; border-color: #e5e7eb; pointer-events: none; }
.kvgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.5rem 1.5rem; font-size: 0.9rem; }
.kvgrid > div { padding: 0.25rem 0; }
.kvgrid .k { color: #6b7280; font-size: 0.8rem; }
.kvgrid .v { font-weight: 500; }

/* Audit-status workflow buttons */
.audit-actions { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid #e5e7eb; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.9rem; }
.audit-actions form { margin: 0; }
.audit-actions .btn-link { color: #2563eb; cursor: pointer; background: none; border: none; padding: 0.25rem 0.5rem; font-size: 0.9rem; }
.audit-actions .btn-link:hover { background: #eff6ff; border-radius: 4px; }

/* HCC profile year-over-year table */
.profile-table td.profile-cell { padding: 0.4rem 0.55rem; vertical-align: top; }
.profile-table td.profile-cell .status { font-size: 0.85rem; font-weight: 500; }
.profile-table td.profile-cell .dx { margin-top: 0.2rem; font-size: 0.72rem; }
.profile-captured { background: #d1fae5; color: #065f46; }
.profile-captured-trumped { background: #dbeafe; color: #1e40af; }
.profile-trumped { background: #fef3c7; color: #92400e; }
.profile-missing { background: #f3f4f6; color: #6b7280; }
.profile-other { background: #f9fafb; color: #4b5563; }
.profile-legend { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.profile-cell-inline { padding: 0.15rem 0.5rem; border-radius: 3px; font-size: 0.72rem; font-weight: 500; }

/* HCC claims viewer (per-card details) */
.hcc-claims-details { margin-top: 0.5rem; padding: 0.4rem 0.6rem; background: #fafafa; border: 1px solid #e5e7eb; border-radius: 4px; }
.hcc-claims-details summary { cursor: pointer; color: #2563eb; user-select: none; }
.hcc-claims-details summary:hover { color: #1e40af; }
.hcc-claims-details[open] { background: #fff; }

.dos-warning { margin-top: 0.25rem; font-weight: 500; }

/* HCC cards (member detail edit) */
.hcc-cards { display: flex; flex-direction: column; gap: 0.75rem; }
.hcc-card { background: #fafafa; border: 1px solid #e5e7eb; border-radius: 6px; padding: 1rem; }
.hcc-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.hcc-id strong { font-size: 1.05rem; color: #111827; }
.hcc-desc { color: #4b5563; margin-left: 0.5rem; font-size: 0.95rem; }
.hcc-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.hcc-meta { display: flex; gap: 1.5rem; font-size: 0.85rem; flex-wrap: wrap; padding-bottom: 0.75rem; margin-bottom: 0.75rem; border-bottom: 1px solid #e5e7eb; }
.hcc-meta .k { color: #6b7280; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 0.4rem; }
.hcc-form-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.hcc-field { display: flex; flex-direction: column; min-width: 130px; flex: 1; }
.hcc-field-status { min-width: 220px; flex: 2; }
.hcc-field-wide { flex: 100; min-width: 240px; }
.hcc-field label { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.2rem; }
.hcc-field input, .hcc-field select, .hcc-field textarea { padding: 0.4rem 0.55rem; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.9rem; font-family: inherit; }
.hcc-field textarea { resize: vertical; }
.hcc-subform { background: #fef3c7; border: 1px solid #fcd34d; border-radius: 4px; padding: 0.75rem; margin: 0.5rem 0; }
.billing-fields.hcc-subform { background: #d1fae5; border-color: #6ee7b7; }
.hcc-subform-label { font-weight: 600; font-size: 0.85rem; color: #92400e; margin-bottom: 0.5rem; }
.billing-fields .hcc-subform-label { color: #065f46; }
.hcc-form-actions { display: flex; justify-content: flex-end; margin-top: 0.5rem; }

/* Legacy inline-edit table styles (kept for now in case anything references them) */
.edit-table .small { font-size: 0.78rem; color: #6b7280; }
.edit-table select.status-select { padding: 0.3rem 0.4rem; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.85rem; max-width: 200px; }
.edit-table textarea.notes-input { width: 100%; min-width: 180px; padding: 0.3rem 0.4rem; border: 1px solid #d1d5db; border-radius: 4px; font-family: inherit; font-size: 0.85rem; resize: vertical; }
.edit-table input.dos-input, .edit-table input.cpt-input { padding: 0.3rem 0.4rem; border: 1px solid #d1d5db; border-radius: 4px; font-size: 0.85rem; width: 90px; }
.edit-table .btn-small { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

/* Inline assignment dropdown on member detail */
.inline-assign { margin: 0; }
.inline-assign select { padding: 0.25rem 0.4rem; font-size: 0.85rem; border: 1px solid #d1d5db; border-radius: 3px; background: white; max-width: 220px; }

/* Add coder finding form */
.add-finding-form { background: #f3f4f6; padding: 0.75rem; border-radius: 4px; margin-bottom: 1rem; border: 1px dashed #d1d5db; }
.add-finding-form .hcc-form-row { margin-bottom: 0; }

/* Flash messages */
.flash { padding: 0.7rem 1rem; border-radius: 4px; margin-bottom: 1rem; font-size: 0.9rem; }
.flash-ok { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.flash-err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-warn { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.cell-action-group-billing { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }

/* Dashboard cards (legacy) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.card { background: #fff; border-radius: 8px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.card .label { font-size: 0.8rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; }
.card .value { font-size: 2rem; font-weight: 700; margin-top: 0.25rem; color: #111827; }
.card .sublabel { font-size: 0.85rem; color: #6b7280; margin-top: 0.25rem; }

/* Per-company dashboard cards */
.company-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.company-card { background: #fff; padding: 1.5rem; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.company-card-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.company-card-header h2 { margin: 0; font-size: 1.25rem; color: #111827; }
.company-card .small { font-size: 0.85rem; }

.stat-row { display: flex; gap: 2rem; margin-bottom: 1.25rem; }
.stat-row .stat { flex: 1; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: #111827; line-height: 1.1; }
.stat-label { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.15rem; }

.audit-bar { margin-bottom: 1.25rem; }
.audit-segments { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #e5e7eb; }
.seg-completed { background: #10b981; }
.seg-in-progress { background: #3b82f6; }
.seg-pending { background: #d1d5db; }
.audit-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.8rem; color: #4b5563; margin-top: 0.5rem; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.3rem; vertical-align: middle; }
.dot-green { background: #10b981; }
.dot-blue { background: #3b82f6; }
.dot-gray { background: #d1d5db; }

.year-progress { display: flex; flex-direction: column; gap: 0.5rem; }
.year-row { display: grid; grid-template-columns: 110px 1fr 130px; gap: 0.75rem; align-items: center; }
.year-label { font-size: 0.85rem; color: #4b5563; font-weight: 500; }
.bar-track { background: #e5e7eb; height: 8px; border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar { height: 100%; transition: width 0.3s ease; }
.bar-green { background: #10b981; }
.bar-blue { background: #3b82f6; }
.bar-yellow { background: #f59e0b; }
.bar-gray { background: #9ca3af; }
.bar-counts { font-size: 0.85rem; color: #1f2937; text-align: right; }

/* HCC profile-by-year click-to-action cell + modal. The cell becomes a button
   styled to look like a table cell; the modal opens on click and posts to the
   same OnPostUpdateMissingHccAsync handler the legacy inline cards used. */
.profile-table td.profile-actionable { padding: 0.25rem; vertical-align: top; }
.cell-action {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    padding: 0.4rem 0.55rem;
    display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem;
    font: inherit;
    text-align: left;
    transition: border-color 0.1s, box-shadow 0.1s;
}
.cell-action:hover { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15); }
.cell-action .action-label { font-size: 0.85rem; font-weight: 600; }
.cell-action .queue-tag { font-size: 0.68rem; padding: 0.1rem 0.4rem; border-radius: 3px; font-weight: 500; }
.cell-action .queue-tag.billing { background: rgba(146, 64, 14, 0.15); color: #92400e; }
.cell-action .queue-tag.rec { background: rgba(30, 64, 175, 0.15); color: #1e40af; }
.cell-action-empty { background: #f9fafb; }
.cell-action-empty .action-label { color: #2563eb; }
.cell-action-billing { background: #fef3c7; }
.cell-action-billing .action-label { color: #92400e; }
.cell-action-rec { background: #dbeafe; }
.cell-action-rec .action-label { color: #1e40af; }
.cell-action-declined { background: #fee2e2; }
.cell-action-declined .action-label { color: #991b1b; }
.cell-action-other { background: #e5e7eb; }
.cell-action-other .action-label { color: #374151; }
.cell-action-inraps { background: #d1fae5; }
.cell-action-inraps .action-label { color: #065f46; }
.cell-action-legend {
    display: inline-flex; flex-direction: row; align-items: center; gap: 0.3rem;
    width: auto; padding: 0.15rem 0.5rem; cursor: default; font-size: 0.72rem;
}
.cell-action-legend:hover { border-color: transparent; box-shadow: none; }

/* Modal — overlay + card. Used by the HCC profile-by-year click-to-action flow. */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(17, 24, 39, 0.55);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 3rem 1rem;
    z-index: 1000;
    overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex; flex-direction: column;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}
.modal-header h2 { margin: 0; font-size: 1.05rem; color: #111827; }
.modal-close {
    background: none; border: none;
    font-size: 1.6rem; line-height: 1;
    cursor: pointer; color: #6b7280;
    padding: 0 0.25rem;
}
.modal-close:hover { color: #111827; }
.modal-context {
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex; gap: 1rem; flex-wrap: wrap;
    font-size: 0.85rem;
}
.modal-context-row .k {
    color: #6b7280; font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-right: 0.3rem;
}
#hcc-modal-form { padding: 1rem 1.25rem; }
.modal-claims {
    margin-top: 1rem;
    padding: 0.4rem 0.6rem;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}
.modal-claims summary { cursor: pointer; color: #2563eb; user-select: none; }
.modal-claims summary:hover { color: #1e40af; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}
body.modal-open { overflow: hidden; }

/* "Review recommendation" panel inside the modal — shown when the cell is for
   an HCC that already has a rec_queue row, lets the coder Accept/Decline. */
.modal-rec-review {
    margin: 0 1.25rem 1rem 1.25rem;
    padding: 0.75rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    margin-top: 1rem;
}
.modal-rec-review[hidden] { display: none; }
.modal-rec-review .rec-review-header {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 0.5rem;
}
.modal-rec-review .rec-review-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.5rem 1rem;
    font-size: 0.85rem;
}
.modal-rec-review .k {
    color: #6b7280; font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-right: 0.3rem;
}
.modal-rec-review .rec-review-notes {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}
.modal-rec-review .rec-review-text {
    background: #fff; padding: 0.4rem 0.6rem;
    border: 1px solid #dbeafe; border-radius: 4px;
    margin-top: 0.2rem;
    white-space: pre-wrap;
}
.modal-rec-review .rec-review-actions {
    display: flex; gap: 0.6rem; align-items: center;
    margin-top: 0.75rem;
}
.btn-accept {
    background: #d1fae5 !important; color: #065f46 !important;
    border-color: #6ee7b7 !important;
}
.btn-accept:hover { background: #a7f3d0 !important; }
.btn-decline { color: #991b1b !important; }
.btn-decline:hover { color: #7f1d1d !important; }

/* Collapsible sections (Recent provider claims / Rx / Labs on Member detail). */
.collapsible-section { padding: 0; }
.collapsible-section > summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.25rem;
    margin: 0;
    border-radius: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}
.collapsible-section > summary::-webkit-details-marker { display: none; }
.collapsible-section > summary::before {
    content: "▶";
    font-size: 0.75rem;
    color: #64748b;
    transition: transform 0.15s ease;
    display: inline-block;
}
.collapsible-section[open] > summary::before { transform: rotate(90deg); }
.collapsible-section > summary:hover { background: #f1f5f9; }
.collapsible-section[open] > summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.collapsible-section .collapsible-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}
.collapsible-section[open] > .table-wrap,
.collapsible-section[open] > p.muted {
    border: 1px solid #e5e7eb;
    border-top: none;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    padding: 1rem 1.25rem;
    background: #fff;
    margin: 0;
}

/* New finding year badge — distinguishes 2025-new vs 2026-new at a glance. */
.badge-year-2025 {
    background: #e0f2fe; color: #075985;
    border: 1px solid #bae6fd;
    padding: 0.15rem 0.5rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600;
}
.badge-year-2026 {
    background: #fef3c7; color: #92400e;
    border: 1px solid #fde68a;
    padding: 0.15rem 0.5rem; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600;
}

/* Coder finding form — conditional fields. Hidden initially; JS toggles them based on action picker. */
.cf-when-action,
.cf-billing-fields,
.cf-rec-fields { display: none; }

/* Coder finding form — auto-resolved HCC display + DOS warn state. */
.cf-hcc-display {
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #6b7280;
    min-height: 1.85rem;
    display: flex;
    align-items: center;
}
.cf-hcc-display.cf-hcc-ok    { background: #d1fae5; border-color: #6ee7b7; color: #065f46; font-weight: 600; }
.cf-hcc-display.cf-hcc-warn  { background: #fef3c7; border-color: #fde68a; color: #92400e; font-weight: 600; }
.cf-hcc-display.cf-hcc-empty { font-style: italic; }
input.dos-warn { border-color: #f59e0b !important; background: #fef3c7; }

/* Billing tracker — summary cards + row tinting. */
.tracker-summary {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    margin: 0.5rem 0 1rem;
}
.tracker-card {
    flex: 1; min-width: 130px;
    padding: 0.75rem 1rem; border-radius: 8px;
    text-align: center;
}
.tracker-card .tracker-num { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.tracker-card .tracker-lbl { font-size: 0.78rem; color: #555; margin-top: 0.1rem; }
.tracker-total   { background: #e8f5e9; }       .tracker-total   .tracker-num { color: #2e7d32; }
.tracker-mao     { background: #d4edda; }       .tracker-mao     .tracker-num { color: #155724; }
.tracker-claims  { background: #d1ecf1; }       .tracker-claims  .tracker-num { color: #0c5460; }
.tracker-raps    { background: #fff3cd; }       .tracker-raps    .tracker-num { color: #856404; }
.tracker-missing { background: #f8d7da; }       .tracker-missing .tracker-num { color: #721c24; }

.tracker-row-mao     { background: #f0f9f1 !important; }
.tracker-row-claims  { background: #f0f8fb !important; }
.tracker-row-raps    { background: #fffbf0 !important; }
.tracker-row-missing { background: #fdf3f4 !important; }

.badge-pending { background: #4caf50; color: #fff; }
.badge-sent    { background: #1565c0; color: #fff; }
