.internal-page { color: #263746; background: #f5f7f8; }
.internal-page main { min-height: calc(100vh - 190px); padding: clamp(1.5rem, 4vw, 3.5rem) 1rem; }
.page-container { width: min(1180px, 100%); margin: 0 auto; }
.page-container-narrow { width: min(520px, 100%); }
.page-container-form { width: min(800px, 100%); }
.page-header { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-end; margin-bottom: 1.75rem; }
.page-title { margin: 0; color: #002855; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; }
.page-intro { margin: .55rem 0 0; color: #566874; line-height: 1.6; }
.back-link { display: inline-flex; margin-bottom: 1rem; color: #006f91; font-weight: 650; text-decoration: none; }
.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.content-card { margin-bottom: 1.5rem; padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid #dce3e6; border-radius: 8px; background: #fff; box-shadow: 0 3px 14px rgba(0, 40, 85, .045); }
.content-card h2 { margin: 0 0 1.25rem; color: #002855; font-size: 1.3rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; margin: 0; }
.detail-item { min-width: 0; }
.detail-item-wide { grid-column: 1 / -1; }
.detail-grid dt { margin-bottom: .3rem; color: #566874; font-size: .8rem; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.detail-grid dd { margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.internal-form p, .form-group { margin: 0 0 1.15rem; }
.internal-form label, .form-label { display: block; margin-bottom: .4rem; color: #002855; font-weight: 700; }
.internal-form input:not([type="checkbox"]):not([type="radio"]), .internal-form select, .internal-form textarea, .form-control { width: 100%; box-sizing: border-box; padding: .7rem .8rem; border: 1px solid #b9c6cc; border-radius: 6px; color: #263746; background: #fff; font: inherit; }
.internal-form textarea { resize: vertical; }
.internal-form input:focus, .internal-form select:focus, .internal-form textarea:focus { outline: 3px solid rgba(0, 133, 173, .2); border-color: #0085ad; }
.internal-form .helptext { display: block; margin-top: .4rem; color: #657680; font-size: .85rem; }
.internal-form .errorlist { margin: .35rem 0; color: #b42318; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(180px, .75fr); gap: 0 1.25rem; }
.form-group-wide { grid-column: 1 / -1; }
.form-help { display: block; margin-top: .4rem; color: #657680; font-size: .85rem; line-height: 1.45; }
.field-errors { margin: .4rem 0 0; padding: 0; color: #b42318; font-size: .86rem; list-style: none; }
.field-errors li { margin: .2rem 0; }
.form-actions { display: flex; gap: .75rem; align-items: center; margin-top: .4rem; padding-top: 1.35rem; border-top: 1px solid #e1e7e9; }
.page-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.context-note { margin: 0 0 1.25rem; padding: .75rem 1rem; border-left: 4px solid #0085ad; border-radius: 6px; color: #3d535f; background: #eef7f8; }
.empty-state { margin: 0; padding: 2rem; color: #566874; text-align: center; }
.checkbox-group label { display: flex; gap: .6rem; align-items: center; }
.checkbox-group input { width: 1.1rem; height: 1.1rem; accent-color: #0085ad; }
.button { display: inline-flex; justify-content: center; align-items: center; padding: .68rem 1rem; border: 1px solid transparent; border-radius: 7px; font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; }
.button-primary { color: #fff; background: #0085ad; }
.button-primary:hover { background: #006f91; }
.button-secondary { color: #002855; border-color: #9fb0b9; background: #fff; }
.button-secondary:hover { border-color: #0085ad; color: #006f91; }
.button-danger { color: #fff; background: #f9423a; }
.button-danger:hover { background: #d8322b; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.filter-bar .form-group { flex: 1 1 220px; margin: 0; }
.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.data-table { margin: 0; border-collapse: collapse; background: #fff; }
.data-table th, .data-table td { padding: .85rem 1rem; border: 0; border-bottom: 1px solid #e1e7e9; vertical-align: top; }
.data-table th { color: #002855; background: #edf4f5; font-size: .82rem; letter-spacing: .025em; white-space: nowrap; }
.data-table tbody tr:hover { background: #f8fbfb; }
.data-table a { color: #006f91; font-weight: 700; }
.status-badge { display: inline-flex; padding: .25rem .55rem; border-radius: 999px; color: #334752; background: #e7edef; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.status-new { color: #005b78; background: #d9f1f5; }
.status-assigned, .status-contacted { color: #634a00; background: #fff0bd; }
.status-interested, .status-attended, .status-member { color: #17623a; background: #dff3e7; }
.status-closed { color: #7d2b27; background: #fde5e3; }
.status-draft { color: #425866; background: #e7edef; }
.status-sent { color: #005b78; background: #d9f1f5; }
.status-paid { color: #17623a; background: #dff3e7; }
.status-reminder_sent { color: #634a00; background: #fff0bd; }
.status-cancelled { color: #7d2b27; background: #fde5e3; }
.choices { margin-bottom: 0; }
.choices__inner { min-height: 44px; box-sizing: border-box; padding: .35rem .8rem; border: 1px solid #b9c6cc; border-radius: 6px; background: #fff; font-size: 1rem; }
.is-focused .choices__inner, .is-open .choices__inner { border-color: #0085ad; box-shadow: 0 0 0 3px rgba(0, 133, 173, .2); }
.choices__list--dropdown, .choices__list[aria-expanded] { z-index: 20; border-color: #b9c6cc; }
.form-alert { margin: 0 0 1.25rem; padding: .8rem 1rem; border-left: 4px solid #f9423a; border-radius: 6px; color: #842b26; background: #fff0ef; }
.invoice-validation { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid #e1e7e9; }
.invoice-validation h2 { margin-bottom: .85rem; }
.validation-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin-bottom: 1rem; }
.validation-summary span { padding: .7rem; border: 1px solid #dce3e6; border-radius: 6px; color: #52616b; background: #f8fbfb; }
.validation-summary strong { display: block; color: #002855; font-size: 1.25rem; }
.validation-candidate { padding: .85rem 0; border-top: 1px solid #e1e7e9; }
.validation-candidate h3 { margin: 0 0 .55rem; color: #002855; font-size: 1rem; }
.validation-candidate h3 small { color: #687983; font-size: .85rem; font-weight: 500; }
.validation-issues { display: grid; gap: .45rem; margin: 0 0 .8rem; padding: 0; list-style: none; }
.validation-issue { display: flex; gap: .65rem; align-items: flex-start; padding: .55rem .7rem; border-radius: 6px; }
.validation-error { color: #842b26; background: #fff0ef; }
.validation-warning { color: #6c5100; background: #fff7dc; }
.validation-info { color: #315864; background: #eef7f8; }
.validation-badge { min-width: 5.25rem; justify-content: center; color: inherit; background: rgba(255, 255, 255, .65); }
.validation-ok { margin: 0; padding: .75rem 1rem; border-left: 4px solid #0085ad; border-radius: 6px; color: #315864; background: #eef7f8; }
.login-card { margin-top: clamp(1rem, 6vw, 4rem); }
.report-filters { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 0 1rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.kpi-card { display: flex; flex-direction: column; gap: .4rem; }
.kpi-card span { color: #566874; font-size: .85rem; font-weight: 700; }
.kpi-card strong { color: #002855; font-size: 2rem; }
.report-scope-summary { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; margin: -.45rem 0 1.5rem; padding: .8rem 1rem; border-radius: 7px; color: #52616b; background: #edf4f5; }
.report-scope-summary strong { color: #002855; }
.status-overview { padding-block: 1.25rem; }
.status-summary { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .6rem; }
.status-summary span { display: flex; flex-direction: column; gap: .2rem; padding: .65rem; border-radius: 6px; color: #566874; background: #f5f8f9; font-size: .82rem; }
.status-summary strong { color: #002855; font-size: 1.25rem; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.chart-card { min-width: 0; }
.chart-card h2 { margin-bottom: .5rem; }
.chart-description { min-height: 2.7rem; margin: 0 0 .75rem; color: #657680; font-size: .88rem; line-height: 1.45; }
.chart-canvas-wrap { position: relative; height: 260px; margin: .5rem 0 1rem; }
.chart-canvas-wide { height: 280px; }
.chart-counts { display: grid; gap: .35rem; margin: 0; padding: .75rem 0 0; border-top: 1px solid #e1e7e9; list-style: none; }
.chart-counts li { display: flex; justify-content: space-between; gap: 1rem; color: #52616b; }
.chart-counts strong { color: #002855; }
.compact-data-table { margin-top: 1rem; }
.follow-up-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.follow-up-grid p { display: flex; flex-direction: column; gap: .35rem; margin: 0; padding: 1rem; border-radius: 7px; background: #f5f8f9; }
.follow-up-grid strong { color: #002855; font-size: 1.65rem; }
.follow-up-grid span { color: #566874; }
.follow-up-grid a { color: #006f91; font-weight: 700; }
.table-heading { padding: 1.25rem 1rem 0; }
.handling-card { border-left: 5px solid #f9423a; }
.handling-card p { max-width: 760px; line-height: 1.6; }
.help-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.help-main { min-width: 0; }
.help-sidebar { position: sticky; top: 110px; padding: 1.25rem; }
.help-sidebar h2, .help-toc h2 { margin-top: 0; font-size: 1.05rem; }
.help-sidebar nav { display: grid; gap: .65rem; }
.help-sidebar a, .help-toc a { color: #006f91; font-weight: 700; text-decoration: none; }
.help-sidebar a:hover, .help-toc a:hover { text-decoration: underline; }
.help-toc ul { columns: 2; margin-bottom: 0; padding-left: 1.25rem; }
.help-section { scroll-margin-top: 110px; line-height: 1.6; }
.help-section h2 { margin-top: 0; }
.help-section h3 { margin-top: 1.4rem; color: #002855; }
.help-section + .help-section { margin-top: 1rem; }
.notice { margin-top: 1rem; padding: .85rem 1rem; border-left: 4px solid #0085ad; border-radius: 6px; background: #eef7f8; }
.notice-warning { border-left-color: #f9423a; background: #fff5f3; }
@media (max-width: 700px) {
    .page-header { display: block; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-item-wide { grid-column: auto; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group-wide { grid-column: auto; }
    .form-actions { align-items: stretch; flex-direction: column; }
    .form-actions .button { width: 100%; box-sizing: border-box; }
    .content-card { padding: 1.15rem; }
    .report-filters, .kpi-grid, .follow-up-grid, .validation-summary, .status-summary, .chart-grid { grid-template-columns: 1fr; }
    .chart-canvas-wrap, .chart-canvas-wide { height: 230px; }
    .table-card { padding: 0; }
    .help-layout { display: block; }
    .help-sidebar { position: static; margin-bottom: 1rem; }
    .help-toc ul { columns: 1; }
}
@media (min-width: 701px) and (max-width: 1050px) {
    .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .status-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
