:root {
    --bg: #f4f7f9;
    --panel: #ffffff;
    --panel-soft: #f8fbfc;
    --text: #16222a;
    --muted: #64717d;
    --line: #dbe4ea;
    --line-strong: #c3d0d8;
    --primary: #0f6f7e;
    --primary-dark: #0b4d58;
    --primary-soft: #e8f6f8;
    --accent: #a56610;
    --accent-soft: #fff4df;
    --danger: #b42318;
    --danger-soft: #fff1f0;
    --ok: #067647;
    --ok-soft: #ecfdf3;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow-md: 0 10px 26px rgba(22, 34, 42, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
    background:
        linear-gradient(180deg, #f8fbfc 0, var(--bg) 310px);
    color: var(--text);
    font-size: 14px;
    line-height: 1.42;
}
a { color: var(--primary); text-decoration: none; font-weight: 650; }
a:hover { color: var(--primary-dark); }
h1, h2 { margin: 0 0 14px; letter-spacing: 0; }
h1 { font-size: 27px; font-weight: 750; line-height: 1.15; }
h2 { font-size: 18px; font-weight: 750; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 252px;
    padding: 20px 14px;
    background:
        linear-gradient(180deg, #103944 0%, #17242b 72%, #121a20 100%);
    color: white;
    box-shadow: 8px 0 28px rgba(18, 26, 32, .16);
    overflow-y: auto;
}
.brand {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 22px;
    padding: 10px 11px 16px;
    border-bottom: 1px solid rgba(255,255,255,.16);
    letter-spacing: .2px;
}
.sidebar nav { display: grid; gap: 5px; }
.sidebar a, .link-button {
    display: block;
    width: 100%;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #eef6f7;
    text-align: left;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.sidebar a:hover, .link-button:hover {
    background: rgba(255,255,255,.11);
    border-color: rgba(255,255,255,.14);
    color: white;
}
.logout-form { margin-top: 18px; }

.content { margin-left: 252px; padding: 26px; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted);
    background: rgba(255,255,255,.78);
    border: 1px solid rgba(219,228,234,.82);
    border-radius: 10px;
    padding: 13px 16px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(8px);
}
.topbar strong { color: var(--text); margin-right: 12px; font-size: 16px; }

.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.stats article, .form-card, .link-grid article, .two-cols article, .detail-header, .receipt-copy {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
}
.stats article {
    position: relative;
    overflow: hidden;
}
.stats article::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--primary);
}
.stats span { display: block; color: var(--muted); margin-bottom: 7px; font-size: 12px; font-weight: 750; text-transform: uppercase; }
.stats strong { font-size: 22px; letter-spacing: 0; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.actions, .action-line { display: flex; gap: 10px; margin: 0 0 18px; flex-wrap: wrap; }
.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-md);
}
.dashboard-hero p {
    color: var(--muted);
    margin: 6px 0 0;
}
.dashboard-stats {
    grid-template-columns: repeat(4, 1fr);
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.dashboard-panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
}
.help-grid {
    align-items: start;
}
.help-list {
    margin: 0;
    padding-left: 20px;
}
.help-list li {
    margin-bottom: 8px;
    line-height: 1.45;
}
.role-summary {
    min-width: 150px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    background: #f8fafc;
}
.role-summary strong {
    display: block;
    font-size: 30px;
}
.role-summary span {
    color: var(--muted);
    font-size: 13px;
}
.role-stats strong {
    font-size: 18px;
}
.permissions-table {
    min-width: 760px;
}
.permissions-table th:nth-child(1),
.permissions-table td:nth-child(1) {
    width: 230px;
}
.permissions-table th:nth-child(3),
.permissions-table td:nth-child(3) {
    width: 120px;
    text-align: center;
}
.user-control-table {
    min-width: 1250px;
    table-layout: fixed;
    font-size: 13px;
}
.user-control-table th,
.user-control-table td {
    padding: 7px 6px;
    overflow-wrap: anywhere;
}
.user-control-table th:nth-child(1),
.user-control-table td:nth-child(1) { width: 145px; }
.user-control-table th:nth-child(2),
.user-control-table td:nth-child(2) { width: 145px; }
.user-control-table th:nth-child(3),
.user-control-table td:nth-child(3) { width: 185px; }
.user-control-table th:nth-child(n+4):nth-child(-n+9),
.user-control-table td:nth-child(n+4):nth-child(-n+9) {
    width: 78px;
    text-align: center;
}
.user-control-table th:nth-child(10),
.user-control-table td:nth-child(10) {
    width: 300px;
    text-align: left;
}
.activity-table {
    min-width: 1050px;
    table-layout: fixed;
    font-size: 13px;
}
.activity-table th,
.activity-table td {
    overflow-wrap: anywhere;
}
.activity-table th:nth-child(1),
.activity-table td:nth-child(1) { width: 120px; }
.activity-table th:nth-child(2),
.activity-table td:nth-child(2) { width: 110px; }
.activity-table th:nth-child(3),
.activity-table td:nth-child(3) { width: 130px; }
.activity-table th:nth-child(4),
.activity-table td:nth-child(4) { width: 170px; }
.activity-table th:nth-child(6),
.activity-table td:nth-child(6) { width: 105px; }
.history-table {
    min-width: 980px;
    table-layout: fixed;
}
.history-table th,
.history-table td {
    overflow-wrap: anywhere;
}
.history-table th:nth-child(1),
.history-table td:nth-child(1) { width: 105px; }
.history-table th:nth-child(2),
.history-table td:nth-child(2) { width: 80px; }
.history-table th:nth-child(3),
.history-table td:nth-child(3) { width: 70px; }
.history-table th:nth-child(4),
.history-table td:nth-child(4) { width: 90px; }
.history-table th:nth-child(5),
.history-table td:nth-child(5) { width: 75px; }
.history-table th:nth-child(10),
.history-table td:nth-child(10) { width: 150px; }
.quality-section {
    margin-bottom: 16px;
}
.quality-table {
    min-width: 860px;
    table-layout: fixed;
}
.quality-table th:nth-child(1),
.quality-table td:nth-child(1) { width: 105px; }
.quality-table th:nth-child(2),
.quality-table td:nth-child(2) { width: 220px; }
.quality-table th:nth-child(4),
.quality-table td:nth-child(4) {
    width: 90px;
    text-align: center;
}
.quality-badge {
    display: inline-block;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}
.quality-critique {
    background: #fff1f0;
    color: var(--danger);
}
.quality-alerte {
    background: #fff8e6;
    color: var(--accent);
}
.quality-info {
    background: #eef3f6;
    color: #344054;
}
.financial-summary .dashboard-panel {
    margin-bottom: 16px;
}
.summary-grid {
    margin-bottom: 16px;
}
.summary-table {
    min-width: 760px;
}
.summary-table th,
.summary-table td {
    padding: 8px;
}
.passage-table {
    min-width: 1380px;
    table-layout: fixed;
}
.passage-table th,
.passage-table td {
    vertical-align: top;
}
.passage-table th:nth-child(1),
.passage-table td:nth-child(1) { width: 46px; }
.passage-table th:nth-child(2),
.passage-table td:nth-child(2) { width: 220px; }
.passage-table th:nth-child(3),
.passage-table td:nth-child(3) { width: 100px; }
.passage-table th:nth-child(4),
.passage-table td:nth-child(4),
.passage-table th:nth-child(5),
.passage-table td:nth-child(5),
.passage-table th:nth-child(6),
.passage-table td:nth-child(6) { width: 105px; }
.passage-table th:nth-child(7),
.passage-table td:nth-child(7) { width: 95px; }
.passage-table th:nth-child(8),
.passage-table td:nth-child(8) { width: 135px; }
.passage-table th:nth-child(9),
.passage-table td:nth-child(9) { width: 170px; }
.passage-table th:nth-child(10),
.passage-table td:nth-child(10) { width: 220px; }
.passage-control {
    margin-bottom: 14px;
}
.confirm-box {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff8e6;
    font-weight: 700;
}
.confirm-box input {
    width: auto;
    margin-right: 8px;
}
.permission-list {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.warning-row td {
    background: #fff8e6;
}
.dashboard-table {
    min-width: 620px;
}
.dashboard-table th,
.dashboard-table td {
    padding: 8px;
}
.payment-report-table {
    min-width: 1040px;
    table-layout: fixed;
}
.payment-report-table th,
.payment-report-table td {
    overflow-wrap: anywhere;
}
.payment-report-table th:nth-child(1),
.payment-report-table td:nth-child(1) { width: 105px; }
.payment-report-table th:nth-child(2),
.payment-report-table td:nth-child(2) { width: 210px; }
.payment-report-table th:nth-child(3),
.payment-report-table td:nth-child(3) { width: 70px; }
.payment-report-table th:nth-child(4),
.payment-report-table td:nth-child(4) { width: 105px; }
.payment-report-table th:nth-child(5),
.payment-report-table td:nth-child(5) { width: 95px; }
.payment-report-table th:nth-child(6),
.payment-report-table td:nth-child(6) { width: 95px; }
.payment-report-table th:nth-child(7),
.payment-report-table td:nth-child(7) { width: 90px; }
.payment-report-table th:nth-child(8),
.payment-report-table td:nth-child(8) { width: 105px; }
.payment-report-table th:nth-child(9),
.payment-report-table td:nth-child(9) { width: 85px; }
.wide-payment-report .payment-report-table {
    min-width: 1850px;
    font-size: 11.5px;
}
.wide-payment-report .payment-report-table th,
.wide-payment-report .payment-report-table td {
    padding: 8px 9px;
    white-space: nowrap;
}
.wide-payment-report .payment-report-table th:nth-child(1),
.wide-payment-report .payment-report-table td:nth-child(1) { width: 145px; }
.wide-payment-report .payment-report-table th:nth-child(2),
.wide-payment-report .payment-report-table td:nth-child(2) { width: 340px; }
.wide-payment-report .payment-report-table th:nth-child(3),
.wide-payment-report .payment-report-table td:nth-child(3) { width: 100px; }
.wide-payment-report .payment-report-table th:nth-child(4),
.wide-payment-report .payment-report-table td:nth-child(4) { width: 170px; }
.wide-payment-report .payment-report-table th:nth-child(5),
.wide-payment-report .payment-report-table td:nth-child(5) { width: 140px; }
.wide-payment-report .payment-report-table th:nth-child(6),
.wide-payment-report .payment-report-table td:nth-child(6) { width: 160px; }
.wide-payment-report .payment-report-table th:nth-child(7),
.wide-payment-report .payment-report-table td:nth-child(7) { width: 170px; }
.wide-payment-report .payment-report-table th:nth-child(8),
.wide-payment-report .payment-report-table td:nth-child(8) { width: 155px; }
.wide-payment-report .payment-report-table th:nth-child(9),
.wide-payment-report .payment-report-table td:nth-child(9) { width: 140px; }
.wide-payment-report .payment-report-table th:nth-child(10),
.wide-payment-report .payment-report-table td:nth-child(10) { width: 180px; }

.btn {
    display: inline-block;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 750;
    box-shadow: var(--shadow-sm);
    transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.btn.primary {
    background: linear-gradient(180deg, #128093, var(--primary));
    border-color: var(--primary);
    color: white;
}
.danger-btn {
    border-color: var(--danger);
    color: var(--danger);
}
.btn:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 14px rgba(15, 111, 126, .13);
    transform: translateY(-1px);
}
.mini-btn {
    display: inline-block;
    border: 1px solid var(--primary);
    border-radius: 7px;
    padding: 5px 8px;
    color: var(--primary);
    white-space: nowrap;
    font-weight: 750;
    font-size: 12px;
    transition: background .14s ease, border-color .14s ease;
}
.table-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.table-actions .mini-btn {
    font-size: 12px;
    padding: 5px 7px;
}
.action-view {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}
.action-pay {
    border-color: var(--ok);
    color: var(--ok);
    background: var(--ok-soft);
}
.action-state {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.action-danger {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-soft);
}
.cancelled-row td {
    color: var(--muted);
    text-decoration: line-through;
}
.cancelled-stamp {
    display: inline-block;
    margin-top: 4px;
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 3px 8px;
    font-size: 12px;
}
.students-table {
    min-width: 1320px;
    table-layout: fixed;
    font-size: 12px;
}
.students-table th,
.students-table td {
    padding: 8px 6px;
    overflow-wrap: anywhere;
}
.students-table th:nth-child(1),
.students-table td:nth-child(1) { width: 78px; }
.students-table th:nth-child(2),
.students-table td:nth-child(2) { width: 185px; }
.students-table th:nth-child(3),
.students-table td:nth-child(3) { width: 58px; }
.students-table th:nth-child(4),
.students-table td:nth-child(4) { width: 82px; }
.students-table th:nth-child(5),
.students-table td:nth-child(5),
.students-table th:nth-child(7),
.students-table td:nth-child(7),
.students-table th:nth-child(11),
.students-table td:nth-child(11),
.students-table th:nth-child(12),
.students-table td:nth-child(12) { width: 92px; }
.students-table th:nth-child(6),
.students-table td:nth-child(6) { width: 102px; }
.students-table th:nth-child(8),
.students-table td:nth-child(8),
.students-table th:nth-child(9),
.students-table td:nth-child(9),
.students-table th:nth-child(10),
.students-table td:nth-child(10) { width: 98px; }
.students-table th:nth-child(13),
.students-table td:nth-child(13) { width: 190px; }
.students-table .table-actions {
    gap: 4px;
    flex-wrap: nowrap;
}
.students-table .table-actions .mini-btn {
    font-size: 11px;
    padding: 4px 5px;
}
.section-block { margin-top: 18px; }
.report-stats { margin-bottom: 18px; }
.closure-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.subsection-title {
    margin: 18px 0 8px;
    font-size: 15px;
    color: var(--primary-dark);
}
.total-row th {
    background: #eef5f8;
    font-weight: 800;
}
.closure-table th,
.closure-table td,
.closure-debt-table th,
.closure-debt-table td {
    white-space: nowrap;
}
.cash-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cash-mode-table { min-width: 520px; }
.cash-payment-table {
    min-width: 1120px;
    font-size: 12px;
}
.cash-payment-table th,
.cash-payment-table td {
    padding: 6px;
}
.period-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.period-summary-table {
    min-width: 640px;
    font-size: 12px;
}
.period-payment-table {
    min-width: 1280px;
    font-size: 12px;
}
.period-payment-table th,
.period-payment-table td {
    padding: 6px;
}
.relance-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.relance-table {
    min-width: 1180px;
    font-size: 12px;
}
.relance-table th,
.relance-table td {
    padding: 6px;
    vertical-align: top;
}
.recouvrement-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.recouvrement-table {
    min-width: 1420px;
    font-size: 12px;
}
.recouvrement-table th,
.recouvrement-table td {
    padding: 6px;
    vertical-align: top;
}
.cash-report .cancelled-row td {
    text-decoration: none;
}
.locked-btn {
    background: #eef5f8;
    border-color: var(--primary);
    color: var(--primary-dark);
    cursor: default;
}
.status-pill {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.locked-pill {
    background: #e9f6fb;
    color: var(--primary-dark);
    border: 1px solid #b7dce8;
}
.reopened-pill {
    background: #fff7e6;
    color: var(--accent);
    border: 1px solid #f3d08c;
}
.closure-banner {
    border-color: var(--primary);
    background: #f3fafc;
}
.closure-banner h2 {
    margin: 8px 0;
}
.bordereau-caisse {
    background: #fff;
}
.bordereau-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.bordereau-grid article,
.bordereau-block {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}
.bordereau-grid h2,
.bordereau-block h2 {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--primary-dark);
}
.bordereau-table {
    width: 100%;
    font-size: 12px;
}
.bordereau-table th,
.bordereau-table td {
    padding: 6px 7px;
}
.bordereau-signatures {
    margin-top: 42px;
}
.cancellation-table {
    min-width: 1320px;
    font-size: 12px;
}
.cancellation-table th,
.cancellation-table td {
    padding: 6px;
    vertical-align: top;
}
.cancellation-table th:nth-child(10),
.cancellation-table td:nth-child(10) {
    min-width: 220px;
}
.direction-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.direction-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}
.direction-grid .dashboard-table {
    min-width: 620px;
    font-size: 12px;
}
.signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 34px;
}
.signature-grid div {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.signature-grid strong {
    display: block;
    border-top: 1px solid var(--text);
    margin-top: 42px;
    padding-top: 8px;
}
.signature-grid span {
    font-weight: 700;
    text-align: center;
}
.section-title-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.print-report-head {
    display: none;
    margin-bottom: 12px;
}
.always-visible-head { display: block; }
.school-print-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 10px;
    padding-bottom: 8px;
}
.school-print-brand img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}
.school-print-brand strong {
    display: block;
    font-size: 18px;
    margin-bottom: 3px;
}
.school-print-brand span {
    color: var(--muted);
    font-size: 12px;
}
.star-cell {
    width: 28px;
    text-align: center;
    color: var(--accent);
    font-weight: 800;
}
.special-row td { background: #fffaf0; }
.control-table { min-width: 980px; }
.main-control-table {
    min-width: 0;
    table-layout: fixed;
}
.main-control-table th,
.main-control-table td {
    padding: 7px 4px;
    overflow-wrap: anywhere;
}
.main-control-table th:nth-child(1),
.main-control-table td:nth-child(1) { width: 4%; }
.main-control-table th:nth-child(2),
.main-control-table td:nth-child(2) { width: 22%; }
.main-control-table th:nth-child(3),
.main-control-table td:nth-child(3) { width: 9%; }
.main-control-table th:nth-child(4),
.main-control-table td:nth-child(4),
.main-control-table th:nth-child(5),
.main-control-table td:nth-child(5),
.main-control-table th:nth-child(6),
.main-control-table td:nth-child(6),
.main-control-table th:nth-child(7),
.main-control-table td:nth-child(7) { width: 12.5%; }
.main-control-table th:nth-child(8),
.main-control-table td:nth-child(8) { width: 8.5%; }
.main-control-table th:nth-child(9),
.main-control-table td:nth-child(9) { width: 6.5%; }
.control-level {
    margin-top: 18px;
}
.control-level h2 {
    border-bottom: 2px solid var(--line);
    padding-bottom: 6px;
}
.control-class {
    margin: 12px 0 18px;
}
.control-class h3 {
    margin: 0 0 8px;
    font-size: 15px;
}
.echeancier-table { min-width: 1120px; }
.tranche-table { min-width: 860px; }
.tarif-table { min-width: 980px; }
.echeancier-print-head {
    border-bottom: 2px solid #111827;
    padding-bottom: 10px;
}
.echeancier-print-head h1 {
    margin-bottom: 4px;
}
.echeancier-print-head p {
    margin: 2px 0;
    color: var(--muted);
}
.parent-statement {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow-md);
}
.student-profile {
    display: grid;
    gap: 16px;
}
.student-profile-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-md);
}
.student-profile-head h1 { font-size: 28px; }
.student-profile-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 600;
}
.student-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.student-panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
}
.student-panel h2 {
    color: var(--primary-dark);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}
.info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
}
.info-list div {
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}
.info-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    margin-bottom: 3px;
    text-transform: uppercase;
}
.info-list dd {
    margin: 0;
    font-weight: 750;
}
.student-stats {
    grid-template-columns: repeat(4, 1fr);
}
.student-payments-block .payment-report-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
.student-payments-block .payment-report-table th,
.student-payments-block .payment-report-table td {
    padding: 9px 7px;
}
.student-payments-block .payment-report-table th:nth-child(1),
.student-payments-block .payment-report-table td:nth-child(1) { width: 12%; }
.student-payments-block .payment-report-table th:nth-child(2),
.student-payments-block .payment-report-table td:nth-child(2) { width: 23%; }
.student-payments-block .payment-report-table th:nth-child(3),
.student-payments-block .payment-report-table td:nth-child(3) { width: 8%; }
.student-payments-block .payment-report-table th:nth-child(4),
.student-payments-block .payment-report-table td:nth-child(4) { width: 11%; }
.student-payments-block .payment-report-table th:nth-child(5),
.student-payments-block .payment-report-table td:nth-child(5) { width: 11%; }
.student-payments-block .payment-report-table th:nth-child(6),
.student-payments-block .payment-report-table td:nth-child(6) { width: 10%; }
.student-payments-block .payment-report-table th:nth-child(7),
.student-payments-block .payment-report-table td:nth-child(7) { width: 9%; }
.student-payments-block .payment-report-table th:nth-child(8),
.student-payments-block .payment-report-table td:nth-child(8) { width: 11%; }
.student-payments-block .payment-report-table th:nth-child(9),
.student-payments-block .payment-report-table td:nth-child(9) { width: 9%; }
.student-payments-block .payment-report-table th:nth-child(10),
.student-payments-block .payment-report-table td:nth-child(10) { width: 11%; }
.statement-head {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 14px;
    align-items: center;
    border-bottom: 2px solid var(--primary-dark);
    padding-bottom: 12px;
    margin-bottom: 14px;
}
.statement-head img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.statement-head h1 { margin-bottom: 4px; color: var(--primary-dark); }
.statement-head h2 { margin-top: 8px; }
.statement-head p { margin: 0; color: var(--muted); }
.statement-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.statement-info p {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px;
    margin: 0;
    background: var(--panel-soft);
}
.statement-info span {
    display: block;
    color: var(--muted);
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 750;
}
.statement-stats {
    grid-template-columns: repeat(4, 1fr);
}
.statement-table { min-width: 980px; }
.statement-payments-table {
    min-width: 900px;
    table-layout: fixed;
}
.statement-payments-table th,
.statement-payments-table td {
    overflow-wrap: anywhere;
}
.statement-payments-table th:nth-child(1),
.statement-payments-table td:nth-child(1) { width: 36px; }
.statement-payments-table th:nth-child(2),
.statement-payments-table td:nth-child(2) { width: 82px; }
.statement-payments-table th:nth-child(3),
.statement-payments-table td:nth-child(3) { width: 88px; }
.statement-payments-table th:nth-child(4),
.statement-payments-table td:nth-child(4) { width: 92px; }
.statement-payments-table th:nth-child(5),
.statement-payments-table td:nth-child(5),
.statement-payments-table th:nth-child(8),
.statement-payments-table td:nth-child(8),
.statement-payments-table th:nth-child(9),
.statement-payments-table td:nth-child(9) { width: 78px; }
.statement-payments-table th:nth-child(6),
.statement-payments-table td:nth-child(6),
.statement-payments-table th:nth-child(7),
.statement-payments-table td:nth-child(7),
.statement-payments-table th:nth-child(10),
.statement-payments-table td:nth-child(10) { width: 80px; }
.parent-followup h2 {
    margin: 16px 0 8px;
    font-size: 17px;
    color: var(--primary-dark);
}
.followup-table {
    min-width: 1080px;
    font-size: 12px;
}
.followup-table th,
.followup-table td {
    padding: 6px;
    vertical-align: top;
}
.statement-footer {
    display: grid;
    grid-template-columns: 1fr 180px;
    align-items: end;
    margin-top: 26px;
}
.statement-footer strong {
    border-top: 1px solid #111827;
    padding-top: 8px;
    text-align: center;
}
.statement-note,
.receipt-note {
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
    font-style: italic;
}
.parent-notice-page {
    max-width: 1120px;
    margin: 0 auto;
}
.notice-report-title {
    margin-bottom: 14px;
}
.notice-report-title p {
    margin: 0;
    color: var(--muted);
}
.parent-notice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.parent-notice {
    position: relative;
    background: white;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    min-height: 360px;
}
.parent-notice header {
    border-bottom: 1px solid #111827;
    padding-bottom: 6px;
    margin-bottom: 8px;
}
.notice-school {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 8px;
    align-items: center;
}
.notice-school img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}
.notice-school strong {
    display: block;
    font-size: 14px;
}
.notice-school span,
.parent-notice header p {
    color: var(--muted);
    font-size: 11px;
}
.parent-notice h2 {
    margin: 6px 0 2px;
    text-align: center;
    font-size: 16px;
}
.notice-identity,
.notice-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}
.notice-identity p,
.notice-amounts p {
    border: 1px solid var(--line);
    border-radius: 6px;
    margin: 0;
    padding: 6px;
}
.parent-notice span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 2px;
}
.parent-notice strong {
    font-size: 12px;
}
.notice-amounts {
    margin-top: 6px;
}
.notice-status {
    margin: 7px 0;
    padding: 6px;
    border-radius: 6px;
    font-weight: 700;
    text-align: center;
}
.notice-ok {
    background: #ecfdf3;
    color: var(--ok);
}
.notice-ko {
    background: #fff1f0;
    color: var(--danger);
}
.notice-tranches {
    border: 1px dashed var(--line);
    border-radius: 6px;
    padding: 5px;
    font-size: 10.5px;
}
.notice-tranches span {
    margin-bottom: 3px;
}
.notice-tranches em {
    display: inline-block;
    margin-right: 6px;
    font-style: normal;
}
.parent-notice footer {
    display: grid;
    grid-template-columns: 1fr 120px;
    align-items: end;
    gap: 10px;
    margin-top: 10px;
}
.parent-notice footer strong {
    border-top: 1px solid #111827;
    padding-top: 5px;
    text-align: center;
}
.notice-whatsapp {
    position: absolute;
    right: 12px;
    bottom: 12px;
}

.table-wrap {
    overflow-x: auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; min-width: 1180px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th {
    background: #eef6f8;
    font-size: 12px;
    color: #334853;
    font-weight: 800;
    text-transform: none;
}
tbody tr:hover td { background: #fbfdfe; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-weight: 750; }
.status-en_attente { background: #eef3f6; color: #344054; }
.status-partiel { background: #fff7e6; color: var(--accent); }
.status-paye { background: #ecfdf3; color: var(--ok); }
.status-retard { background: #fff1f0; color: var(--danger); }
.danger-text { color: var(--danger); font-weight: 700; }
.warning-text { color: var(--accent); font-weight: 700; }
.muted-text { color: var(--muted); }
.ok-text { color: var(--ok); font-weight: 700; }

.filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--shadow-sm);
}
.filters p, .form-card p { margin: 0 0 12px; }
label { display: block; font-weight: 750; margin-bottom: 6px; color: #30424c; }
input, select, textarea, .form-control {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    font: inherit;
    background: white;
    color: var(--text);
    transition: border-color .14s ease, box-shadow .14s ease;
}
input:focus, select:focus, textarea:focus, .form-control:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15,111,126,.13);
}
.hint, .messages p { color: var(--muted); }
.messages {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}
.messages p {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: white;
    box-shadow: var(--shadow-sm);
}
.messages .success { color: var(--ok); border-color: #b7e7c8; background: var(--ok-soft); }
.messages .error { color: var(--danger); border-color: #f2bbb6; background: var(--danger-soft); }
.payment-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 12px 0;
}
.student-select-helper {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: var(--panel-soft);
}
.student-select-helper .hint {
    margin: 6px 0 0;
    font-size: 12px;
}
.payment-summary p {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    margin: 0;
    background: white;
    box-shadow: var(--shadow-sm);
}
.payment-summary span { display: block; color: var(--muted); margin-bottom: 5px; }
.payment-warning {
    min-height: 20px;
    margin: 8px 0;
    font-weight: 700;
    color: var(--muted);
}
.payment-warning.danger {
    color: var(--danger);
}
.payment-warning.ok {
    color: var(--ok);
}

.detail-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.detail-header p { margin: 6px 0; color: var(--muted); }
.link-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.link-grid a {
    display: block;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    color: var(--primary-dark);
}
.link-grid a:hover { color: var(--primary); }

.receipt-page {
    max-width: 900px;
    margin: 0 auto;
    color: #111827;
}
.receipt-actions { justify-content: center; }
.receipt-copy {
    background: white;
    min-height: 385px;
    margin-bottom: 14px;
}
.receipt-head {
    display: grid;
    grid-template-columns: 84px 1fr 145px;
    gap: 12px;
    align-items: center;
    border-bottom: 2px solid #111827;
    margin-bottom: 10px;
    padding-bottom: 8px;
}
.receipt-head h1 { font-size: 20px; margin-bottom: 4px; }
.receipt-head p { margin: 2px 0; color: var(--muted); font-size: 13px; }
.receipt-logo {
    width: 74px;
    height: 74px;
    object-fit: contain;
}
.receipt-copy-label {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}
.receipt-title { text-align: center; margin-bottom: 10px; }
.receipt-title h2 { margin: 0; font-size: 18px; }
.receipt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.receipt-grid p { border: 1px solid var(--line); padding: 8px; margin: 0; border-radius: 6px; }
.receipt-grid span { display: block; color: var(--muted); margin-bottom: 5px; }
.receipt-grid strong { font-size: 14px; }
.receipt-footer {
    display: grid;
    grid-template-columns: 1fr 180px;
    align-items: end;
    margin-top: 18px;
    min-height: 42px;
}
.receipt-footer strong {
    display: block;
    border-top: 1px solid #111827;
    padding-top: 8px;
    text-align: center;
}
.cut-line {
    position: relative;
    margin: 10px 0;
    border-top: 1px dashed #667085;
    text-align: center;
}
.cut-line span {
    position: relative;
    top: -10px;
    background: var(--bg);
    color: var(--muted);
    padding: 0 10px;
    font-size: 12px;
}

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-box { width: min(420px, 100%); background: white; border: 1px solid var(--line); border-radius: 8px; padding: 26px; }
.permission-box { width: min(560px, 100%); }
.permission-box .actions { margin-top: 14px; }

@media (max-width: 900px) {
    .sidebar { position: static; width: auto; }
    .content { margin-left: 0; padding: 16px; }
    .stats, .two-cols, .link-grid, .filters, .payment-summary, .statement-info, .statement-stats, .student-sections, .student-stats, .info-list, .dashboard-stats, .dashboard-grid, .bordereau-grid { grid-template-columns: 1fr; }
    .dashboard-hero { display: grid; }
    .student-profile-head { display: grid; }
    .detail-header, .receipt-grid, .receipt-head { grid-template-columns: 1fr; display: grid; }
    .receipt-logo { margin: 0 auto; }
}

@media print {
    @page { size: A4 portrait; margin: 5mm; }
    html, body {
        width: 210mm;
        min-height: 297mm;
        background: white;
    }
    .no-print, .sidebar, .topbar, .messages { display: none !important; }
    .content { margin: 0; padding: 0; }
    .receipt-page {
        width: 200mm;
        max-width: none;
        margin: 0 auto;
        font-size: 11.5px;
        line-height: 1.2;
    }
    .receipt-copy {
        border: 1px solid #111827;
        border-radius: 0;
        height: 136mm;
        margin: 0;
        padding: 4.5mm 5.5mm;
        page-break-inside: avoid;
        break-inside: avoid;
        overflow: hidden;
    }
    .receipt-head {
        grid-template-columns: 54px 1fr 124px;
        display: grid;
        gap: 7px;
        margin-bottom: 4px;
        padding-bottom: 4px;
        border-bottom-width: 1px;
    }
    .receipt-logo {
        width: 48px;
        height: 48px;
    }
    .receipt-head h1 {
        font-size: 15.5px;
        margin: 0 0 2px;
    }
    .receipt-head p {
        font-size: 10.5px;
        margin: 1px 0;
    }
    .receipt-copy-label {
        border-radius: 0;
        padding: 4px;
        font-size: 10.5px;
    }
    .receipt-title {
        margin-bottom: 5px;
    }
    .receipt-title h2 {
        font-size: 14.5px;
    }
    .receipt-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }
    .receipt-grid p {
        border-radius: 0;
        padding: 3.5px 5px;
        min-height: 9.5mm;
    }
    .receipt-grid span {
        margin-bottom: 2px;
        font-size: 10px;
    }
    .receipt-grid strong {
        font-size: 11.5px;
    }
    .receipt-footer {
        grid-template-columns: 1fr 145px;
        min-height: 18mm;
        margin-top: 5mm;
    }
    .receipt-footer strong {
        padding-top: 4px;
        font-size: 11.5px;
    }
    .receipt-note {
        margin: 3px 0 0;
        font-size: 9px;
    }
    .cut-line { margin: 2mm 0; }
    .cut-line span { background: white; }
    .table-wrap, .stats article, .detail-header { border: 0; box-shadow: none; }
    .student-profile-head,
    .student-panel {
        border: 0;
        padding: 0;
    }
    .student-profile {
        gap: 5px;
        font-size: 9.5px;
    }
    .student-profile h1 {
        font-size: 15px;
        margin-bottom: 2px;
    }
    .student-profile h2 {
        font-size: 11px;
        margin-bottom: 4px;
    }
    .student-profile-head p {
        margin: 1px 0 0;
        font-size: 9.5px;
    }
    .student-sections {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .info-list {
        grid-template-columns: 1fr 1fr;
        gap: 3px 6px;
        font-size: 9px;
    }
    .info-list div {
        padding-bottom: 3px;
    }
    .info-list dt {
        font-size: 8.5px;
        margin-bottom: 1px;
    }
    .student-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        margin-bottom: 4px;
    }
    .student-stats article {
        padding: 4px;
        border: 1px solid #d8dee8;
    }
    .student-stats span { font-size: 8.5px; margin-bottom: 1px; }
    .student-stats strong { font-size: 9.5px; }
    .student-profile .section-block {
        margin-top: 4px;
    }
    .student-profile .section-title-line {
        margin-bottom: 3px;
    }
    .student-profile table {
        font-size: 8px;
    }
    .student-profile th,
    .student-profile td {
        padding: 3px 3px;
    }
    table { min-width: 0; font-size: 9px; }
    th, td { padding: 5px 4px; }
    .landscape-report .print-report-head { display: block; }
    .control-report .print-report-head { display: block; }
    .landscape-report .print-report-head h1 {
        font-size: 16px;
        margin: 0 0 4px;
    }
    .landscape-report .print-report-head p {
        margin: 2px 0;
        font-size: 10px;
    }
    .school-print-brand {
        gap: 7px;
        margin-bottom: 5px;
        padding-bottom: 4px;
        border-bottom: 1px solid #111827;
    }
    .school-print-brand img {
        width: 36px;
        height: 36px;
    }
    .school-print-brand strong {
        font-size: 12px;
        margin-bottom: 1px;
    }
    .school-print-brand span {
        font-size: 8.5px;
    }
    .landscape-report table { font-size: 8.5px; }
    .landscape-report th, .landscape-report td { padding: 4px 3px; }
    .payment-report-table {
        min-width: 0;
        font-size: 8px;
    }
    .payment-report-table th,
    .payment-report-table td {
        padding: 3px 2px;
    }
    .wide-payment-report .payment-report-table {
        min-width: 0;
        font-size: 8px;
    }
    .wide-payment-report .payment-report-table th,
    .wide-payment-report .payment-report-table td {
        padding: 3px 2px;
    }
    .control-table { font-size: 9px; }
    .control-table th, .control-table td { padding: 5px 4px; }
    .main-control-table {
        width: 100%;
        min-width: 0;
        font-size: 8px;
    }
    .main-control-table th,
    .main-control-table td {
        padding: 3px 1.5px;
    }
    .control-level { margin-top: 8px; break-inside: avoid; }
    .control-level h2 { font-size: 12px; margin-bottom: 5px; padding-bottom: 3px; }
    .control-class { margin: 6px 0 10px; break-inside: avoid; }
    .control-class h3 { font-size: 10px; margin-bottom: 3px; }
    .parent-notice-page {
        width: 200mm;
        max-width: none;
        margin: 0 auto;
    }
    .parent-notice-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3mm;
    }
    .parent-notice {
        height: 139mm;
        min-height: 0;
        padding: 3.2mm;
        border: 1px solid #111827;
        border-radius: 0;
        break-inside: avoid;
        page-break-inside: avoid;
        overflow: hidden;
        font-size: 10.2px;
    }
    .parent-notice header {
        padding-bottom: 2mm;
        margin-bottom: 2mm;
    }
    .notice-school {
        grid-template-columns: 29px 1fr;
        gap: 4px;
    }
    .notice-school img {
        width: 26px;
        height: 26px;
    }
    .notice-school strong {
        font-size: 11.2px;
    }
    .notice-school span,
    .parent-notice header p {
        font-size: 8.4px;
        margin: 0;
    }
    .parent-notice h2 {
        font-size: 13px;
        margin: 2px 0 1px;
    }
    .notice-identity,
    .notice-amounts {
        gap: 2mm;
    }
    .notice-identity p,
    .notice-amounts p {
        border-radius: 0;
        padding: 1.8mm;
    }
    .parent-notice span {
        font-size: 8.3px;
        margin-bottom: 1px;
    }
    .parent-notice strong {
        font-size: 9.8px;
    }
    .notice-amounts {
        margin-top: 2mm;
    }
    .notice-status {
        margin: 1.8mm 0;
        padding: 1.4mm;
        border-radius: 0;
        font-size: 10px;
    }
    .notice-tranches {
        border-radius: 0;
        padding: 1.3mm;
        font-size: 8.2px;
        line-height: 1.18;
    }
    .notice-tranches span {
        margin-bottom: 1mm;
    }
    .notice-tranches em {
        margin-right: 2mm;
    }
    .parent-notice footer {
        grid-template-columns: 1fr 92px;
        gap: 5px;
        margin-top: 2mm;
    }
    .parent-notice footer strong {
        padding-top: 1.7mm;
        font-size: 9.2px;
    }
    .echeancier-print-head {
        display: block;
        border-bottom: 1px solid #111827;
        margin-bottom: 5px;
        padding-bottom: 5px;
    }
    .echeancier-print-head h1 {
        font-size: 15px;
        margin: 0 0 3px;
        text-align: center;
    }
    .echeancier-print-head p {
        font-size: 9.5px;
        margin: 1px 0;
        text-align: center;
    }
    .echeancier-report-stats {
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
        margin-bottom: 5px;
    }
    .echeancier-report-stats article {
        border: 1px solid #d8dee8;
        padding: 4px;
    }
    .echeancier-report-stats span {
        font-size: 8px;
        margin-bottom: 1px;
    }
    .echeancier-report-stats strong {
        font-size: 8.5px;
    }
    .echeancier-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
        font-size: 8px;
    }
    .echeancier-table th,
    .echeancier-table td {
        padding: 3px 2px;
        overflow-wrap: anywhere;
    }
    .echeancier-table th:nth-child(1),
    .echeancier-table td:nth-child(1) { width: 4%; }
    .echeancier-table th:nth-child(2),
    .echeancier-table td:nth-child(2) { width: 24%; }
    .echeancier-table th:nth-child(3),
    .echeancier-table td:nth-child(3) { width: 8%; }
    .echeancier-table th:nth-child(5),
    .echeancier-table td:nth-child(5) { width: 13%; }
    .echeancier-table th:nth-child(6),
    .echeancier-table td:nth-child(6) { width: 10%; }
    .echeancier-table th:nth-child(7),
    .echeancier-table td:nth-child(7),
    .echeancier-table th:nth-child(8),
    .echeancier-table td:nth-child(8),
    .echeancier-table th:nth-child(9),
    .echeancier-table td:nth-child(9) { width: 12%; }
    .echeancier-table th:nth-child(10),
    .echeancier-table td:nth-child(10) { width: 10%; }
    .print-hide-echeancier {
        display: none !important;
    }
    .special-row td { background: white; }
    .parent-statement {
        border: 0;
        border-radius: 0;
        padding: 0;
    }
    .statement-head {
        grid-template-columns: 56px 1fr;
        gap: 10px;
        padding-bottom: 7px;
        margin-bottom: 8px;
    }
    .statement-head img {
        width: 50px;
        height: 50px;
    }
    .statement-head h1 { font-size: 16px; margin: 0 0 2px; }
    .statement-head h2 { font-size: 13px; margin: 4px 0 0; }
    .statement-head p { font-size: 10px; }
    .statement-info {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        margin-bottom: 8px;
    }
    .statement-info p {
        border-radius: 0;
        padding: 5px;
        font-size: 10px;
    }
    .statement-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        margin-bottom: 8px;
    }
    .statement-stats article {
        padding: 6px;
        border: 1px solid #d8dee8;
    }
    .statement-stats span { margin-bottom: 3px; font-size: 9px; }
    .statement-stats strong { font-size: 10px; }
    .statement-table { font-size: 9px; }
    .statement-payments-table {
        font-size: 8px;
        min-width: 0;
    }
    .statement-payments-table th,
    .statement-payments-table td {
        padding: 3px 2px;
    }
    .statement-note {
        margin: 5px 0;
        font-size: 9.5px;
    }
    .parent-followup h2 {
        font-size: 11px;
        margin: 6px 0 3px;
        border-bottom: 1px solid #111827;
        padding-bottom: 2px;
    }
    .parent-followup .dashboard-panel {
        border: 0;
        padding: 0;
        margin-bottom: 6px;
        break-inside: avoid;
    }
    .followup-table {
        min-width: 0;
        table-layout: fixed;
        font-size: 8px;
    }
    .followup-table th,
    .followup-table td {
        padding: 3px 2px;
        overflow-wrap: anywhere;
    }
    .statement-footer {
        margin-top: 16px;
        font-size: 10px;
    }
    .financial-summary .dashboard-panel {
        border: 0;
        padding: 0;
        margin-bottom: 7px;
        break-inside: avoid;
    }
    .financial-summary h2 {
        font-size: 11px;
        margin-bottom: 4px;
        border-bottom: 1px solid #111827;
        padding-bottom: 2px;
    }
    .financial-summary .report-stats {
        grid-template-columns: repeat(5, 1fr);
        gap: 3px;
        margin-bottom: 7px;
    }
    .financial-summary .report-stats article {
        padding: 4px;
        border: 1px solid #d8dee8;
    }
    .financial-summary .report-stats span {
        font-size: 7.5px;
        margin-bottom: 1px;
    }
    .financial-summary .report-stats strong {
        font-size: 8.5px;
    }
    .summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 7px;
    }
    .summary-table {
        min-width: 0;
        table-layout: fixed;
        font-size: 8px;
    }
    .summary-table th,
    .summary-table td {
        padding: 3px 2px;
        overflow-wrap: anywhere;
    }
    .period-report .dashboard-panel {
        border: 0;
        padding: 0;
        margin-bottom: 7px;
        break-inside: avoid;
    }
    .period-report h2 {
        font-size: 11px;
        margin-bottom: 4px;
        border-bottom: 1px solid #111827;
        padding-bottom: 2px;
    }
    .period-stats {
        grid-template-columns: repeat(5, 1fr);
        gap: 3px;
        margin-bottom: 7px;
    }
    .period-stats article {
        padding: 4px;
        border: 1px solid #d8dee8;
    }
    .period-stats span {
        font-size: 7.5px;
        margin-bottom: 1px;
    }
    .period-stats strong {
        font-size: 8.5px;
    }
    .period-summary-table,
    .period-payment-table {
        min-width: 0;
        table-layout: fixed;
        font-size: 7.8px;
    }
    .period-summary-table th,
    .period-summary-table td,
    .period-payment-table th,
    .period-payment-table td {
        padding: 3px 1.5px;
        overflow-wrap: anywhere;
    }
    .recouvrement-report .dashboard-panel {
        border: 0;
        padding: 0;
        margin-bottom: 7px;
    }
    .recouvrement-report h2 {
        font-size: 11px;
        margin-bottom: 4px;
        border-bottom: 1px solid #111827;
        padding-bottom: 2px;
    }
    .recouvrement-stats {
        grid-template-columns: repeat(6, 1fr);
        gap: 3px;
        margin-bottom: 7px;
    }
    .recouvrement-stats article {
        padding: 4px;
        border: 1px solid #d8dee8;
    }
    .recouvrement-stats span {
        font-size: 7px;
        margin-bottom: 1px;
    }
    .recouvrement-stats strong {
        font-size: 8px;
    }
    .recouvrement-table {
        min-width: 0;
        table-layout: fixed;
        font-size: 7px;
    }
    .recouvrement-table th,
    .recouvrement-table td {
        padding: 2.5px 1px;
        overflow-wrap: anywhere;
    }
    .bordereau-caisse {
        border: 0;
        padding: 0;
        font-size: 9px;
    }
    .bordereau-caisse .print-report-head h1 {
        font-size: 15px;
        margin: 2px 0;
    }
    .bordereau-caisse .print-report-head p {
        font-size: 9px;
        margin: 1px 0 4px;
    }
    .bordereau-grid {
        grid-template-columns: 1fr 1fr;
        gap: 5px;
        margin-bottom: 5px;
    }
    .bordereau-grid article,
    .bordereau-block {
        border: 1px solid #d8dee8;
        border-radius: 0;
        padding: 5px;
        margin-bottom: 5px;
        break-inside: avoid;
    }
    .bordereau-grid h2,
    .bordereau-block h2 {
        font-size: 10px;
        margin-bottom: 3px;
    }
    .bordereau-table {
        min-width: 0;
        table-layout: fixed;
        font-size: 8px;
    }
    .bordereau-table th,
    .bordereau-table td {
        padding: 3px 2px;
        overflow-wrap: anywhere;
    }
    .bordereau-signatures {
        margin-top: 16px;
        gap: 50px;
    }
    .bordereau-signatures div {
        min-height: 48px;
    }
    .bordereau-signatures strong {
        margin-top: 22px;
        padding-top: 5px;
    }
    .passage-report {
        border: 0;
        padding: 0;
    }
    .passage-control {
        grid-template-columns: repeat(6, 1fr);
        gap: 3px;
        margin-bottom: 6px;
    }
    .passage-control article {
        padding: 4px;
        border: 1px solid #d8dee8;
    }
    .passage-control span {
        font-size: 7.5px;
        margin-bottom: 1px;
    }
    .passage-control strong {
        font-size: 8.5px;
    }
    .passage-table {
        min-width: 0;
        table-layout: fixed;
        font-size: 8px;
    }
    .passage-table th,
    .passage-table td {
        padding: 3px 2px;
        overflow-wrap: anywhere;
    }
    .passage-table select {
        border: 0;
        padding: 0;
        font-size: 8px;
        appearance: none;
    }
    .quality-section {
        border: 0;
        padding: 0;
        margin-bottom: 7px;
        break-inside: avoid;
    }
    .quality-section h2 {
        font-size: 11px;
        margin-bottom: 4px;
        border-bottom: 1px solid #111827;
        padding-bottom: 2px;
    }
    .quality-table {
        min-width: 0;
        font-size: 8px;
    }
    .quality-table th,
    .quality-table td {
        padding: 3px 2px;
    }
    .quality-badge {
        border-radius: 0;
        padding: 2px 3px;
        font-size: 7px;
    }
}
