:root {
    --green: #0f7a4a;
    --green-dark: #083824;
    --blue: #2563eb;
    --amber: #f59e0b;
    --red: #dc2626;
    --ink: #162033;
    --muted: #6b7280;
    --soft: #f3f6fa;
    --line: #e2e8f0;
    --panel: #ffffff;
    --shadow: 0 18px 50px rgba(15, 23, 42, .08);
    --font-ui: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: "Poppins", "Inter", "Segoe UI", Arial, sans-serif;
}

.backup-panel {
    background: #fff;
    border: 1px solid #e0e6ef;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.backup-panel-head h2 {
    margin: 0 0 12px;
    color: #111827;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2.4vw, 2.1rem);
    font-weight: 900;
    letter-spacing: 0;
}

.backup-panel-head p {
    max-width: 620px;
    margin: 0;
    color: #5f6775;
    font-size: 1rem;
    line-height: 1.45;
}

.backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid #d9dee8;
}

.backup-action {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 1px solid #e1e6ee;
    border-radius: 7px;
    background: #fff;
    color: #172033;
    font-family: var(--font-display);
    font-weight: 800;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.backup-action:hover {
    transform: translateY(-1px);
    border-color: #b9c4d3;
    color: #111827;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .09);
}

.backup-action-primary {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #7c5cff 0%, #11b8d7 100%);
}

.backup-action-primary:hover {
    color: #fff;
}

.backup-restore {
    padding-top: 24px;
}

.backup-restore h3 {
    margin: 0 0 14px;
    color: #111827;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 900;
}

.backup-restore-form {
    display: flex;
    align-items: stretch;
    max-width: 720px;
}

.backup-restore-form .form-control {
    min-height: 52px;
    border-radius: 12px 0 0 12px;
    font-size: 1rem;
}

.backup-import-btn {
    min-width: 138px;
    border: 0;
    border-radius: 0 8px 8px 0;
    background: linear-gradient(135deg, #7c5cff 0%, #12b6d7 100%);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 900;
}

.backup-import-btn:hover,
.backup-import-btn:focus {
    color: #fff;
    filter: brightness(.98);
}

@media (max-width: 640px) {
    .backup-panel {
        padding: 18px;
    }

    .backup-actions,
    .backup-restore-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .backup-action,
    .backup-import-btn,
    .backup-restore-form .form-control {
        width: 100%;
        border-radius: 8px;
    }
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(37, 99, 235, .06), transparent 320px),
        var(--soft);
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.app-shell {
    min-height: 100vh;
    display: block;
}

.main {
    min-width: 0;
}

.topbar {
    min-height: 74px;
    display: grid;
    grid-template-columns: minmax(210px, auto) minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(226, 232, 240, .92);
    box-shadow: 0 12px 35px rgba(15, 23, 42, .05);
    backdrop-filter: blur(14px);
    padding: 12px 28px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-main,
.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-main {
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #102033;
    font-weight: 800;
    text-decoration: none;
    font-size: 1rem;
    white-space: nowrap;
}

.brand-logo-frame {
    flex: 0 0 54px;
    width: 54px;
    height: 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.brand-logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 3px;
}

.brand i {
    background: linear-gradient(135deg, var(--green), #19a66a);
    color: #fff;
    border-radius: 12px;
    padding: 11px;
    box-shadow: 0 10px 24px rgba(15, 122, 74, .22);
}

.topnav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.topnav::-webkit-scrollbar {
    display: none;
}

.topnav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    text-decoration: none;
    padding: 10px 13px;
    border-radius: 10px;
    font-weight: 650;
    font-size: .88rem;
    white-space: nowrap;
    flex: 0 0 auto;
}

.topnav-dropdown {
    display: inline-flex;
    align-items: center;
}

.topnav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    text-decoration: none;
    padding: 10px 13px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-weight: 650;
    font-size: .88rem;
    white-space: nowrap;
    flex: 0 0 auto;
}

.topnav a:hover,
.topnav a.active,
.topnav-dropdown-toggle:hover,
.topnav-dropdown-toggle.active {
    background: #ecfdf5;
    color: var(--green-dark);
    box-shadow: inset 0 0 0 1px rgba(15, 122, 74, .14);
}

.topnav a:hover i,
.topnav a.active i,
.topnav-dropdown-toggle:hover i,
.topnav-dropdown-toggle.active i {
    color: var(--green);
}

.secretariat-topnav {
    justify-content: center;
    overflow: visible;
    gap: 8px;
}

.secretariat-topnav a,
.secretariat-topnav .topnav-dropdown-toggle {
    flex: 0 1 auto;
    padding-left: 11px;
    padding-right: 11px;
    font-size: .84rem;
}

.topnav-dropdown-chevron {
    color: #94a3b8;
    font-size: .68rem;
}

.topnav-submenu {
    min-width: 220px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .14);
    padding: 8px;
}

.topnav-submenu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 9px;
    color: #334155;
    font-size: .86rem;
    font-weight: 700;
    padding: 9px 10px;
}

.topnav-submenu .dropdown-item.active,
.topnav-submenu .dropdown-item:hover {
    background: #ecfdf5;
    color: var(--green-dark);
}

.notification-area {
    position: relative;
}

.notification-button {
    width: 38px;
    height: 38px;
    position: relative;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #334155;
    font-size: 1rem;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.notification-button:hover,
.notification-button.show {
    color: var(--green-dark);
    background: #ecfdf5;
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 7px;
    width: 8px;
    height: 8px;
    display: block;
    overflow: hidden;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #16a34a;
    color: transparent;
    font-size: 0;
}

.notification-menu {
    width: min(360px, calc(100vw - 24px));
    max-height: calc(100dvh - 96px);
    padding: 6px 0;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
}

.notification-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px 12px;
    border-bottom: 1px solid rgba(226, 232, 240, .85);
    background: #fff;
}

.notification-menu-head strong {
    display: block;
    color: #0f172a;
    font-family: var(--font-display);
    font-weight: 900;
}

.notification-menu-head small {
    color: #64748b;
    font-weight: 700;
}

.notification-read-btn {
    color: var(--green-dark);
    font-weight: 900;
    text-decoration: none;
}

.notification-list {
    max-height: min(420px, calc(100dvh - 190px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.notification-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 10px;
    padding: 11px 14px;
    color: #0f172a;
    text-decoration: none;
    border-bottom: 1px solid rgba(226, 232, 240, .72);
    background: #fff;
}

.notification-item:hover {
    background: #f8fafc;
}

.notification-item.unread {
    background: #f7fef9;
}

.notification-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    align-self: start;
    margin-top: 1px;
    border-radius: 999px;
    background: #eef6ff;
    color: #2563eb;
    font-size: .72rem;
}

.notification-success {
    background: #e8f8ee;
    color: #15803d;
}

.notification-warning {
    background: #fff7df;
    color: #b45309;
}

.notification-danger {
    background: #fff0f0;
    color: #dc2626;
}

.notification-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.notification-copy strong {
    font-size: .86rem;
    font-weight: 900;
}

.notification-copy em {
    color: #475569;
    font-style: normal;
    font-size: .8rem;
    line-height: 1.35;
}

.notification-copy small {
    color: #94a3b8;
    font-size: .7rem;
    font-weight: 800;
}

.notification-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 28px 16px;
    color: #64748b;
    text-align: center;
    font-weight: 800;
}

.user-dropdown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    background: #fff;
    color: #162033;
    padding: 6px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.user-avatar {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: #eef6f1;
    color: var(--green);
}

.user-meta {
    display: grid;
    text-align: left;
    line-height: 1.12;
}

.user-meta strong {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .86rem;
}

.user-meta span {
    color: var(--muted);
    font-size: .72rem;
}

.user-chevron {
    color: #94a3b8;
    font-size: .72rem;
}

.user-menu {
    min-width: 286px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .16);
    padding: 10px;
    font-size: .88rem;
}

.user-menu .dropdown-item,
.user-menu .dropdown-item-text {
    border-radius: 8px;
    padding: 9px 10px;
}

.user-menu .dropdown-item-text {
    display: grid;
}

.user-menu-head {
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 11px;
    background: linear-gradient(135deg, #f8fafc, #eef6f1);
    border: 1px solid #e6edf5;
    border-radius: 12px;
}

.user-menu-head strong,
.user-menu-head small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-avatar {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: var(--green);
    box-shadow: inset 0 0 0 1px rgba(15, 122, 74, .12);
}

.user-menu small {
    color: var(--muted);
}

.logout-action {
    display: grid !important;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 11px;
    margin-top: 2px;
    border: 1px solid rgba(220, 38, 38, .18);
    background: linear-gradient(135deg, #fff7f7, #fff);
    color: #991b1b !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.logout-action:hover,
.logout-action:focus {
    transform: translateY(-1px);
    border-color: rgba(220, 38, 38, .36);
    background: linear-gradient(135deg, #fee2e2, #fff7f7);
    box-shadow: 0 14px 28px rgba(220, 38, 38, .14);
}

.logout-action-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: #dc2626;
    color: #fff;
    box-shadow: 0 10px 22px rgba(220, 38, 38, .24);
}

.logout-action-text {
    display: grid;
    line-height: 1.12;
}

.logout-action-text strong {
    font-size: .9rem;
}

.logout-action-text small {
    font-size: .72rem;
}

.logout-action-arrow {
    color: #ef4444;
    font-size: .78rem;
    transition: transform .18s ease;
}

.logout-action:hover .logout-action-arrow,
.logout-action:focus .logout-action-arrow {
    transform: translateX(3px);
}

.content {
    padding: 10px 24px 24px;
    max-width: 100vw;
}

.page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 12px;
}

.page-title h1 {
    color: #0f1f33;
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: .01em;
    margin: 0;
}

.page-title p {
    margin-top: 2px;
    color: #64748b !important;
    font-size: .78rem;
    font-weight: 500;
}

.secretariat-hero-title {
    align-items: center;
    min-height: 58px;
    margin: -10px -24px 10px;
    padding: 9px 32px 10px;
    background: #153665;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 8px 18px rgba(21, 54, 101, .12);
}

.secretariat-hero-title h1 {
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.08rem, 1.7vw, 1.45rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0;
    margin: 0;
}

.secretariat-hero-title h1 i {
    display: none;
}

.secretariat-hero-title p,
.secretariat-hero-title .text-muted {
    color: rgba(255, 255, 255, .88) !important;
    margin-top: 4px !important;
    font-size: clamp(.68rem, .85vw, .78rem);
    font-weight: 500;
    line-height: 1.15;
}

.card,
.stat-card {
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.card.mb-3:not(.table-card) {
    border-color: rgba(203, 213, 225, .72);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
    overflow: hidden;
}

.card.mb-3:not(.table-card) .card-body {
    padding: 18px;
}

.card-header {
    border-bottom-color: rgba(226, 232, 240, .9);
}

.stat-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(145deg, rgba(235, 248, 241, .96), rgba(255, 255, 255, .98));
    padding: 18px 18px 16px;
    min-height: 118px;
    border-radius: 14px;
    border-color: rgba(203, 213, 225, .78);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .075);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.row > [class*="col-"]:nth-child(2) .stat-card {
    background: linear-gradient(145deg, rgba(232, 242, 255, .96), rgba(255, 255, 255, .98));
}

.row > [class*="col-"]:nth-child(3) .stat-card {
    background: linear-gradient(145deg, rgba(255, 247, 226, .98), rgba(255, 255, 255, .98));
}

.row > [class*="col-"]:nth-child(4) .stat-card {
    background: linear-gradient(145deg, rgba(245, 239, 255, .96), rgba(255, 255, 255, .98));
}

.row > [class*="col-"]:nth-child(5) .stat-card {
    background: linear-gradient(145deg, rgba(255, 238, 238, .96), rgba(255, 255, 255, .98));
}

.row > [class*="col-"]:nth-child(6) .stat-card {
    background: linear-gradient(145deg, rgba(232, 250, 252, .96), rgba(255, 255, 255, .98));
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--green), #2563eb);
}

.stat-card::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 16px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(15, 122, 74, .1);
    color: rgba(15, 122, 74, .9);
    box-shadow: inset 0 0 0 1px rgba(15, 122, 74, .12);
    pointer-events: none;
    transition: transform .18s ease, background .18s ease;
}

.stat-card.has-stat-icon::after {
    display: none;
}

.stat-card-icon {
    position: absolute !important;
    right: 18px;
    top: 18px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(15, 122, 74, .1);
    color: rgba(15, 122, 74, .92);
    box-shadow: inset 0 0 0 1px rgba(15, 122, 74, .12);
    transition: transform .18s ease, background .18s ease, color .18s ease;
    text-align: center;
}

.stat-card-icon i {
    display: block;
    font-size: .92rem;
    line-height: 1 !important;
    width: 1em;
    height: 1em;
    margin: 0;
}

.row > [class*="col-"]:nth-child(2) .stat-card::after {
    background: rgba(37, 99, 235, .1);
    color: rgba(37, 99, 235, .9);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}

.row > [class*="col-"]:nth-child(2) .stat-card-icon {
    background: rgba(37, 99, 235, .1);
    color: rgba(37, 99, 235, .9);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}

.row > [class*="col-"]:nth-child(3) .stat-card::after {
    background: rgba(245, 158, 11, .13);
    color: rgba(180, 83, 9, .95);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .16);
}

.row > [class*="col-"]:nth-child(3) .stat-card-icon {
    background: rgba(245, 158, 11, .13);
    color: rgba(180, 83, 9, .95);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .16);
}

.row > [class*="col-"]:nth-child(4) .stat-card::after {
    background: rgba(124, 58, 237, .1);
    color: rgba(109, 40, 217, .92);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .13);
}

.row > [class*="col-"]:nth-child(4) .stat-card-icon {
    background: rgba(124, 58, 237, .1);
    color: rgba(109, 40, 217, .92);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .13);
}

.row > [class*="col-"]:nth-child(5) .stat-card::after {
    background: rgba(220, 38, 38, .1);
    color: rgba(185, 28, 28, .92);
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .13);
}

.row > [class*="col-"]:nth-child(5) .stat-card-icon {
    background: rgba(220, 38, 38, .1);
    color: rgba(185, 28, 28, .92);
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .13);
}

.row > [class*="col-"]:nth-child(6) .stat-card::after {
    background: rgba(8, 145, 178, .1);
    color: rgba(14, 116, 144, .92);
    box-shadow: inset 0 0 0 1px rgba(8, 145, 178, .13);
}

.row > [class*="col-"]:nth-child(6) .stat-card-icon {
    background: rgba(8, 145, 178, .1);
    color: rgba(14, 116, 144, .92);
    box-shadow: inset 0 0 0 1px rgba(8, 145, 178, .13);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 122, 74, .22);
    box-shadow: 0 24px 54px rgba(15, 23, 42, .105);
}

.stat-card:hover::after {
    transform: translateY(-1px) scale(1.04);
    background: rgba(15, 122, 74, .16);
}

.stat-card:hover .stat-card-icon {
    transform: translateY(-1px) scale(1.04);
    background: rgba(15, 122, 74, .16);
}

.stat-card > span:not(.stat-card-icon) {
    position: relative;
    z-index: 1;
    display: block;
    max-width: calc(100% - 54px);
    color: #64748b;
    font-family: var(--font-display);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1.25;
    text-transform: uppercase;
}

.stat-card strong {
    position: relative;
    z-index: 1;
    display: block;
    color: #0f172a;
    font-family: var(--font-display);
    font-size: clamp(.98rem, 1.25vw, 1.22rem);
    font-weight: 850;
    line-height: 1.18;
    margin-top: 12px;
    max-width: calc(100% - 54px);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.stat-card strong {
    text-wrap: balance;
}

.stat-card.has-stat-icon {
    padding-right: 58px;
}

.stat-card.has-stat-icon strong {
    max-width: calc(100% - 30px);
}

.stat-card small {
    position: relative;
    z-index: 1;
}

.cotisation-mini-stat {
    min-height: 92px;
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, .72);
    border-radius: 12px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .05);
}

.cotisation-mini-stat span,
.cotisation-mini-stat small {
    display: block;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 650;
}

.cotisation-mini-stat strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 850;
}

.cotisation-subnav,
.bilan-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
}

.cotisation-subnav a,
.bilan-subnav a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 11px;
    color: #334155;
    font-weight: 800;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.cotisation-subnav a:hover,
.cotisation-subnav a.active,
.bilan-subnav a:hover,
.bilan-subnav a.active {
    background: #ecfdf5;
    color: var(--green-dark);
    box-shadow: inset 0 0 0 1px rgba(15, 122, 74, .16);
}

.cotisation-subnav a.active i,
.bilan-subnav a.active i {
    color: var(--green);
}

.cotisation-unpaid-months {
    display: inline-block;
    max-width: 340px;
    color: #92400e;
    font-size: .78rem;
    font-weight: 650;
    line-height: 1.45;
    white-space: normal;
}

.cotisation-year-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: .78rem;
    font-weight: 800;
    white-space: normal;
    text-align: left;
}

.cotisation-chart-wrap {
    position: relative;
    width: 100%;
    min-height: 310px;
    padding: 8px 4px;
}

.cotisation-chart-wrap canvas {
    width: 100% !important;
    height: 300px !important;
}

.cotisation-risk-card {
    min-height: 96px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.cotisation-risk-card span,
.cotisation-risk-card small {
    display: block;
    color: #64748b;
    font-size: .74rem;
    font-weight: 750;
}

.cotisation-risk-card strong {
    display: block;
    margin: 6px 0 2px;
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 900;
}

.cotisation-risk-card.risk-danger {
    border-left: 5px solid #dc2626;
    background: #fff5f5;
}

.cotisation-risk-card.risk-warning {
    border-left: 5px solid #f59e0b;
    background: #fffbeb;
}

.cotisation-risk-card.risk-secondary {
    border-left: 5px solid #64748b;
    background: #f8fafc;
}

.searchable-select {
    position: relative;
}

.searchable-select-menu {
    position: absolute;
    inset: calc(100% + 6px) 0 auto 0;
    z-index: 30;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
    padding: 6px;
}

.searchable-select.open .searchable-select-menu {
    display: grid;
    gap: 4px;
}

.searchable-select-option {
    width: 100%;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #1f2937;
    padding: 8px 10px;
    text-align: left;
}

.searchable-select-option:hover {
    background: #ecfdf5;
}

.searchable-select-option strong,
.searchable-select-option span {
    display: block;
}

.searchable-select-option strong {
    font-size: .82rem;
    font-weight: 750;
}

.searchable-select-option span {
    color: #64748b;
    font-size: .72rem;
    font-weight: 650;
}

.super-admin-stack {
    display: grid;
    gap: 10px;
}

.super-admin-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #172033;
    text-decoration: none;
    font-weight: 700;
    background: #f8fafc;
}

.super-admin-link:hover {
    color: var(--green-dark);
    background: #ecfdf5;
    border-color: rgba(15, 122, 74, .22);
}

.super-admin-link i {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #eef6f1;
    color: var(--green);
}

.super-project-card {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .08);
}

.super-project-card .card-body {
    padding: 22px;
}

.super-project-icon {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: #ecfdf5;
    color: var(--green);
    font-size: 1.15rem;
    margin-bottom: 14px;
}

.super-project-icon.muted {
    background: #f1f5f9;
    color: #64748b;
}

.super-project-card h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 1.08rem;
    font-weight: 800;
}

.super-project-card p {
    min-height: 44px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: .86rem;
}

.super-project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.super-progress {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.super-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--green), #22c55e);
}

.integration-stat strong {
    font-size: 1.05rem;
}

.integration-module-list {
    display: grid;
}

.integration-module-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
}

.integration-module-item:last-child {
    border-bottom: 0;
}

.integration-module-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: #eef8f2;
    color: var(--green);
    font-size: .98rem;
}

.integration-module-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.integration-module-title strong {
    color: #111827;
    font-size: .9rem;
}

.integration-module-title span {
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    color: #475569;
    font-size: .68rem;
    font-weight: 800;
    padding: 3px 8px;
    white-space: nowrap;
}

.integration-module-item p {
    color: var(--muted);
    font-size: .8rem;
    margin: 0;
}

.integration-checklist {
    display: grid;
    gap: 10px;
}

.integration-checklist div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: .82rem;
    font-weight: 700;
}

.integration-checklist i {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: #dcfce7;
    color: #166534;
    font-size: .74rem;
}

.integration-checklist .pending i {
    background: #fef3c7;
    color: #92400e;
}

.integration-actions {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.integration-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: .86rem;
    padding: 14px;
}

.integration-note i {
    margin-top: 2px;
}

.secretariat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.secretariat-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 8px;
    color: #475569;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
}

.secretariat-tabs a:hover,
.secretariat-tabs a.active {
    color: var(--green-dark);
    background: #ecfdf5;
}

.tiptap-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid #dbe4ee;
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    background: #f8fafc;
}

.table-card .tiptap-toolbar {
    margin-top: 2px;
}

.tiptap-toolbar button {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    font-size: .76rem;
}

.tiptap-select {
    min-width: 116px;
    height: 30px;
    padding: 0 28px 0 10px;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    background-color: #fff;
    color: #334155;
    font-size: .78rem;
    font-weight: 700;
}

.tiptap-color {
    width: 30px;
    height: 30px;
    position: relative;
    display: inline-grid;
    place-items: center;
    margin: 0;
    border: 1px solid #dbe4ee;
    border-radius: 7px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.tiptap-color input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.tiptap-toolbar button:hover {
    color: var(--green-dark);
    border-color: rgba(15, 122, 74, .32);
    background: #ecfdf5;
}

.tiptap-select:focus,
.tiptap-color:hover {
    outline: none;
    color: var(--green-dark);
    border-color: rgba(15, 122, 74, .32);
    box-shadow: var(--ring-soft);
}

.tiptap-editor {
    min-height: 220px;
    border: 1px solid #dbe4ee;
    border-radius: 0 0 9px 9px;
    background: #fff;
    overflow: hidden;
}

.tiptap-content {
    min-height: 220px;
    padding: 14px;
    outline: none;
    color: #1f2937;
    font-size: .88rem;
    line-height: 1.65;
}

.tiptap-content h2 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 10px;
}

.tiptap-content ul,
.tiptap-content ol {
    padding-left: 20px;
}

.tiptap-content blockquote {
    margin: 12px 0;
    padding: 8px 12px;
    border-left: 4px solid var(--green);
    background: #f0fdf4;
    color: #1f2937;
}

.tiptap-content code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #eef2f7;
    color: #0f172a;
    font-size: .86em;
}

.tiptap-content a {
    color: #1455b8;
    font-weight: 700;
    text-decoration: underline;
}

.tiptap-content img {
    max-width: 100%;
    border-radius: 8px;
}

.tiptap-fallback {
    min-height: 220px;
    padding: 14px;
    outline: none;
    color: #1f2937;
    font-size: .88rem;
    line-height: 1.65;
}

.secretariat-rich-preview {
    margin-top: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: #1f2937;
    font-size: .86rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.secretariat-detail-grid {
    align-items: stretch;
}

.secretariat-detail-item {
    height: 100%;
    min-height: 72px;
    padding: 12px;
    border: 1px solid #e8edf3;
    border-radius: 8px;
    background: #fff;
}

.secretariat-detail-item strong {
    display: block;
    color: #111827;
    font-size: .78rem;
    font-weight: 850;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.secretariat-detail-item div {
    color: #243044;
    font-size: .88rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.baptise-chart-layout {
    display: grid;
    grid-template-columns: minmax(280px, 430px) minmax(280px, 1fr);
    gap: 28px;
    align-items: center;
}

.secretariat-activity-card {
    overflow: hidden;
}

.secretariat-activity-card .card-header {
    align-items: center;
    gap: 12px;
}

.secretariat-activity-card .card-header strong {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

.secretariat-year-filter {
    margin: 0;
    margin-left: auto;
}

.secretariat-year-filter .form-select {
    min-width: 94px;
    height: 34px;
    padding: 4px 34px 4px 14px;
    border: 0;
    border-radius: 999px;
    background-color: #f8fafc;
    color: #0f172a;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, .75);
}

.secretariat-activity-chart {
    position: relative;
    min-height: 360px;
    padding: 18px 22px 12px;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .8), rgba(255, 255, 255, 1)),
        #fff;
}

.secretariat-activity-chart canvas {
    width: 100% !important;
    height: 320px !important;
}

.baptise-chart-canvas {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 340px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 8px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
}

.baptise-chart-canvas canvas {
    width: 100% !important;
    max-width: 340px;
    height: 310px !important;
}

.baptise-chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #64748b;
    font-size: .9rem;
    font-weight: 700;
}

.baptise-chart-legend {
    display: grid;
    gap: 14px;
    align-content: center;
}

.baptise-gender-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.baptise-gender-card {
    position: relative;
    overflow: hidden;
    min-height: 92px;
    padding: 14px 16px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.baptise-gender-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--gender-color, #1455b8);
}

.baptise-gender-card span,
.baptise-gender-card em {
    display: block;
    color: #667085;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.baptise-gender-card strong {
    display: block;
    margin: 6px 0 2px;
    color: #0f172a;
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 850;
    line-height: 1;
}

.baptise-gender-card-men {
    --gender-color: #1455b8;
    background: linear-gradient(145deg, rgba(232, 242, 255, .95), #ffffff);
}

.baptise-gender-card-women {
    --gender-color: #d5358a;
    background: linear-gradient(145deg, rgba(253, 232, 244, .95), #ffffff);
}

.baptise-assembly-list {
    display: grid;
    gap: 10px;
}

.baptise-legend-item {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto auto auto;
    gap: 9px;
    align-items: center;
    padding: 11px 12px;
    color: #1f2937;
    font-size: .82rem;
    border: 1px solid #e8edf3;
    border-radius: 8px;
    background: #fff;
}

.baptise-legend-item strong {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.baptise-legend-count {
    min-width: 38px;
    border-radius: 999px;
    padding: 4px 8px;
    color: #fff;
    font-size: .7rem;
    font-weight: 850;
    line-height: 1;
    text-align: center;
}

.baptise-legend-men {
    background: #1455b8;
}

.baptise-legend-women {
    background: #d5358a;
}

.baptise-legend-item em {
    color: #64748b;
    font-style: normal;
    font-size: .76rem;
    font-weight: 700;
    white-space: nowrap;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
    font-size: .8rem;
    letter-spacing: 0;
}

.btn-success {
    background: linear-gradient(135deg, var(--green), #12a166);
    border-color: var(--green);
    box-shadow: 0 10px 22px rgba(15, 122, 74, .18);
}

.btn-outline-success {
    border-color: rgba(15, 122, 74, .36);
    color: var(--green);
}

.btn-outline-success:hover {
    background: var(--green);
    border-color: var(--green);
}

.form-control,
.form-select,
select.form-control {
    min-height: 38px;
    border-color: #d7e0ea;
    border-radius: 8px;
    color: #172033;
    font-size: .82rem;
    font-weight: 500;
    background-color: #fff;
}

.form-control:focus,
.form-select:focus,
select.form-control:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 .24rem rgba(37, 99, 235, .14);
}

.password-toggle-wrap {
    position: relative;
}

.password-toggle-wrap .form-control {
    padding-right: 44px;
}

.password-toggle-btn {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font-size: .86rem;
}

.password-toggle-btn:hover {
    color: var(--green);
    background: #ecfdf5;
}

.form-label {
    color: #334155;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.actions {
    display: inline-flex;
    gap: 8px;
}

.actions .btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.table-card {
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, .72);
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .075);
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.table-card:hover {
    border-color: rgba(148, 163, 184, .78);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .095);
}

.table-card .card-header {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e5eaf0;
    padding: 12px 18px;
}

.table-card .card-header strong {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f1f33;
    font-family: var(--font-display);
    font-size: .88rem;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: .01em;
}

.table-card .card-header strong i {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, #e9f8ef, #f5fbf7);
    color: var(--green);
    border: 1px solid rgba(15, 122, 74, .12);
    border-radius: 8px;
    font-size: .78rem;
}

.table-card .card-header .btn-dark {
    background: #172033;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(31, 41, 51, .2);
    min-height: 38px;
    padding-inline: 16px;
}

.collapse-card-toggle {
    width: 34px;
    height: 34px;
    min-height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 9px;
}

.table-card .card-body {
    padding: 0;
    background: #fff;
}

.table-card > .card-body:not(.table-responsive):not(.p-0),
.table-card .card-body > form,
.table-card .card-body > .row,
.table-card .card-body > .integration-note {
    padding: 18px;
}

.table-card .card-body > form.row,
.table-card .card-body form.row {
    margin: 0;
}

.table-card .card-body > form.row > [class*="col-"],
.table-card .card-body form.row > [class*="col-"] {
    padding-top: 0;
}

.table-card .card-body textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

.table-card .form-label,
.card.mb-3 .form-label {
    margin-bottom: 6px;
    color: #344054;
    font-size: .76rem;
    font-weight: 750;
}

.table-card .small,
.card.mb-3 .small {
    font-size: .74rem;
}

.table-card .card-body .btn {
    min-height: 34px;
}

.table-card.mb-3 {
    margin-bottom: 20px !important;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-bottom: 0;
    background: #fff;
    padding: 12px 18px 8px;
}

.table-toolbar .dataTables_filter {
    float: none;
    text-align: left;
}

.table-toolbar .dataTables_filter label {
    width: min(100%, 280px);
    display: block;
    align-items: center;
    color: #283b57;
    font-size: .84rem;
    font-weight: 700;
    margin: 0;
    position: relative;
}

.table-toolbar .dataTables_filter input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cfd8e3;
    border-radius: 9px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238b95a5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 13px center;
    background-size: 17px 17px;
    color: #111827;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
    font-size: .82rem;
    margin: 0;
    padding: 8px 12px 8px 38px;
}

.table-toolbar .dataTables_filter input:focus {
    border-color: #8bbcff;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .16);
}

.table-card table.dataTable {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0;
}

.table-card .table {
    color: #4b5563;
    font-size: .78rem;
    font-weight: 500;
    border-color: #edf1f5;
}

.table-card .table-bordered > :not(caption) > * {
    border-width: 0;
}

.table-card .table th {
    white-space: nowrap;
    color: #667085;
    font-family: var(--font-display);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
    background: #f7f9fc;
    border-bottom: 1px solid #e4eaf0 !important;
    padding: 11px 16px;
}

.table-card .table td {
    padding: 10px 16px;
    border-bottom: 1px solid #e8edf3 !important;
    vertical-align: middle;
    line-height: 1.45;
}

.table-card .table tbody tr {
    transition: background .18s ease, color .18s ease;
}

.table-card .table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #fff;
}

.table-card .table-striped > tbody > tr:nth-of-type(even) > * {
    --bs-table-accent-bg: #fff;
}

.table-card .table-hover > tbody > tr:hover > *,
.table-card .table tbody tr:hover > * {
    --bs-table-accent-bg: #f4faf6;
    color: #1f2937;
}

.table-card .badge {
    border-radius: 999px;
    padding: .34rem .52rem;
    font-weight: 750;
    font-size: .66rem;
}

.table-card .text-muted.small {
    color: #718096 !important;
}

.table-card .actions .btn,
.table-card td form .btn-sm {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    box-shadow: none;
}

.bilan-icon-btn {
    width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
}

.bilan-icon-btn i {
    font-size: .68rem;
}

.bilan-preview-modal {
    background: #f6f7f4;
    overflow-x: auto;
}

.bilan-monthly-card .card-header .badge {
    margin-left: auto;
    font-size: .72rem;
    letter-spacing: .02em;
}

.bilan-period-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.bilan-period-filter .form-select {
    width: auto;
    min-width: 124px;
    height: 36px;
    border-radius: 999px;
    border-color: #9fd4bf;
    background-color: #dff3ea;
    color: #007d55;
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 800;
    box-shadow: none;
}

.bilan-period-filter .form-select:focus {
    border-color: #087f5b;
    box-shadow: 0 0 0 .18rem rgba(8, 127, 91, .14);
}

.bilan-period-filter .btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.bilan-inline-scroll {
    overflow-x: auto;
    padding: 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #f3f7f1 100%);
}

.bilan-inline-scroll .bilan-sheet {
    box-shadow: 0 18px 42px rgba(15, 23, 42, .12);
}

.bilan-sheet {
    min-width: 860px;
    max-width: 1080px;
    margin: 0 auto;
    background: #fff;
    color: #000;
    font-family: Cambria, Georgia, "Times New Roman", serif;
    border: 2px solid #000;
}

.bilan-sheet-title {
    background: #345923;
    color: #fff;
    border-bottom: 1px solid #000;
    padding: 10px 16px 9px;
    text-align: center;
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1.15;
    font-family: var(--font-display), Cambria, Georgia, serif;
}

.mariage-bilan-sheet .bilan-sheet-title {
    background: #082a66;
}

.mariage-bilan-sheet .bilan-sheet-table thead th {
    background: #bdd7ee;
    color: #000;
}

.bilan-col-date {
    width: 170px;
}

.bilan-sheet-spacer {
    height: 28px;
    border-bottom: 1px solid #000;
}

.bilan-sheet-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 1.08rem;
    line-height: 1.2;
}

.bilan-sheet-table th,
.bilan-sheet-table td {
    border: 1px solid #000;
    padding: 5px 8px;
    vertical-align: middle;
}

.bilan-sheet-table thead th {
    background: #00b85f;
    color: #fff;
    text-align: center;
    font-family: var(--font-display), Cambria, Georgia, serif;
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: .015em;
}

.bilan-col-number {
    width: 48px;
}

.bilan-col-amount {
    width: 215px;
}

.bilan-number {
    text-align: center;
    font-weight: 800;
}

.bilan-label-cell {
    overflow-wrap: anywhere;
}

.bilan-amount {
    text-align: right;
    font-weight: 800;
    white-space: nowrap;
}

.bilan-section-green {
    background: #a9cf8f;
    font-weight: 900;
}

.bilan-subtotal-gray {
    background: #c6c6c6;
    font-weight: 900;
}

.bilan-line-note {
    margin-top: 3px;
}

.dashboard-chart-body {
    position: relative;
    min-height: 300px;
}

.dashboard-chart-body canvas {
    min-height: 280px;
}

.dashboard-chart-empty {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

@media (max-width: 768px) {
    .bilan-sheet {
        min-width: 760px;
    }

    .bilan-sheet-title {
        font-size: 1.25rem;
    }

    .bilan-sheet-table {
        font-size: 1rem;
    }

    .bilan-sheet-table thead th {
        font-size: 1.05rem;
    }

    .bilan-inline-scroll {
        padding: 12px;
    }

    .bilan-monthly-card .card-header .badge {
        margin-left: 0;
    }

    .bilan-period-filter {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .bilan-period-filter .form-select {
        min-width: 132px;
    }
}

/* Global professional polish */
:root {
    --surface-glass: rgba(255, 255, 255, .88);
    --surface-strong: #ffffff;
    --ink-strong: #0f172a;
    --accent-cyan: #0891b2;
    --ring-soft: 0 0 0 .22rem rgba(15, 122, 74, .13);
}

.content {
    background:
        radial-gradient(circle at top left, rgba(15, 122, 74, .08), transparent 300px),
        linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(243, 246, 250, .2));
}

.page-title {
    position: relative;
    overflow: hidden;
    align-items: center;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid rgba(209, 217, 230, .85);
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(240, 249, 244, .86)),
        #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .075);
}

.page-title::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--green), var(--blue));
}

.page-title h1 {
    margin: 0;
    color: var(--ink-strong);
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.1vw, 1.7rem);
    font-weight: 900;
    letter-spacing: 0;
}

.page-title h1 i {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    background: #e9f8ef;
    color: var(--green);
    border: 1px solid rgba(15, 122, 74, .12);
}

.page-title p {
    margin-top: 5px;
    color: #64748b !important;
    font-size: .9rem;
}

.card,
.table-card,
.stat-card {
    border-color: rgba(210, 219, 232, .92) !important;
    background: var(--surface-glass);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .07);
    backdrop-filter: blur(10px);
}

.card:hover,
.table-card:hover,
.stat-card:hover {
    transform: translateY(-1px);
    border-color: rgba(148, 163, 184, .8) !important;
    box-shadow: 0 22px 50px rgba(15, 23, 42, .105);
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 22px 22px 18px;
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -52px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .08);
}

.stat-card span {
    position: relative;
    z-index: 1;
    color: #607086;
    font-family: var(--font-display);
    font-size: .76rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.stat-card strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 8px;
    color: var(--ink-strong);
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    line-height: 1.08;
    font-weight: 900;
}

.stat-card small {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 7px;
    font-weight: 650;
}

.stat-card-icon {
    z-index: 1;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 122, 74, .14);
}

.btn {
    border-radius: 9px;
    font-weight: 800;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-success {
    border-color: transparent;
    background: linear-gradient(135deg, #0f7a4a, #0ea66b);
    box-shadow: 0 12px 24px rgba(15, 122, 74, .18);
}

.btn-primary,
.btn-info {
    border-color: transparent;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .17);
}

.btn-danger {
    border-color: transparent;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    box-shadow: 0 12px 24px rgba(220, 38, 38, .17);
}

.btn-warning {
    border-color: transparent;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #172033;
}

.btn-outline-success,
.btn-outline-primary,
.btn-outline-danger,
.btn-outline-secondary {
    background: #fff;
    border-color: #dbe3ee;
    color: #172033;
}

.btn-outline-success:hover,
.btn-outline-primary:hover,
.btn-outline-danger:hover,
.btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #aebbd0;
    color: #0f172a;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .09);
}

.form-control,
.form-select,
select.form-control {
    border-color: #d8e1eb;
    border-radius: 10px;
    background-color: #fff;
    color: #111827;
    box-shadow: none;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.form-control:focus,
.form-select:focus,
select.form-control:focus {
    border-color: var(--green);
    box-shadow: var(--ring-soft);
}

.table-card .card-header {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .96));
}

.table-card .table thead th {
    background: #f4f8fb;
    color: #475569;
    border-bottom: 1px solid #dce4ee;
    font-family: var(--font-display);
    font-size: .74rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.table-card .table tbody td {
    color: #172033;
}

.table-card .table tbody tr {
    transition: background-color .14s ease, box-shadow .14s ease;
}

.table-card .table tbody tr:hover > * {
    background: #f8fbfd !important;
}

.badge {
    border-radius: 999px;
    padding: .42em .7em;
    font-weight: 850;
}

.actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.actions .btn,
.bilan-icon-btn {
    border-radius: 10px !important;
}

.modal-content {
    border-radius: 14px;
    overflow: hidden;
}

.modal-header.bg-success,
.modal-header.bg-primary,
.modal-header.bg-info,
.modal-header.bg-secondary {
    border-bottom: 0;
    background: linear-gradient(135deg, #0f7a4a, #0891b2) !important;
}

.alert {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
    font-weight: 700;
}

.topbar {
    box-shadow: 0 14px 36px rgba(15, 23, 42, .07);
}

.topnav a,
.topnav-dropdown-toggle {
    transition: background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.topnav a:hover,
.topnav-dropdown-toggle:hover {
    transform: translateY(-1px);
}

.table-toolbar .dataTables_filter input {
    border-radius: 12px;
    border-color: #d8e1eb;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .055);
}

.table-footer {
    background: #fff;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

@media (max-width: 768px) {
    .page-title {
        align-items: stretch;
        flex-direction: column;
        padding: 15px 16px;
    }

    .page-title h1 i {
        width: 34px;
        height: 34px;
    }

    .stat-card {
        min-height: 116px;
        padding: 18px;
    }
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 0;
    background: #fff;
    padding: 12px 18px 18px;
}

.table-footer .dataTables_paginate,
.table-footer .dataTables_length {
    float: none;
    margin: 0;
}

.table-footer .pagination {
    margin: 0;
    box-shadow: none;
    border: 1px solid #d7dde6;
    border-radius: 8px;
    overflow: hidden;
}

.table-footer .page-link {
    min-width: 42px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    border-color: #d7dde6;
    font-size: .82rem;
    font-weight: 700;
}

.table-footer .page-item.active .page-link {
    background: #fff;
    border-color: #006b3f;
    color: #006b3f;
    box-shadow: inset 0 0 0 1px #006b3f;
}

.table-footer .page-item.disabled .page-link {
    color: #a0aec0;
    background: #f8fafc;
}

.table-footer .dataTables_length label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: transparent;
    font-size: 0;
    font-weight: 700;
    margin: 0;
}

.table-footer .dataTables_length select {
    min-width: 92px;
    min-height: 38px;
    border-color: #d9e1ea;
    border-radius: 9px;
    background-color: #fff;
    color: #111827;
    font-size: .82rem;
    padding-inline: 18px;
}

.table-footer .dataTables_info,
.table-footer-info {
    color: #111827;
    font-size: .82rem;
    font-weight: 500;
}

.modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 28px 75px rgba(15, 23, 42, .24);
}

.modal-dialog {
    margin-left: auto;
    margin-right: auto;
}

.modal-header,
.modal-footer {
    border-color: rgba(226, 232, 240, .85);
}

.permission-panel {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.permission-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #f8fbfd;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 16px;
}

.permission-panel-header strong {
    color: #162033;
}

.permission-tools {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    padding: 16px;
}

.permission-group {
    border: 1px solid #edf1f5;
    border-radius: 12px;
    padding: 14px;
    background: #fbfdff;
}

.permission-group h6 {
    color: var(--green-dark);
    font-size: .88rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.permission-check {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 30px;
    color: #334155;
    font-size: .84rem;
    cursor: pointer;
}

.permission-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
}

.permission-readonly-list {
    display: grid;
    gap: 12px;
}

.permission-readonly-group {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 12px;
}

.permission-readonly-group h6 {
    color: var(--green-dark);
    font-size: .86rem;
    font-weight: 850;
    margin: 0 0 8px;
}

.permission-readonly-group ul {
    display: grid;
    gap: 7px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.permission-readonly-group li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #334155;
    font-size: .86rem;
}

.permission-readonly-group li i {
    color: var(--green);
    margin-top: 3px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 12% 18%, rgba(30, 126, 83, .28), transparent 34%),
        radial-gradient(circle at 88% 12%, rgba(19, 88, 139, .26), transparent 32%),
        linear-gradient(135deg, #05291b 0%, #0f172a 58%, #083824 100%);
    padding: 24px;
    position: relative;
    overflow-x: hidden;
}

.login-shell {
    width: min(460px, 100%);
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    position: relative;
    z-index: 1;
}

.login-panel {
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(226, 232, 240, .78);
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(2, 6, 23, .34);
    backdrop-filter: blur(18px);
}

.login-form-panel {
    padding: 28px;
}

.login-project-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 36px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(244, 248, 251, .96));
    overflow: hidden;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.login-brand h1 {
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 800;
    margin: 3px 0 2px;
    line-height: 1.25;
    white-space: nowrap;
}

.login-brand p,
.login-project-head p,
.login-project-card p {
    color: #64748b;
    margin-bottom: 0;
    font-size: .84rem;
}

.login-mark {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--green), var(--blue));
    color: #fff;
    border-radius: 12px;
    font-size: 1.18rem;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .24);
}

.login-logo-mark {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    background: #fff;
    border: 1px solid rgba(15, 122, 74, .2);
    border-radius: 50%;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .13), inset 0 0 0 6px #f8fafc;
    overflow: hidden;
}

.login-logo-mark img {
    width: 78%;
    height: 78%;
    object-fit: contain;
    padding: 0;
}

.login-kicker {
    color: var(--green-dark);
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.login-intro {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: center;
}

.login-intro h2 {
    color: #0f172a;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 850;
    margin: 0 0 4px;
}

.login-intro p {
    color: #64748b;
    font-size: .86rem;
    margin: 0;
}

.login-form {
    display: grid;
    gap: 9px;
}

.login-form .form-label {
    color: #334155;
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: 0;
}

.login-form .form-control {
    min-height: 42px;
    border-color: #dbe4ee;
    border-radius: 11px;
    font-size: .9rem;
    box-shadow: none;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #7c8da5;
    font-size: .86rem;
    z-index: 2;
}

.login-input-wrap .form-control {
    padding-left: 42px;
}

.login-input-wrap .password-toggle-wrap .form-control {
    padding-left: 42px;
    padding-right: 44px;
}

.login-form .form-control:focus {
    border-color: rgba(15, 122, 74, .56);
    box-shadow: 0 0 0 .2rem rgba(15, 122, 74, .12);
}

.login-form .btn {
    min-height: 42px;
    margin-top: 8px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #067a4b, #0f8f5b);
    font-size: .9rem;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(15, 122, 74, .24);
}

.login-help-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -2px;
}

.login-help-row a {
    color: var(--green-dark);
    font-size: .8rem;
    font-weight: 750;
    text-decoration: none;
}

.login-help-row a:hover {
    color: var(--green);
    text-decoration: underline;
}

.forgot-admin-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(15, 122, 74, .18);
    border-radius: 12px;
    background: #f4fbf7;
    color: #0f172a;
    padding: 13px 14px;
    margin-bottom: 16px;
}

.forgot-admin-card > i {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--green);
    box-shadow: 0 10px 22px rgba(15, 122, 74, .12);
}

.forgot-admin-card strong,
.forgot-admin-card span {
    display: block;
}

.forgot-admin-card strong {
    font-size: .88rem;
}

.forgot-admin-card span {
    color: #64748b;
    font-size: .82rem;
}

.login-secure-note {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: .78rem;
    justify-content: center;
    margin: 14px 0 0;
}

.login-project-head h2 {
    color: #0f172a;
    font-family: var(--font-display);
    font-size: 1.58rem;
    font-weight: 850;
    line-height: 1.22;
    margin: 6px 0 0;
}

.login-projects {
    display: grid;
    gap: 12px;
}

.login-project-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 12px;
    align-items: start;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 12px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .045);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.login-project-card:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 122, 74, .24);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .075);
}

.login-project-card.active {
    border-color: rgba(5, 96, 45, .38);
    background: linear-gradient(135deg, #f4fbf7, #ffffff);
}

.project-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef8f2, #e8f3ff);
    color: var(--green);
    font-size: 1rem;
}

.project-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.project-title strong {
    color: #0f172a;
    font-size: .92rem;
}

.project-title span {
    border: 1px solid #d6e7dc;
    border-radius: 999px;
    color: #05603a;
    background: #eef8f2;
    font-size: .68rem;
    font-weight: 800;
    padding: 3px 8px;
    white-space: nowrap;
}

.login-system-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

.login-system-strip span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #dbe7ef;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: .74rem;
    font-weight: 750;
    padding: 7px 10px;
}

.login-system-strip i {
    color: var(--green);
}

@media (max-width: 991px) {
    .topbar {
        align-items: stretch;
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 16px;
    }

    .topbar-main {
        width: 100%;
        justify-content: space-between;
    }

    .topnav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        order: 3;
        border-top: 1px solid var(--line);
        padding-top: 10px;
        gap: 4px;
    }

    .topnav.open {
        display: flex;
    }

    .topnav a {
        justify-content: flex-start;
        min-height: 42px;
        padding: 10px 12px;
    }

    .topnav-dropdown,
    .topnav-dropdown-toggle {
        width: 100%;
    }

    .topnav-dropdown-toggle {
        justify-content: flex-start;
        min-height: 42px;
        padding: 10px 12px;
    }

    .topnav-submenu {
        width: 100%;
        max-width: none;
        position: static !important;
        transform: none !important;
        box-shadow: none;
        margin-top: 4px !important;
    }

    .user-area {
        width: 100%;
        justify-content: space-between;
        order: 4;
    }

    .user-dropdown {
        width: 100%;
        justify-content: space-between;
    }

    .user-meta strong {
        max-width: calc(100vw - 150px);
    }
}

@media (max-width: 575px) {
    body {
        font-size: 13px;
    }

    .topbar {
        position: sticky;
        padding: 10px 12px;
    }

    .brand {
        font-size: .92rem;
        min-width: 0;
    }

    .brand-logo-frame {
        flex-basis: 46px;
        width: 46px;
        height: 36px;
        border-radius: 9px;
    }

    .brand-title {
        max-width: calc(100vw - 110px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand i {
        padding: 9px;
        border-radius: 10px;
    }

    .content {
        padding: 10px 12px 14px;
    }

    .page-title,
    .table-card .card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-title {
        gap: 8px;
        margin-bottom: 10px;
    }

    .page-title > div,
    .page-title > .d-flex,
    .page-title > button,
    .page-title > a {
        width: 100%;
    }

    .page-title .d-flex {
        flex-direction: column;
    }

    .page-title .btn {
        width: 100%;
        min-height: 40px;
    }

    .page-title h1 {
        font-size: 1rem;
        line-height: 1.25;
    }

    .page-title p {
        font-size: .76rem;
    }

    .row.g-3 {
        --bs-gutter-x: .75rem;
        --bs-gutter-y: .75rem;
    }

    .stat-card {
        min-height: 96px;
        padding: 15px 15px 14px;
    }

    .stat-card strong {
        font-size: .98rem;
        margin-top: 8px;
    }

    .stat-card span {
        font-size: .68rem;
    }

    .baptise-chart-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .baptise-chart-canvas {
        min-height: 270px;
        padding: 10px;
    }

    .baptise-chart-canvas canvas {
        max-width: 260px;
        height: 250px !important;
    }

    .baptise-gender-summary {
        grid-template-columns: 1fr;
    }

    .baptise-gender-card {
        min-height: 82px;
    }

    .baptise-legend-item {
        grid-template-columns: 1fr auto auto;
    }

    .baptise-legend-item em {
        grid-column: 1 / -1;
        color: #667085;
    }

    .card {
        border-radius: 13px;
    }

    .card-body {
        padding: 14px;
    }

    .table-card > .card-body:not(.table-responsive):not(.p-0),
    .table-card .card-body > form,
    .table-card .card-body > .row,
    .table-card .card-body > .integration-note {
        padding: 14px;
    }

    .table-card .card-header,
    .table-toolbar,
    .table-footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    .table-card .card-header {
        min-height: auto;
        gap: 10px;
    }

    .table-card .card-header strong {
        font-size: .92rem;
    }

    .table-card .card-header strong i {
        width: 32px;
        height: 32px;
    }

    .table-card .card-header .btn-dark {
        width: 100%;
        min-height: 38px;
    }

    .table-toolbar .dataTables_filter label {
        width: 100%;
        display: block;
    }

    .table-toolbar .dataTables_filter input {
        width: 100%;
        max-width: none;
        min-height: 40px;
    }

    .table-card .table th,
    .table-card .table td {
        padding: 12px 14px;
        white-space: nowrap;
    }

    .table-card .table td:first-child,
    .table-card .table th:first-child {
        padding-left: 14px;
    }

    .table-card .table {
        min-width: 680px;
        font-size: .78rem;
    }

    .table-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .table-footer .dataTables_paginate {
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .table-footer .pagination {
        flex-wrap: nowrap;
        width: max-content;
    }

    .table-footer .dataTables_length label {
        width: 100%;
        justify-content: space-between;
    }

    .table-footer .dataTables_length select {
        min-width: 92px;
    }

    .actions {
        gap: 6px;
    }

    .actions .btn,
    .table-card .actions .btn,
    .table-card td form .btn-sm {
        width: 34px;
        height: 34px;
    }

    .form-control,
    .form-select,
    select.form-control {
        min-height: 42px;
        font-size: .88rem;
    }

    textarea.form-control {
        min-height: 88px;
    }

    .modal-dialog,
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        width: calc(100% - 20px);
        max-width: none;
        margin: 10px auto;
    }

    .modal-body {
        padding: 14px;
    }

    .modal-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
        min-height: 40px;
    }

    .permission-grid {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .permission-panel-header {
        align-items: stretch;
        flex-direction: column;
        padding: 12px;
    }

    .permission-tools .btn {
        flex: 1;
    }

    .login-page {
        align-items: flex-start;
        padding: 14px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .login-form-panel,
    .login-project-panel {
        padding: 20px;
    }

    .login-brand {
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .login-logo-mark {
        flex-basis: 60px;
        width: 60px;
        height: 60px;
    }

    .login-project-head h2 {
        font-size: 1.18rem;
    }

    .login-project-card {
        grid-template-columns: 38px 1fr;
        padding: 12px;
    }

    .project-icon {
        width: 38px;
        height: 38px;
    }

    .project-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 380px) {
    .topnav a span,
    .brand-title {
        font-size: .84rem;
    }

    .user-avatar {
        width: 30px;
        height: 30px;
    }

    .user-meta strong {
        max-width: 190px;
    }

    .content {
        padding: 10px;
    }
}

/* Responsive hardening for all application screens */
img,
svg,
canvas,
video {
    max-width: 100%;
}

.card,
.table-card,
.modal-content,
.stat-card,
.super-project-card,
.login-panel {
    max-width: 100%;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive > table:not(.dataTable),
.bilan-sheet-table {
    width: 100%;
    max-width: 100%;
}

.table-card .dataTables_wrapper {
    width: 100%;
    overflow: hidden;
}

.table-card table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
.table-card table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    width: 18px;
    height: 18px;
    line-height: 18px;
    background-color: var(--green);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(15, 122, 74, .18);
    top: 50%;
    transform: translateY(-50%);
}

table.dataTable > tbody > tr.child ul.dtr-details {
    width: 100%;
}

table.dataTable > tbody > tr.child ul.dtr-details > li {
    display: grid;
    grid-template-columns: minmax(110px, 36%) 1fr;
    gap: 10px;
    align-items: start;
    border-bottom: 1px solid #edf2f7;
    padding: 9px 0;
}

table.dataTable > tbody > tr.child span.dtr-title {
    color: #334155;
    font-weight: 800;
}

table.dataTable > tbody > tr.child span.dtr-data {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

table.dataTable > tbody > tr.child span.dtr-data,
table.dataTable > tbody > tr.child span.dtr-data * {
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

table.dataTable > tbody > tr.child span.dtr-data .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 1199px) {
    .topbar {
        gap: 10px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .topnav a {
        padding-left: 10px;
        padding-right: 10px;
        font-size: .82rem;
    }

    .topnav-dropdown-toggle {
        padding-left: 10px;
        padding-right: 10px;
        font-size: .82rem;
    }

    .secretariat-topnav {
        gap: 5px;
    }

    .content {
        padding-left: 18px;
        padding-right: 18px;
    }

    .secretariat-hero-title {
        margin-left: -18px;
        margin-right: -18px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 767px) {
    .topbar {
        min-height: auto;
    }

    .topbar-main {
        min-width: 0;
    }

    .topbar-main .btn {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        padding: 0;
    }

    .topnav.open {
        max-height: calc(100vh - 126px);
        overflow-y: auto;
    }

    .topnav a {
        width: 100%;
    }

    .user-area {
        display: flex;
    }

    .dropdown-menu.user-menu {
        width: calc(100vw - 24px);
        max-width: 320px;
    }

    .content {
        width: 100%;
        min-width: 0;
    }

    .secretariat-hero-title {
        min-height: 54px;
        margin-left: -12px;
        margin-right: -12px;
        margin-bottom: 9px;
        padding: 9px 14px;
    }

    .secretariat-hero-title h1 {
        font-size: 1.05rem;
    }

    .secretariat-hero-title p,
    .secretariat-hero-title .text-muted {
        margin-top: 4px !important;
        font-size: .68rem;
    }

    .page-title .btn,
    .page-title .btn-group,
    .page-title form,
    .table-card .card-header > .btn,
    .table-card .card-header > .d-flex,
    .table-card .card-header > form {
        width: 100%;
    }

    .table-card .card-header > .d-flex {
        align-items: stretch;
        flex-direction: column;
    }

    .table-card .card-header .btn {
        justify-content: center;
        min-height: 38px;
    }

    .table-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .table-toolbar .dataTables_filter,
    .table-toolbar .table-search-wrap,
    .table-toolbar .table-toolbar-actions {
        width: 100%;
    }

    .table-card .table {
        min-width: 760px;
        width: max-content !important;
    }

    .table-responsive > table:not(.dataTable) {
        min-width: 620px;
        width: max-content;
    }

    .table-responsive > table.table-sm:not(.dataTable) {
        min-width: 420px;
    }

    .bilan-sheet-table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-card .table th,
    .table-card .table td {
        white-space: normal;
        overflow-wrap: normal;
        word-break: normal;
    }

    .table-card .table td .actions,
    .table-card .table td form {
        white-space: nowrap;
    }

    .actions {
        justify-content: flex-start;
    }

    .row > [class*="col-"] {
        min-width: 0;
    }

    .form-control,
    .form-select,
    select.form-control,
    .btn {
        max-width: 100%;
    }

    .input-group,
    .btn-group {
        flex-wrap: wrap;
    }

    .input-group > .form-control,
    .input-group > .form-select {
        min-width: 160px;
    }

    .tiptap-toolbar {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .tiptap-toolbar button {
        flex: 0 0 auto;
    }

    .tiptap-editor,
    .tiptap-content {
        overflow-wrap: anywhere;
    }

    .swal2-popup {
        width: calc(100vw - 24px) !important;
        max-width: 420px;
    }
}

@media (max-width: 480px) {
    .content {
        padding-left: 8px;
        padding-right: 8px;
    }

    .card-body,
    .modal-body,
    .table-card > .card-body:not(.table-responsive):not(.p-0),
    .table-card .card-body > form,
    .table-card .card-body > .row,
    .table-card .card-body > .integration-note {
        padding: 12px;
    }

    .table-card .card-header,
    .table-toolbar,
    .table-footer {
        padding-left: 10px;
        padding-right: 10px;
    }

    .table-card .table th,
    .table-card .table td {
        padding: 10px 12px;
    }

    .table-responsive > table:not(.dataTable) {
        min-width: 520px;
    }

    .table-responsive > table.table-sm:not(.dataTable) {
        min-width: 360px;
    }

    table.dataTable > tbody > tr.child ul.dtr-details > li {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .actions .btn,
    .table-card .actions .btn,
    .table-card td form .btn-sm {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 768px) {
    .table-responsive,
    .table-card .dataTables_wrapper,
    .dataTables_wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }

    .table-card table.table,
    .table-card table.dataTable,
    .table-responsive > table {
        min-width: 760px !important;
        width: max-content !important;
        max-width: none !important;
        table-layout: auto !important;
    }

    .table-card table.table th,
    .table-card table.table td,
    .table-card table.dataTable th,
    .table-card table.dataTable td {
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        hyphens: none !important;
        vertical-align: middle;
    }

    .table-card table.table th,
    .table-card table.dataTable th,
    .table-card .table td:first-child,
    .table-card table.dataTable td:first-child {
        white-space: nowrap !important;
    }

    .table-card table.table td:last-child,
    .table-card table.dataTable td:last-child,
    .table-card .actions {
        white-space: nowrap !important;
    }
}

/* Final visual priority layer */
.page-title {
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(240, 249, 244, .9)) !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .075) !important;
}

.page-title h1 {
    color: #0f172a !important;
    font-family: var(--font-display) !important;
    letter-spacing: 0 !important;
}

.card,
.table-card,
.stat-card {
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease !important;
}

.stat-card {
    border-radius: 14px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 252, 250, .94)) !important;
}

.table-card .card-header strong,
.stat-card span,
.stat-card strong {
    font-family: var(--font-display) !important;
}

.table-card .table thead th {
    background: #f4f8fb !important;
    color: #475569 !important;
    text-transform: uppercase;
}

.form-control:focus,
.form-select:focus,
select.form-control:focus {
    border-color: var(--green) !important;
    box-shadow: var(--ring-soft) !important;
}

/* Forgot password polish */
.forgot-admin-card {
    border: 1px solid rgba(15, 122, 74, .18);
    background:
        linear-gradient(135deg, rgba(236, 253, 245, .95), rgba(239, 246, 255, .92)),
        #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
}

.forgot-admin-card > i {
    background: linear-gradient(135deg, #0f7a4a, #0891b2);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 122, 74, .18);
}

.forgot-admin-card strong {
    color: #0f172a;
    font-family: var(--font-display);
}

.forgot-admin-card span {
    color: #475569;
}

/* Active user settings */
.user-active-panel {
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .06);
    overflow: hidden;
}

.user-active-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    background:
        linear-gradient(135deg, rgba(236, 253, 245, .96), rgba(239, 246, 255, .92)),
        #f8fafc;
    border-bottom: 1px solid rgba(226, 232, 240, .95);
}

.user-active-avatar {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, #0f7a4a, #0891b2);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 900;
    box-shadow: 0 18px 28px rgba(15, 122, 74, .18);
}

.user-active-identity {
    min-width: 0;
}

.user-active-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 122, 74, .1);
    color: #0f7a4a;
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
}

.user-active-profile h2 {
    margin: 0;
    color: #0f172a;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    font-weight: 900;
}

.user-active-profile p {
    margin: 4px 0 0;
    color: #64748b;
    font-weight: 700;
}

.user-active-grid {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(360px, 1.35fr);
    gap: 18px;
    padding: 18px;
}

.user-active-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 8px;
    background: #fff;
}

.user-active-card-form {
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.user-active-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #0f172a;
    font-family: var(--font-display);
    font-weight: 900;
}

.user-active-card-title i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #ecfdf5;
    color: #0f7a4a;
}

.user-active-info {
    display: grid;
    gap: 10px;
}

.user-active-info div {
    display: grid;
    gap: 3px;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, .8);
}

.user-active-info span {
    color: #64748b;
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.user-active-info strong {
    min-width: 0;
    color: #0f172a;
    font-weight: 850;
    overflow-wrap: anywhere;
}

/* Premium login redesign */
.login-page {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 18% 18%, rgba(15, 122, 74, .12), transparent 30%),
        radial-gradient(circle at 82% 12%, rgba(37, 99, 235, .10), transparent 28%),
        linear-gradient(135deg, #f8fbfd 0%, #eef6f1 52%, #f6f9fc 100%);
    isolation: isolate;
    overflow-x: hidden;
    overflow-y: auto;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(rgba(15, 23, 42, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, .055) 1px, transparent 1px);
    background-size: 38px 38px;
}

.login-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(120deg, transparent 0%, rgba(15, 122, 74, .045) 48%, transparent 49%),
        linear-gradient(60deg, transparent 0%, rgba(37, 99, 235, .035) 50%, transparent 51%);
    background-size: 340px 340px, 280px 280px;
    opacity: .8;
}

.login-shell {
    width: min(440px, 100%);
    grid-template-columns: 1fr;
    gap: 0;
    z-index: 2;
}

.login-panel {
    border: 1px solid rgba(203, 213, 225, .92);
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .14);
}

.login-form-panel {
    padding: 34px;
    background: rgba(255, 255, 255, .97);
    border-color: rgba(203, 213, 225, .95);
}

.login-project-panel {
    position: relative;
    min-height: 560px;
    padding: 38px;
    color: #fff;
    background:
        linear-gradient(160deg, rgba(8, 56, 36, .92), rgba(15, 23, 42, .72)),
        rgba(15, 23, 42, .88);
}

.login-project-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 78% 18%, rgba(255, 255, 255, .16), transparent 24%),
        linear-gradient(180deg, transparent, rgba(2, 6, 23, .18));
}

.login-project-panel > *:not(.login-project-overlay) {
    position: relative;
    z-index: 1;
}

.login-project-head h2 {
    max-width: 560px;
    margin: 16px 0 10px;
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4vw, 3.1rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: 0;
}

.login-project-head p {
    max-width: 560px;
    color: rgba(255, 255, 255, .78);
    font-size: 1rem;
    line-height: 1.55;
}

.login-kicker {
    color: #c7f9df;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: 8px 12px;
}

.login-projects {
    margin-top: auto;
    display: grid;
    gap: 12px;
}

.login-project-card {
    grid-template-columns: 48px 1fr;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    backdrop-filter: blur(12px);
}

.login-project-card strong {
    color: #fff;
    font-family: var(--font-display);
}

.login-project-card p {
    color: rgba(255, 255, 255, .72);
}

.login-project-card.active {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(199, 249, 223, .36);
}

.project-icon {
    background: rgba(199, 249, 223, .14);
    color: #c7f9df;
    border: 1px solid rgba(199, 249, 223, .22);
}

.login-system-strip {
    margin-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding-top: 16px;
}

.login-system-strip span {
    color: rgba(255, 255, 255, .8);
}

.login-brand {
    justify-content: center;
    text-align: left;
}

.login-brand h1 {
    white-space: normal;
    font-size: 1.02rem;
}

.login-intro {
    text-align: left;
}

.login-intro h2 {
    font-size: 1.55rem;
}

.login-input-wrap .form-control {
    min-height: 48px;
    border-radius: 13px;
    background: #f8fafc;
}

.login-input-wrap .form-control:focus {
    background: #fff;
}

.login-form .btn {
    min-height: 50px;
    border-radius: 13px;
    font-size: .98rem;
}

.login-secure-note {
    justify-content: center;
    border-radius: 12px;
    background: #f8fafc;
    padding: 12px;
}

@media (max-width: 920px) {
    .login-page {
        align-items: flex-start;
    }

    .login-shell {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

}

@media (max-width: 560px) {
    .login-page {
        padding: 14px;
    }

    .login-form-panel {
        padding: 20px;
        border-radius: 18px;
    }


    .login-brand {
        align-items: center;
    }

    .login-logo-mark {
        flex-basis: 58px;
        width: 58px;
        height: 58px;
    }

    .login-project-card {
        grid-template-columns: 42px 1fr;
    }
}

/* Global responsive hardening */
html {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    min-width: 0;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

canvas {
    max-width: 100%;
}

.app-shell,
.main-wrapper,
.main-content,
.content,
.container,
.container-fluid,
.row,
.card,
.card-body,
.table-card,
.stat-card,
.modal-content {
    min-width: 0;
}

.content,
.main-content {
    width: 100%;
    max-width: 100%;
    padding-inline: clamp(10px, 2vw, 24px);
}

.row > [class*="col-"] {
    min-width: 0;
}

.page-header,
.page-title,
.section-header,
.card-header,
.table-toolbar,
.table-footer,
.dataTables_wrapper .row {
    min-width: 0;
    flex-wrap: wrap;
    gap: 10px;
}

.page-title h1,
.page-title h2,
.card-header h2,
.card-header h3,
.section-title,
.brand-title,
.topnav a span,
.topnav-dropdown-toggle span {
    overflow-wrap: anywhere;
}

.form-control,
.form-select,
textarea,
select,
.input-group,
.login-input-wrap {
    max-width: 100%;
}

.btn,
.form-control,
.form-select {
    min-width: 0;
}

.table-responsive,
.dataTables_wrapper,
.dataTables_scroll,
.dataTables_scrollHead,
.dataTables_scrollBody {
    max-width: 100%;
}

.dataTables_scrollBody,
.table-responsive,
.bilan-inline-scroll,
.bilan-sheet-table-wrap,
.chart-wrap,
.stats-chart-wrap {
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.table-card table.table,
.table-card table.dataTable,
.dataTables_scrollHeadInner table,
.dataTables_scrollBody table {
    max-width: none;
    table-layout: auto;
}

.table-card th,
.table-card td,
.dataTable th,
.dataTable td {
    vertical-align: middle;
    word-break: normal;
    overflow-wrap: normal;
}

.table-card td:last-child,
.table-card th:last-child,
.dataTable td:last-child,
.dataTable th:last-child,
.actions {
    white-space: nowrap;
}

.cell-nowrap,
.cell-date {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

.cell-date {
    min-width: 108px;
}

.modal-dialog {
    max-width: min(96vw, var(--bs-modal-width, 900px));
}

.modal-content {
    max-height: calc(100dvh - 24px);
}

.modal-body {
    overflow: auto;
}

@media (max-width: 1199px) {
    .topbar {
        max-width: 100vw;
        padding: 10px 16px;
        gap: 10px;
        grid-template-columns: minmax(180px, auto) minmax(0, 1fr) auto auto;
    }

    .topbar-main,
    .brand {
        min-width: 0;
    }

    .brand-title {
        max-width: min(46vw, 520px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topnav {
        max-width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: visible;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .topnav a,
    .topnav-dropdown-toggle {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .secretariat-topnav {
        display: flex;
    }

    .stat-card {
        min-height: 128px;
    }
}

@media (max-width: 991px) {
    .content,
    .main-content {
        padding-inline: 14px;
    }

    .page-header,
    .table-toolbar,
    .table-footer {
        align-items: stretch;
    }

    .table-search-wrap,
    .dataTables_filter,
    .dataTables_filter label,
    .dataTables_filter input {
        width: 100% !important;
    }

    .table-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .table-card table.table,
    .table-card table.dataTable,
    .dataTables_scrollHeadInner,
    .dataTables_scrollHeadInner table,
    .dataTables_scrollBody table {
        min-width: 820px !important;
        width: max-content !important;
    }

    .bilan-sheet,
    .bilan-sheet table,
    .bilan-table {
        min-width: 820px;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 15px;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 1040;
        align-items: center;
        padding: 9px 12px;
    }

    .topbar-main {
        flex: 1 1 calc(100% - 60px);
    }

    .brand-logo-frame {
        flex: 0 0 42px;
        width: 42px;
        height: 38px;
    }

    .brand-title {
        max-width: calc(100vw - 180px);
        font-size: .98rem;
    }

    .user-area {
        margin-left: auto;
    }

    #toggleTopnav {
        min-width: 42px;
        min-height: 42px;
        padding: 0;
    }

    .topnav {
        display: none;
        order: 10;
        width: 100%;
        max-height: calc(100dvh - 78px);
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 6px;
        overflow: auto;
        padding: 8px;
        border: 1px solid rgba(203, 213, 225, .9);
        border-radius: 14px;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 18px 38px rgba(15, 23, 42, .14);
    }

    .topnav.open {
        display: flex;
    }

    .topnav a,
    .topnav-dropdown,
    .topnav-dropdown-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .topnav a,
    .topnav-dropdown-toggle {
        min-height: 42px;
        white-space: normal;
    }

    .topnav-submenu {
        position: static !important;
        transform: none !important;
        width: 100%;
        margin-top: 4px !important;
        border-radius: 12px;
        box-shadow: none;
    }

    .dropdown-menu.topnav-submenu.show {
        display: block;
    }

    .notification-menu {
        position: fixed !important;
        inset: 72px 10px auto 10px !important;
        width: auto;
        max-height: calc(100dvh - 84px);
        transform: none !important;
    }

    .notification-list {
        max-height: calc(100dvh - 178px);
    }

    .page-header,
    .page-title,
    .section-header,
    .card-header {
        align-items: flex-start;
    }

    .page-header .btn,
    .section-header .btn,
    .card-header .btn {
        width: 100%;
        justify-content: center;
    }

    .stats-grid,
    .dashboard-stats,
    .summary-grid {
        grid-template-columns: 1fr !important;
    }

    .user-active-grid {
        grid-template-columns: 1fr;
    }

    .user-active-profile {
        align-items: flex-start;
    }

    .secretariat-activity-chart {
        min-height: 280px;
        padding: 10px 8px 6px;
        overflow: hidden !important;
    }

    .secretariat-activity-card .card-header {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .secretariat-activity-card .card-header strong {
        font-size: .95rem;
    }

    .secretariat-year-filter {
        width: 100%;
        margin-left: 0;
    }

    .secretariat-year-filter .form-select {
        width: 100%;
        height: 42px;
        border-radius: 14px;
    }

    .secretariat-activity-chart canvas {
        width: 100% !important;
        height: 245px !important;
        min-width: 0 !important;
    }

    .stat-card {
        min-height: 116px;
        padding: 18px;
    }

    .table-card {
        border-radius: 14px;
    }

    .table-card > .card-body:not(.table-responsive):not(.p-0) {
        padding: 0;
    }

    .table-card table.table,
    .table-card table.dataTable,
    .table-responsive > table,
    .dataTables_scrollHeadInner,
    .dataTables_scrollHeadInner table,
    .dataTables_scrollBody table {
        min-width: 760px !important;
        width: max-content !important;
    }

    .dataTables_wrapper .dataTables_paginate,
    .table-footer,
    .dataTables_length {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .actions,
    .btn-group,
    .table-actions {
        display: inline-flex;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .modal-dialog {
        width: calc(100% - 20px);
        margin: 10px auto;
    }

    .modal-content {
        border-radius: 16px;
        max-height: calc(100dvh - 20px);
    }

    .login-page {
        align-items: flex-start;
        padding: 14px;
    }

    .login-shell {
        width: min(100%, 440px);
    }
}

@media (max-width: 575px) {
    .content,
    .main-content {
        padding-inline: 10px;
    }

    .dashboard-chart-body,
    .cotisation-chart-wrap,
    .baptise-chart-canvas {
        min-height: 240px;
        padding: 10px;
        overflow: hidden !important;
    }

    .dashboard-chart-body canvas,
    .cotisation-chart-wrap canvas {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .baptise-chart-layout {
        gap: 14px;
    }

    .baptise-chart-canvas canvas {
        width: 100% !important;
        max-width: 260px;
        height: 240px !important;
    }

    .brand-title {
        max-width: calc(100vw - 160px);
        font-size: .9rem;
    }

    .card,
    .table-card,
    .modal-content,
    .login-panel {
        border-radius: 14px;
    }

    .user-active-profile {
        padding: 18px;
        flex-direction: column;
    }

    .user-active-avatar {
        width: 62px;
        height: 62px;
        flex-basis: 62px;
        border-radius: 18px;
        font-size: 1.25rem;
    }

    .user-active-grid {
        padding: 12px;
        gap: 12px;
    }

    .user-active-card {
        padding: 14px;
    }

    .card-body,
    .login-form-panel {
        padding: 16px;
    }

    .page-title h1,
    .page-title h2,
    .login-intro h2 {
        font-size: 1.35rem;
        line-height: 1.2;
    }

    .btn {
        min-height: 42px;
        white-space: normal;
    }

    .form-control,
    .form-select {
        min-height: 44px;
    }

    .table-card table.table,
    .table-card table.dataTable,
    .table-responsive > table,
    .dataTables_scrollHeadInner,
    .dataTables_scrollHeadInner table,
    .dataTables_scrollBody table {
        min-width: 700px !important;
    }

    .table-card table.dataTable.dtr-inline.collapsed,
    .table-card table.dataTable.dtr-inline.collapsed > tbody,
    .table-card table.dataTable.dtr-inline.collapsed > tbody > tr,
    .table-card table.dataTable.dtr-inline.collapsed > tbody > tr > td {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    table.dataTable > tbody > tr.child td.child {
        padding: 0 14px 14px !important;
    }

    table.dataTable > tbody > tr.child ul.dtr-details {
        display: grid;
        gap: 0;
        width: 100% !important;
    }

    table.dataTable > tbody > tr.child ul.dtr-details > li {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 11px 0;
    }

    table.dataTable > tbody > tr.child span.dtr-title {
        font-size: .78rem;
        text-transform: none;
    }

    table.dataTable > tbody > tr.child span.dtr-data {
        font-size: .88rem;
        line-height: 1.35;
    }

    .cell-date {
        min-width: 104px;
    }

    .bilan-sheet,
    .bilan-sheet table,
    .bilan-table {
        min-width: 760px;
    }
}

@media (orientation: landscape) and (max-height: 560px) {
    .login-page {
        align-items: flex-start;
        padding-block: 10px;
    }

    .topnav.open {
        max-height: calc(100dvh - 68px);
    }

    .modal-content {
        max-height: calc(100dvh - 14px);
    }
}

@media (pointer: coarse) {
    .btn,
    .topnav a,
    .topnav-dropdown-toggle,
    .actions .btn,
    .table-actions .btn,
    .password-toggle-btn {
        min-height: 42px;
    }

    .actions .btn,
    .table-actions .btn,
    .password-toggle-btn {
        min-width: 42px;
    }
}

/* Final topbar alignment pass */
@media (min-width: 768px) {
    .topbar {
        display: grid !important;
        grid-template-columns: minmax(210px, auto) minmax(0, 1fr) auto auto !important;
        align-items: center !important;
        gap: 14px !important;
    }

    .topbar-main {
        width: auto !important;
        min-width: 0 !important;
    }

    .topnav {
        display: flex !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 0 1 auto !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        order: initial !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        border-top: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 3px !important;
        scrollbar-width: none;
    }

    .topnav::-webkit-scrollbar {
        display: none;
    }

    .topnav a,
    .topnav-dropdown-toggle {
        width: auto !important;
        min-height: 40px;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }

    .notification-area,
    .user-area {
        flex: 0 0 auto;
    }
}

@media (min-width: 768px) and (max-width: 1280px) {
    .topbar {
        grid-template-columns: minmax(170px, auto) minmax(0, 1fr) auto auto !important;
        padding-inline: 16px;
    }

    .brand-logo-frame {
        flex-basis: 46px;
        width: 46px;
    }

    .brand-title {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topnav a,
    .topnav-dropdown-toggle {
        gap: 7px;
        padding: 9px 10px;
        font-size: .82rem;
    }

    .user-dropdown {
        width: 44px;
        height: 44px;
    }

    .notification-button {
        width: 38px;
        height: 38px;
    }
}

/* Final mobile topbar/menu pass */
@media (max-width: 767px) {
    .topbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto auto !important;
        align-items: center !important;
        column-gap: 8px !important;
        row-gap: 10px !important;
        padding: 9px 12px !important;
    }

    .topbar-main {
        grid-column: 1;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .brand {
        min-width: 0 !important;
        gap: 9px !important;
    }

    .brand-title {
        max-width: none !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    #toggleTopnav {
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        border-radius: 12px !important;
    }

    .notification-area {
        grid-column: 2;
        justify-self: end;
    }

    .user-area {
        grid-column: 3;
        justify-self: end;
        width: auto !important;
        margin-left: 0 !important;
        order: initial !important;
    }

    .topnav {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        display: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        max-height: calc(100dvh - 92px) !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
        padding: 8px !important;
        margin-top: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        border: 0 !important;
        border-top: 1px solid rgba(226, 232, 240, .95) !important;
        border-bottom: 1px solid rgba(226, 232, 240, .95) !important;
        border-radius: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .topnav.open {
        display: flex !important;
    }

    .topnav a,
    .topnav-dropdown-toggle {
        width: 100% !important;
        min-height: 44px !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        padding: 10px 12px !important;
        white-space: nowrap !important;
        border-radius: 9px !important;
    }

    .topnav a span,
    .topnav-dropdown-toggle span {
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .topnav a i:first-child,
    .topnav-dropdown-toggle i:first-child {
        flex: 0 0 22px !important;
        width: 22px !important;
        text-align: center !important;
    }

    .topnav-dropdown {
        display: block !important;
        width: 100% !important;
    }

    .topnav-dropdown-chevron {
        margin-left: auto !important;
        flex: 0 0 auto !important;
    }

    .topnav-submenu {
        width: 100% !important;
        max-width: none !important;
        margin: 4px 0 6px !important;
        padding: 6px !important;
        border-radius: 12px !important;
    }
}

/* Secretariat desktop dropdown fix */
@media (min-width: 768px) {
    .secretariat-topnav {
        overflow: visible !important;
        z-index: 30;
    }

    .secretariat-topnav .topnav-dropdown {
        position: relative;
    }

    .secretariat-topnav .topnav-submenu {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 0 !important;
        transform: none !important;
        margin: 0 !important;
        z-index: 1055;
    }
}

/* SweetAlert2 professional theme */
.swal2-container {
    z-index: 2000;
}

.swal2-container.swal2-backdrop-show,
.swal2-container.swal2-noanimation {
    background: rgba(15, 23, 42, .48) !important;
    backdrop-filter: blur(4px);
}

.app-swal.swal2-popup {
    width: min(460px, calc(100vw - 32px)) !important;
    padding: 30px 30px 26px !important;
    border: 1px solid rgba(226, 232, 240, .95) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .24) !important;
    font-family: var(--font-ui) !important;
}

.app-swal .app-swal-icon.swal2-icon {
    width: 72px !important;
    height: 72px !important;
    margin: 0 auto 20px !important;
    border-width: 3px !important;
}

.app-swal .app-swal-title.swal2-title {
    margin: 0 !important;
    padding: 0 !important;
    color: #111827 !important;
    font-family: var(--font-display) !important;
    font-size: clamp(1.35rem, 3vw, 1.85rem) !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
}

.app-swal .app-swal-text.swal2-html-container {
    margin: 12px auto 0 !important;
    padding: 0 !important;
    max-width: 360px;
    color: #5b6472 !important;
    font-size: .98rem !important;
    line-height: 1.55 !important;
    font-weight: 500 !important;
}

.app-swal .app-swal-actions.swal2-actions {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 26px 0 0 !important;
    width: 100% !important;
}

.app-swal-btn {
    min-width: 132px;
    min-height: 46px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    padding: 11px 18px;
    font-family: var(--font-display);
    font-size: .92rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.app-swal-btn:hover {
    transform: translateY(-1px);
}

.app-swal-btn:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .22);
    outline-offset: 2px;
}

.app-swal-btn-danger {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 12px 24px rgba(220, 38, 38, .22);
}

.app-swal-btn-danger:hover {
    background: #b91c1c;
    color: #fff;
}

.app-swal-btn-success {
    background: var(--green);
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 122, 74, .22);
}

.app-swal-btn-success:hover {
    background: var(--green-dark);
    color: #fff;
}

.app-swal-btn-warning {
    background: #d97706;
    color: #fff;
    box-shadow: 0 12px 24px rgba(217, 119, 6, .22);
}

.app-swal-btn-warning:hover {
    background: #b45309;
    color: #fff;
}

.app-swal-btn-muted {
    background: #eef2f7;
    color: #334155;
    box-shadow: inset 0 0 0 1px rgba(203, 213, 225, .88);
}

.app-swal-btn-muted:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.app-swal-toast.swal2-popup {
    border: 1px solid rgba(226, 232, 240, .95) !important;
    border-radius: 10px !important;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .18) !important;
    font-family: var(--font-ui) !important;
}

@media (max-width: 575px) {
    .app-swal.swal2-popup {
        padding: 24px 18px 20px !important;
    }

    .app-swal .app-swal-actions.swal2-actions {
        flex-direction: column-reverse !important;
        gap: 8px !important;
    }

    .app-swal-btn {
        width: 100%;
        min-width: 0;
    }
}

.swal2-popup:not(.swal2-toast):not(.app-swal) {
    width: min(440px, calc(100vw - 32px)) !important;
    border: 1px solid rgba(226, 232, 240, .95) !important;
    border-radius: 12px !important;
    box-shadow: 0 28px 70px rgba(15, 23, 42, .22) !important;
    font-family: var(--font-ui) !important;
}

.swal2-popup:not(.swal2-toast):not(.app-swal) .swal2-title {
    color: #111827 !important;
    font-family: var(--font-display) !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

.swal2-popup:not(.swal2-toast):not(.app-swal) .swal2-html-container {
    color: #5b6472 !important;
    font-weight: 500 !important;
}

/* Permissions modal scroll fix */
#permissionsModal .modal-dialog {
    max-width: min(96vw, 1720px);
    margin-top: 16px;
    margin-bottom: 16px;
}

#permissionsModal .modal-content,
#permissionsModal .modal-content > form {
    max-height: calc(100dvh - 32px);
}

#permissionsModal .modal-content > form {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#permissionsModal .modal-header,
#permissionsModal .modal-footer {
    flex: 0 0 auto;
}

#permissionsModal .modal-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 18px;
}

#permissionsModal .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 0 -12px 24px rgba(15, 23, 42, .06);
}

#permissionsModal .permission-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    padding-bottom: 22px;
}

@media (max-width: 767px) {
    #permissionsModal .modal-dialog {
        margin: 8px;
        max-width: calc(100vw - 16px);
    }

    #permissionsModal .modal-content,
    #permissionsModal .modal-content > form {
        max-height: calc(100dvh - 16px);
    }

    #permissionsModal .modal-footer {
        align-items: stretch;
    }
}

/* Baptism count table indicator */
.baptism-count-cell {
    width: 1%;
    min-width: 70px;
    white-space: nowrap;
}

.baptism-count-pill {
    position: relative;
    min-width: 54px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 8px 5px 10px;
    overflow: hidden;
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 9px;
    background: linear-gradient(145deg, rgba(236, 253, 245, .95), rgba(255, 255, 255, .98));
    color: var(--green-dark);
    box-shadow: 0 7px 16px rgba(15, 23, 42, .06), inset 0 1px 0 rgba(255, 255, 255, .9);
    white-space: nowrap;
}

.baptism-count-pill::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--green), #2563eb);
}

.baptism-count-pill i {
    width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    background: rgba(15, 122, 74, .1);
    color: rgba(15, 122, 74, .95);
    box-shadow: inset 0 0 0 1px rgba(15, 122, 74, .14);
    font-size: .62rem;
}

.baptism-count-pill strong {
    color: #0f172a;
    font-family: var(--font-display);
    font-size: .88rem;
    font-weight: 900;
    line-height: 1;
}

@media (max-width: 767px) {
    .baptism-count-cell {
        min-width: 58px;
    }

    .baptism-count-pill {
        min-width: 48px;
        padding: 4px 7px 4px 9px;
    }
}

/* Baptism monthly evolution chart */
.baptism-monthly-card .card-header {
    gap: 12px;
}

.baptism-year-filter {
    margin: 0;
}

.baptism-year-filter .form-select {
    min-width: 112px;
    border-radius: 9px;
    border-color: rgba(203, 213, 225, .95);
    color: #1f2937;
    font-family: var(--font-display);
    font-weight: 800;
    box-shadow: none;
}

.baptism-monthly-chart-wrap {
    min-height: 330px;
}

@media (max-width: 767px) {
    .baptism-monthly-card .card-header {
        align-items: stretch;
    }

    .baptism-year-filter,
    .baptism-year-filter .form-select {
        width: 100%;
    }

    .baptism-monthly-chart-wrap {
        min-height: 280px;
    }
}
/* Advanced table filters */
.advanced-table-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) repeat(3, minmax(150px, .8fr)) repeat(2, minmax(96px, .45fr)) auto;
    align-items: end;
    gap: 10px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid rgba(226, 232, 240, .95);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.filter-field {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.filter-field label {
    margin: 0;
    color: #526173;
    font-family: var(--font-display);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.advanced-table-filters .form-select,
.advanced-table-filters .form-control {
    min-height: 38px;
    border-color: rgba(203, 213, 225, .95);
    border-radius: 9px;
    color: #111827;
    font-size: .8rem;
    font-weight: 700;
    box-shadow: none;
}

.advanced-table-filters .form-select:focus,
.advanced-table-filters .form-control:focus {
    border-color: rgba(37, 99, 235, .65);
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .13);
}

.advanced-table-filters .btn {
    min-height: 38px;
    border-radius: 9px;
    font-family: var(--font-display);
    font-weight: 850;
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .advanced-table-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .advanced-table-filters .btn {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .advanced-table-filters {
        grid-template-columns: 1fr;
        padding: 12px;
    }
}
/* New baptises monthly chart and compact gender card */
.baptise-gender-distribution-card {
    width: 100%;
}

.baptise-gender-distribution-card .baptise-chart-layout {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.baptise-gender-distribution-card .baptise-chart-canvas {
    max-width: 280px;
    min-height: 200px;
}

.baptise-gender-distribution-card .baptise-chart-canvas canvas {
    max-height: 190px;
}
.baptise-gender-distribution-card .baptise-chart-legend {
    min-width: 0;
    gap: 9px;
}

@media (max-width: 991px) {
    .baptise-gender-distribution-card {
        max-width: none;
    }

    .baptise-gender-distribution-card .baptise-chart-layout {
        grid-template-columns: 1fr;
    }

    .baptise-gender-distribution-card .baptise-chart-canvas {
        max-width: none;
        min-height: 240px;
    }
}
.baptise-gender-distribution-card .card-body {
    padding-block: 12px;
}

.baptise-gender-distribution-card .baptise-gender-summary {
    gap: 8px;
}

.baptise-gender-distribution-card .baptise-gender-card {
    min-height: 68px;
    padding: 9px 12px;
}
.baptise-gender-distribution-card .baptise-gender-card strong {
    margin: 3px 0 1px;
    font-size: 1.15rem;
}

.baptise-gender-distribution-card .baptise-assembly-list {
    gap: 8px;
    max-height: 132px;
    overflow-y: auto;
    padding-right: 4px;
}

.baptise-gender-distribution-card .baptise-legend-item {
    min-height: 38px;
    padding: 7px 10px;
}
.baptise-gender-distribution-card .baptise-legend-item strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Cotisation period breakdown */
.cotisation-period-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.cotisation-period-filter .form-select {
    min-width: 112px;
    border-radius: 9px;
    border-color: rgba(203, 213, 225, .95);
    color: #172033;
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 800;
    box-shadow: none;
}

.cotisation-breakdown-card .card-header {
    gap: 12px;
}

.cotisation-breakdown-table {
    min-width: 620px;
}

.cotisation-breakdown-table th,
.cotisation-breakdown-table td {
    text-align: center;
    vertical-align: middle;
}

.cotisation-breakdown-table tbody td:first-child,
.cotisation-breakdown-table tbody td:last-child,
.cotisation-breakdown-table tfoot th:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cotisation-breakdown-table tbody td:nth-child(2) {
    color: #0f172a;
    font-family: var(--font-display);
    font-weight: 850;
}

.cotisation-breakdown-table tfoot th {
    border-bottom: 0 !important;
    background: linear-gradient(135deg, #8bd34b, #76c93d) !important;
    color: #06140a !important;
    font-family: var(--font-display);
    font-size: .92rem;
    font-weight: 950;
    letter-spacing: .02em;
    text-transform: uppercase;
}

@media (max-width: 767px) {
    .cotisation-period-filter {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr auto;
    }

    .cotisation-period-filter .form-select,
    .cotisation-period-filter .btn {
        width: 100%;
    }
}
/* Professional table edit actions */
.actions .js-edit-feedback,
.actions .js-secretariat-edit,
.table-card .actions .btn-success.bilan-icon-btn {
    color: #fff !important;
    border: 0 !important;
    background: linear-gradient(135deg, #0f7a4a, #16a36b) !important;
    box-shadow: 0 8px 18px rgba(15, 122, 74, .22) !important;
}

.actions .js-edit-feedback:hover,
.actions .js-secretariat-edit:hover,
.table-card .actions .btn-success.bilan-icon-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #0b6b40, #0f8f5a) !important;
    box-shadow: 0 12px 22px rgba(15, 122, 74, .28) !important;
}

.actions .js-edit-feedback:focus-visible,
.actions .js-secretariat-edit:focus-visible,
.table-card .actions .btn-success.bilan-icon-btn:focus-visible {
    outline: 3px solid rgba(22, 163, 107, .22);
    outline-offset: 2px;
}
