:root{--navy:#123d8f;--blue:#2563eb;--text:#13264a;--muted:#74829d;--border:#e5eaf2;--bg:#f7f9fd;--shadow:0 8px 28px rgba(35,65,120,.08);--green:#16a673;--red:#e85f5f;--amber:#eea32b;--violet:#7057d8}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--text);background:var(--bg)}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}
.app-shell{min-height:100vh;display:flex}.sidebar{width:228px;background:#fff;border-right:1px solid var(--border);padding:18px 14px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:9}.brand,.mini-brand,.login-brand{display:flex;align-items:center;gap:10px}.brand{padding:5px 8px 22px}.brand strong,.mini-brand strong,.login-brand strong{display:block;color:#173777;letter-spacing:2px;font-size:18px}.brand span,.mini-brand span,.login-brand span{display:block;color:#7c8aa3;letter-spacing:1.4px;font-size:8px}.shield{width:48px;height:55px;border:2px solid var(--blue);color:var(--blue);border-radius:50% 50% 45% 45%/35% 35% 70% 70%;display:grid;place-items:center;font-weight:900;font-size:22px}.shield.small{width:34px;height:40px;font-size:16px}
.sidebar nav{flex:1;overflow:auto}.nav-label{font-size:10px;font-weight:800;color:#31466f;margin:17px 10px 7px}.nav-item{min-height:41px;display:flex;align-items:center;gap:10px;padding:0 11px;border-radius:8px;margin:2px 0;font-size:13px;color:#2f456d}.nav-item span{width:18px;color:#4b6fb5}.nav-item:hover{background:#f5f8fe}.nav-item.active{background:#eaf2ff;color:#123e93;font-weight:700}.support-card{border:1px solid var(--border);border-radius:12px;background:#f8fbff;padding:14px;box-shadow:var(--shadow);font-size:11px}.support-card p{color:var(--muted);line-height:1.5}.sidebar-footer{text-align:center;color:#8c98aa;font-size:9px;padding-top:18px}
.main{margin-left:228px;width:calc(100% - 228px)}.topbar{height:70px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 27px;position:sticky;top:0;z-index:8}.search-box{flex:1;max-width:860px;height:39px;display:flex;align-items:center;gap:9px;padding:0 13px;border:1px solid var(--border);border-radius:10px;background:#fbfcff}.search-box input{border:0;outline:0;width:100%;background:transparent}.top-actions{margin-left:auto;display:flex;align-items:center;gap:10px}.top-actions button{border:0;background:transparent;color:#344b77}.profile{display:flex;align-items:center;gap:8px;margin-left:4px}.profile>div:last-child{display:flex;flex-direction:column}.profile strong{font-size:11px}.profile span{font-size:9px;color:var(--muted)}.avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#1c4aaa,#6c8bd3);color:#fff;display:grid;place-items:center;font-weight:800}.logout{font-size:10px;color:#68758a}.content{padding:22px 30px 40px}
.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:18px}.page-head h1{margin:0 0 4px;font-size:25px}.page-head p{margin:0;color:var(--muted);font-size:12px}.breadcrumb{font-size:10px;color:#8794aa;margin-bottom:7px}
.btn{border:0;border-radius:7px;min-height:38px;padding:0 15px;font-size:10px;font-weight:800;cursor:pointer}.btn.primary{background:linear-gradient(135deg,#103b8e,#1242a7);color:#fff;box-shadow:0 6px 15px rgba(17,61,159,.18)}.btn.soft{background:#fff;border:1px solid var(--border);color:#344b70}.btn.light{background:#fff;color:#174aab}.btn.block{width:100%}.btn.lg{height:46px}
.global-filter-card,.panel,.category-card,.rail-card,.simple-card{background:#fff;border:1px solid var(--border);border-radius:13px;box-shadow:var(--shadow)}.global-filter-card{display:flex;gap:18px;align-items:end;padding:16px 18px;margin-bottom:17px;flex-wrap:wrap}.field{min-width:145px;display:flex;flex-direction:column;gap:7px}.field.small{min-width:105px}.field.wide{flex:1;min-width:280px}.field label,.email-panel label{font-size:9px;font-weight:800;color:#4d6088}.field input,.field select,.email-panel input,.email-panel textarea,.setup-card input{height:38px;border:1px solid var(--border);border-radius:7px;background:#fbfcff;color:var(--text);padding:0 11px;outline:0}.readonly{height:38px;border:1px solid var(--border);border-radius:7px;background:#fbfcff;display:flex;align-items:center;padding:0 11px;font-size:11px}.filter-btn{margin-left:auto}
.report-layout{display:grid;grid-template-columns:minmax(0,1fr) 205px;gap:15px}.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}.category-card{padding:14px}.category-head{display:flex;gap:11px;align-items:center;margin-bottom:10px}.category-icon{width:43px;height:43px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:900;font-size:18px;flex:0 0 auto}.c1,.c7{background:linear-gradient(135deg,#a38cff,#7358d9)}.c2{background:linear-gradient(135deg,#68d49c,#2caf73)}.c3{background:linear-gradient(135deg,#65a4ff,#2d69d9)}.c4{background:linear-gradient(135deg,#ffca5f,#ef9f21)}.c5{background:linear-gradient(135deg,#38c9c2,#049a9a)}.c6{background:linear-gradient(135deg,#ff9696,#e65d69)}.category-head h2{margin:0;color:#173b8a;font-size:13px}.category-head p{margin:4px 0 0;color:var(--muted);font-size:10px}.report-links{border:1px solid #edf1f7;border-radius:8px;overflow:hidden}.report-links a{display:grid;grid-template-columns:18px minmax(0,1fr) 18px 18px;align-items:center;gap:5px;min-height:31px;padding:5px 8px;border-bottom:1px solid #f1f4f9;font-size:10px}.report-links a:hover{background:#f6f9ff;color:#1749ad}.right-rail{display:flex;flex-direction:column;gap:14px}.rail-card{padding:15px}.rail-card h3{font-size:10px;color:#27467f;margin:0 0 12px}.rail-card a{display:flex;gap:8px;padding:8px 0;font-size:10px;color:#526a95}.rail-card strong{display:block;font-size:10px;margin-bottom:4px}.rail-card p{font-size:10px;color:var(--muted);line-height:1.5}.period-icon{font-size:24px;color:var(--blue);margin-bottom:8px}.green-text{display:block;color:var(--green);font-size:10px;margin-top:7px}
.simple-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.simple-card{padding:18px;display:grid;grid-template-columns:42px 1fr 20px;gap:12px;align-items:center}.simple-card h2{margin:0;font-size:14px;color:#173b8a}.simple-card p{margin:5px 0 0;font-size:11px;color:var(--muted)}.simple-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#edf4ff;color:#2562ca}
.panel{padding:17px 18px;margin-bottom:16px}.step-title{display:flex;align-items:center;gap:10px;margin-bottom:14px}.step-title h2{margin:0;color:#173b8a;font-size:12px}.step-title p{margin:3px 0 0;color:var(--muted);font-size:10px}.step{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:800;font-size:11px}.n1{background:var(--green)}.n2{background:var(--blue)}.n3{background:var(--violet)}.n4{background:var(--amber)}.procedure-form{display:flex;gap:14px;align-items:end;flex-wrap:wrap}.execute{min-width:130px}
.alert{margin-top:13px;border-radius:8px;padding:11px 13px;font-size:11px}.alert.success{background:#eefaf5;border:1px solid #cfece0;color:#147553}.alert.danger{background:#fff1f1;border:1px solid #f2cccc;color:#a23434}
.run-layout{display:grid;grid-template-columns:minmax(0,1fr) 275px;gap:16px;align-items:stretch}.result-panel{padding-left:0;padding-right:0;min-width:0}.result-panel>.step-title{padding:0 18px}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:0 18px 12px}.toolbar>div:first-child{display:flex;align-items:center;gap:6px}.row-count{font-size:10px;color:var(--muted);margin-left:7px}.table-search{height:34px;display:flex;align-items:center;gap:7px;border:1px solid var(--border);border-radius:7px;padding:0 10px}.table-search input{border:0;outline:0;background:transparent}.table-shell{overflow:auto;max-height:500px;min-height:280px;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}table{border-collapse:collapse;width:max-content;min-width:100%;background:#fff;font-size:10px}th,td{padding:8px 9px;border-right:1px solid #edf1f7;border-bottom:1px solid #edf1f7;white-space:nowrap;text-align:left}th{background:#f7f9fd;position:sticky;top:0;z-index:2}.empty{min-height:280px;display:grid;place-items:center;align-content:center;text-align:center;color:var(--muted)}.empty h3{margin:7px 0 4px;color:#3c5175;font-size:14px}.empty p{margin:0;font-size:11px}.empty-icon{font-size:32px;color:#7da1e6}.pagination{display:flex;gap:5px;align-items:center;padding:12px 18px 0}.pagination button,.pagination select{height:30px;border:1px solid var(--border);border-radius:6px;background:#fff;color:#475d80;font-size:10px}.pagination button.active{background:#173b8a;color:#fff}
.export-panel{margin-bottom:16px}.export-option{width:100%;min-height:72px;display:flex;align-items:center;gap:12px;text-align:left;border:1px solid var(--border);border-radius:10px;background:#fff;margin-bottom:10px;padding:10px 12px;cursor:pointer}.export-option span:last-child{display:flex;flex-direction:column;gap:4px}.export-option strong{font-size:11px}.export-option small{font-size:9px;color:var(--muted)}.file{width:36px;height:36px;border-radius:8px;display:grid;place-items:center;color:#fff;font-size:9px;font-weight:900}.file.excel{background:#18a565}.file.pdf{background:#ef635e}.file.word{background:#2d66c7}.file.csv{background:#ee9c2b}
.email-grid{display:grid;grid-template-columns:1.2fr .65fr 1.45fr .75fr;gap:14px}.email-panel label{display:block;margin:8px 0 6px}.email-panel input,.email-panel textarea{width:100%}.email-panel textarea{height:110px;padding:10px;resize:vertical}.radio{min-height:39px!important;display:flex!important;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--border);border-radius:7px;background:#fbfcff}.radio input{width:auto;height:auto}.send-card{background:linear-gradient(145deg,#0e3c97,#174fb8);color:#fff;border-radius:12px;padding:18px;display:flex;flex-direction:column;justify-content:center;text-align:center}.send-card>div{font-size:30px}.send-card h3{font-size:12px;margin:8px 0 5px}.send-card p{font-size:9px;line-height:1.5}.sql-panel{display:flex;align-items:center;gap:20px}.sql-panel .step-title{margin:0;flex:0 0 auto}.sql-panel code{flex:1;background:#f7f9fd;border:1px solid var(--border);border-radius:8px;padding:12px 15px;color:#1d4ca6;overflow:auto}
.login-layout{min-height:100vh;display:grid;grid-template-columns:1.2fr .8fr}.login-art{position:relative;overflow:hidden;padding:48px 60px;background:radial-gradient(circle at 30% 20%,rgba(112,154,255,.18),transparent 32%),linear-gradient(145deg,#eef4ff,#f7faff 50%,#eaf2ff)}.login-message{max-width:620px;margin-top:20vh}.eyebrow{color:#265ec4;letter-spacing:2px;font-weight:800;font-size:11px}.login-message h1{font-size:46px;line-height:1.12;letter-spacing:-1.6px;margin:12px 0 14px;color:#102a5a}.login-message p{font-size:15px;line-height:1.7;color:#5d7199}.login-kpis{display:flex;gap:15px;margin-top:32px}.login-kpis div{min-width:135px;background:rgba(255,255,255,.65);border:1px solid rgba(80,110,180,.12);border-radius:13px;padding:16px}.login-kpis strong{display:block;font-size:24px;color:#173b8a}.login-kpis span{display:block;font-size:10px;color:#7484a0}.login-panel{display:grid;place-items:center;background:#fff;padding:40px}.login-card{width:min(390px,100%)}.mini-brand{margin-bottom:42px}.login-card h2{font-size:30px;margin:0 0 5px}.muted{font-size:12px;color:var(--muted)}.login-card form{margin-top:25px}.login-card label{display:block;font-size:10px;font-weight:800;color:#40577e;margin:15px 0 7px}.input-wrap{height:44px;border:1px solid var(--border);border-radius:8px;background:#fbfcff;display:flex;align-items:center;gap:8px;padding:0 12px}.input-wrap input{border:0;outline:0;background:transparent;width:100%;height:100%}.login-options{display:flex;justify-content:space-between;align-items:center;font-size:10px;margin:12px 0 20px}.login-options label{margin:0}.login-options a{color:#2d61c2}.login-foot{text-align:center;color:#9aa5b8;font-size:9px;margin-top:30px}
.setup-page{min-height:100vh;display:grid;place-items:center}.setup-card{width:min(460px,92%);background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);padding:28px}.setup-card label{display:block;font-size:11px;font-weight:800;margin:14px 0 6px}.setup-card input{width:100%}.setup-card .btn{margin-top:18px}
@media(max-width:1150px){.report-grid{grid-template-columns:1fr}.run-layout{grid-template-columns:1fr}.email-grid{grid-template-columns:1fr 1fr}}@media(max-width:850px){.sidebar{display:none}.main{margin-left:0;width:100%}.content{padding:18px}.report-layout{grid-template-columns:1fr}.right-rail{display:none}.simple-grid{grid-template-columns:1fr}.login-layout{grid-template-columns:1fr}.login-art{display:none}.email-grid{grid-template-columns:1fr}.top-actions button,.logout{display:none}}


/* =========================
   V2 - OUTPUT / EXPORT
   ========================= */
.top-message{margin:0 0 16px}
.export-form{margin:0}
.export-option:disabled{opacity:.48;cursor:not-allowed;background:#f8f9fc}
.export-note{font-size:10px;line-height:1.5;color:#7b879c;background:#f7f9fd;border:1px dashed #d9e1ee;border-radius:8px;padding:10px}
.row-total-legacy td{font-weight:800;background:#f1f6ff;color:#153b81}
.row-total-portfolio td{font-weight:900;background:#e7f0ff;color:#0d347d;border-top:2px solid #93afe2}
.row-separator td{color:#8ca0c1;background:#fbfcff}
.row-empty td{height:18px;background:#fff;border-bottom-color:#fff;color:transparent}
.io-technical{display:flex;align-items:stretch;gap:16px;flex:1}
.io-box{flex:1;border:1px solid var(--border);border-radius:9px;background:#f9fbff;padding:12px 14px;display:flex;flex-direction:column;gap:7px;min-width:0}
.io-box>span{font-size:9px;font-weight:900;letter-spacing:.6px;color:#637799}
.io-box code{background:#fff;border:1px solid #dfe6f2;border-radius:7px;padding:10px;color:#1549a6;white-space:nowrap;overflow:auto;font-size:11px}
.io-box strong{font-size:17px;color:#143f94}
.io-box small{font-size:10px;color:#71809a}
.io-arrow{display:grid;place-items:center;color:#4775ca;font-size:22px;font-weight:800}
.send-card button:disabled{opacity:.55;cursor:not-allowed}
.diagnostic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.diag-card{background:#fff;border:1px solid var(--border);border-radius:10px;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.diag-card strong{font-size:12px}.diag-card span{font-size:10px;color:var(--muted)}
.diag-status{padding:5px 9px;border-radius:20px;font-size:9px!important;font-weight:900}
.diag-status.ok{background:#eaf9f2;color:#147451}.diag-status.warn{background:#fff6e5;color:#9a6815}.diag-status.bad{background:#fff0f0;color:#a23b3b}
@media(max-width:850px){.io-technical{flex-direction:column}.io-arrow{transform:rotate(90deg)}.diagnostic-grid{grid-template-columns:1fr}}


/* =========================
   V2.3 - SECTIONS 3 & 4 COTE A COTE
   ========================= */

/* Résultat (section 2) prend toute la largeur. */
.run-layout {
    display: block;
}

/* Ligne dédiée : Export (3) à gauche, Email (4) à droite. */
.actions-row {
    display: grid;
    grid-template-columns: minmax(330px, 0.72fr) minmax(520px, 1.28fr);
    gap: 16px;
    align-items: stretch;
    margin-top: 0;
}

.actions-col {
    min-width: 0;
}

.actions-col > .panel {
    height: 100%;
    margin-bottom: 16px;
}

/* Export : 2 cartes par ligne pour éviter une colonne très longue. */
.export-col .export-panel {
    display: block;
}

.export-col .export-form {
    display: inline-block;
    vertical-align: top;
    width: calc(50% - 6px);
    margin-right: 8px;
}

.export-col .export-form:nth-of-type(even) {
    margin-right: 0;
}

.export-col .export-option {
    min-height: 86px;
    margin-bottom: 10px;
}

/* Email : reste lisible dans la moitié droite. */
.email-col .email-panel {
    margin-top: 0;
}

.email-col .email-grid {
    grid-template-columns: 1fr 0.72fr;
    gap: 14px;
}

.email-col .email-grid > div:nth-child(3),
.email-col .email-grid > .send-card {
    grid-column: span 1;
}

.email-col .send-card {
    min-height: 180px;
}

/* Responsive */
@media (max-width: 1180px) {
    .actions-row {
        grid-template-columns: 1fr;
    }

    .email-col .email-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .export-col .export-form {
        display: block;
        width: 100%;
        margin-right: 0;
    }

    .email-col .email-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================
   V2.4 - ALIGNEMENT / FORMAT DES MONTANTS
   ========================= */

/*
 * Tous les montants sont alignés à droite dans l'aperçu Web.
 * Exemple : 256,101.00
 */
#reportTable th.cell-amount,
#reportTable td.cell-amount {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Les ratios et les compteurs sont également alignés à droite. */
#reportTable th.cell-ratio,
#reportTable td.cell-ratio,
#reportTable th.cell-count,
#reportTable td.cell-count {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Totaux : conserver l'alignement numérique à droite. */
#reportTable tr.row-total-legacy td.cell-amount,
#reportTable tr.row-total-portfolio td.cell-amount,
#reportTable tr.row-total-legacy td.cell-ratio,
#reportTable tr.row-total-portfolio td.cell-ratio,
#reportTable tr.row-total-legacy td.cell-count,
#reportTable tr.row-total-portfolio td.cell-count {
    text-align: right !important;
}


/* V2.5 - Ratios affichés en pourcentage */
#reportTable th.cell-ratio,
#reportTable td.cell-ratio {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}


/* ==========================================================
   V2.6 - RESTAURATION VISUEL PREMIUM SECTIONS 3 & 4
   ========================================================== */

/*
 * Section 2 : résultat sur toute la largeur.
 */
.run-layout {
    display: block !important;
}

/*
 * Sections 3 et 4 côte à côte, avec le rendu premium initial.
 */
.actions-row {
    display: grid !important;
    grid-template-columns: minmax(360px, 0.72fr) minmax(620px, 1.28fr) !important;
    gap: 18px !important;
    align-items: stretch !important;
    margin-top: 0 !important;
    margin-bottom: 16px !important;
}

.actions-col {
    min-width: 0 !important;
}

.actions-col > .panel,
.actions-col > aside.panel,
.actions-col > section.panel {
    display: block !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 18px !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 13px !important;
    box-shadow: var(--shadow) !important;
}

/*
 * Numéros 3 et 4 : toujours visibles.
 */
.actions-row .step-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
}

.actions-row .step {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 50% !important;
    display: inline-grid !important;
    place-items: center !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 12px !important;
}

.actions-row .step.n3 {
    background: var(--violet) !important;
}

.actions-row .step.n4 {
    background: var(--amber) !important;
}

.actions-row .step-title h2 {
    margin: 0 !important;
    color: #173b8a !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.actions-row .step-title p {
    margin: 3px 0 0 !important;
    color: var(--muted) !important;
    font-size: 10px !important;
}

/*
 * SECTION 3 - EXPORT
 * Les 4 choix restent empilés verticalement comme sur la maquette validée.
 */
.export-col .export-form {
    display: block !important;
    width: 100% !important;
    margin: 0 0 10px 0 !important;
}

.export-col .export-option {
    width: 100% !important;
    min-height: 74px !important;
    display: flex !important;
    align-items: center !important;
    gap: 13px !important;
    text-align: left !important;
    padding: 12px 14px !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 1px solid #dfe6f1 !important;
    border-radius: 11px !important;
    box-shadow: 0 2px 6px rgba(28, 58, 110, .03) !important;
    cursor: pointer !important;
}

.export-col .export-option:hover {
    background: #f8fbff !important;
    border-color: #cbd9ef !important;
    box-shadow: 0 5px 14px rgba(28, 58, 110, .07) !important;
}

.export-col .export-option:disabled {
    opacity: .50 !important;
    cursor: not-allowed !important;
}

.export-col .file {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 8px !important;
    display: grid !important;
    place-items: center !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
}

.export-col .file.excel { background: #10ad70 !important; }
.export-col .file.pdf   { background: #ff6464 !important; }
.export-col .file.word  { background: #3568c8 !important; }
.export-col .file.csv   { background: #f6a13a !important; }

.export-col .export-option > span:last-child {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
}

.export-col .export-option strong {
    color: #14233f !important;
    font-size: 11px !important;
    font-weight: 800 !important;
}

.export-col .export-option small {
    color: #71809a !important;
    font-size: 9px !important;
    line-height: 1.35 !important;
}

/*
 * SECTION 4 - EMAIL
 */
.email-col .email-panel {
    margin: 0 !important;
}

.email-col .email-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(210px, .75fr) !important;
    gap: 14px !important;
    align-items: stretch !important;
}

.email-col .email-grid > div {
    min-width: 0 !important;
}

.email-col .email-panel label {
    display: block !important;
    margin: 7px 0 6px !important;
    color: #4d6088 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
}

.email-col .email-panel input,
.email-col .email-panel textarea {
    width: 100% !important;
    border: 1px solid #e1e7f0 !important;
    border-radius: 8px !important;
    background: #fbfcff !important;
    color: var(--text) !important;
    outline: 0 !important;
}

.email-col .email-panel input {
    height: 40px !important;
    padding: 0 12px !important;
}

.email-col .email-panel textarea {
    height: 112px !important;
    padding: 10px 12px !important;
    resize: vertical !important;
}

.email-col .radio {
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 11px !important;
    margin: 0 0 8px 0 !important;
    border: 1px solid #e1e7f0 !important;
    border-radius: 8px !important;
    background: #fbfcff !important;
}

.email-col .radio input {
    width: auto !important;
    height: auto !important;
}

.email-col .send-card {
    min-height: 184px !important;
    padding: 20px !important;
    border-radius: 12px !important;
    background: linear-gradient(145deg, #173fa0, #2856c0) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 22px rgba(31, 72, 170, .18) !important;
}

.email-col .send-card > div {
    font-size: 32px !important;
}

.email-col .send-card h3 {
    margin: 8px 0 5px !important;
    color: #ffffff !important;
    font-size: 12px !important;
}

.email-col .send-card p {
    color: rgba(255,255,255,.88) !important;
    font-size: 9px !important;
    line-height: 1.5 !important;
}

.email-col .send-card .btn.light {
    min-height: 40px !important;
    background: #ffffff !important;
    color: #174aab !important;
    border-radius: 8px !important;
}

/*
 * Section 5 : restaurer la carte pleine largeur.
 */
.sql-panel {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 13px !important;
    box-shadow: var(--shadow) !important;
}

/* Responsive */
@media (max-width: 1180px) {
    .actions-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 760px) {
    .email-col .email-grid {
        grid-template-columns: 1fr !important;
    }
}


/* ==========================================================
   V2.7 - LOGO OFFICIEL INASSA
   Fichier : /images/INASSA.png
   ========================================================== */

.company-logo {
    display: block;
    object-fit: contain;
    object-position: left center;
    max-width: 100%;
    height: auto;
}

/* Dashboard / menu latéral */
.brand.brand-logo {
    padding: 4px 8px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.brand-logo-link {
    display: block;
    width: 100%;
}

.company-logo-sidebar {
    width: 150px;
    max-height: 58px;
}

/* Login : grand logo dans la zone visuelle gauche */
.login-brand.login-brand-logo {
    display: block !important;
    position: relative;
    z-index: 2;
}

.company-logo-login-main {
    width: 210px;
    max-height: 95px;
}

/* Login : logo au-dessus du formulaire */
.mini-brand.mini-brand-logo {
    display: block !important;
    margin-bottom: 38px !important;
}

.company-logo-login-panel {
    width: 175px;
    max-height: 76px;
}

/* Sur fond clair, le PNG reste net sans cadre artificiel */
.login-brand-logo img,
.mini-brand-logo img,
.brand-logo img {
    background: transparent;
}

/* Responsive */
@media (max-width: 850px) {
    .company-logo-sidebar {
        width: 140px;
    }

    .company-logo-login-panel {
        width: 160px;
    }
}
/* V2.7 - aide contextuelle pour les nouveaux paramètres de rapports */
.field-help {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}


/* ==========================================================
   V2.8 - TABLEAUX DE RESULTATS : ZEBRA + TOTALS + CURRENCY
   29/08/2026
   ========================================================== */

/* Alternance de couleur pour améliorer la lecture des grands rapports. */
#reportTable tbody tr:nth-child(odd):not(.row-total-legacy):not(.row-total-portfolio):not(.row-total-generic):not(.row-separator):not(.row-empty) td {
    background: #ffffff;
}

#reportTable tbody tr:nth-child(even):not(.row-total-legacy):not(.row-total-portfolio):not(.row-total-generic):not(.row-separator):not(.row-empty) td {
    background: #f4f8ff;
}

#reportTable tbody tr:not(.row-total-legacy):not(.row-total-portfolio):not(.row-total-generic):not(.row-separator):not(.row-empty):hover td {
    background: #eaf2ff !important;
}

/* Toute ligne dont le résultat contient TOTAL est mise en évidence. */
#reportTable tr.row-total-generic td {
    font-weight: 900 !important;
    background: #e7f0ff !important;
    color: #0d347d !important;
    border-top: 2px solid #93afe2 !important;
    border-bottom: 1px solid #b8cbed !important;
}

/* Les montants restent strictement à droite, y compris sur les totaux. */
#reportTable tr.row-total-generic td.cell-amount,
#reportTable tr.row-total-generic td.cell-ratio,
#reportTable tr.row-total-generic td.cell-count {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================
   V2.9 - ESPACE RESULTATS / ACTIONS REPLIABLES
   29/08/2026
   ========================================================== */

/* Plus d'espace vertical pour les résultats en utilisation normale. */
.result-panel .table-shell {
    max-height: 66vh;
    min-height: 360px;
}

/* Barre compacte qui remplace les grandes sections 3, 4 et 5. */
.report-actions-dock {
    margin: 0 0 16px 0;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.report-actions-bar {
    min-height: 62px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.report-actions-heading {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 210px;
}

.report-actions-heading strong {
    color: #173b8a;
    font-size: 11px;
    letter-spacing: .3px;
}

.report-actions-heading small {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

.report-actions-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.report-action-toggle {
    height: 38px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dfe6f1;
    border-radius: 9px;
    background: #ffffff;
    color: #324d7c;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.report-action-toggle:hover {
    background: #f5f8ff;
    border-color: #c6d5ef;
}

.report-action-toggle.is-active {
    background: #edf4ff;
    border-color: #9fb8e7;
    color: #143f94;
    box-shadow: 0 3px 10px rgba(28, 70, 155, .08);
}

.mini-step {
    width: 22px;
    height: 22px;
    min-width: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 9px;
    font-weight: 900;
}

.mini-step.n3,
.step.n3 { background: var(--violet); }
.mini-step.n4,
.step.n4 { background: var(--amber); }
.mini-step.n5,
.step.n5 { background: #64748b; }

.action-chevron {
    font-size: 13px;
    line-height: 1;
    transition: transform .16s ease;
}

.report-action-toggle.is-active .action-chevron {
    transform: rotate(180deg);
}

.report-action-panes {
    border-top: 1px solid transparent;
}

.report-action-pane[hidden] {
    display: none !important;
}

.report-action-pane {
    padding: 0 14px 14px;
    border-top: 1px solid #edf1f7;
    background: #fbfcff;
}

.report-actions-dock .action-inner-panel {
    margin: 14px 0 0 0 !important;
    box-shadow: none !important;
    border-color: #e2e8f2 !important;
    background: #ffffff !important;
}

.report-actions-dock .compact-step-title {
    margin-bottom: 12px !important;
}

/* Export : 4 formats sur une seule ligne quand la largeur le permet. */
.report-actions-dock .compact-export-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.report-actions-dock .compact-export-grid .export-form {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
}

.report-actions-dock .compact-export-grid .export-option {
    min-height: 68px !important;
    height: 100% !important;
}

/* Email : utilise la largeur complète seulement quand l'utilisateur l'ouvre. */
.report-actions-dock .compact-email-grid {
    display: grid !important;
    grid-template-columns: minmax(220px, 1.15fr) minmax(165px, .62fr) minmax(260px, 1.25fr) minmax(190px, .72fr) !important;
    gap: 14px !important;
}

.report-actions-dock .compact-email-grid > div {
    min-width: 0 !important;
}

.report-actions-dock .compact-email-grid .send-card {
    min-height: 178px !important;
}

/* Technique : carte horizontale compacte. */
.report-actions-dock .compact-sql-panel {
    display: block !important;
    padding: 16px 18px !important;
}

.report-actions-dock .compact-sql-panel .io-technical {
    width: 100%;
}

/* Mode focus : le tableau prend presque tout l'écran. */
body.report-focus-mode {
    overflow: hidden !important;
}

.result-panel.is-focus-mode {
    position: fixed !important;
    z-index: 9999 !important;
    top: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    left: 10px !important;
    margin: 0 !important;
    padding-top: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid #cbd8ed !important;
    border-radius: 14px !important;
    box-shadow: 0 22px 70px rgba(15, 35, 75, .28) !important;
}

.result-panel.is-focus-mode .toolbar {
    flex: 0 0 auto;
}

.result-panel.is-focus-mode .table-shell {
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: none !important;
}

.result-panel.is-focus-mode .pagination {
    flex: 0 0 auto;
    padding-bottom: 10px;
}

.result-panel.is-focus-mode .result-focus-btn {
    background: #173b8a;
    border-color: #173b8a;
    color: #ffffff;
}

@media (max-width: 1250px) {
    .report-actions-dock .compact-export-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-actions-dock .compact-email-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 760px) {
    .result-panel .table-shell {
        max-height: 62vh;
        min-height: 300px;
    }

    .report-actions-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-actions-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .report-action-toggle {
        flex: 1 1 auto;
        justify-content: center;
    }

    .report-actions-dock .compact-export-grid,
    .report-actions-dock .compact-email-grid {
        grid-template-columns: 1fr !important;
    }

    .result-panel.is-focus-mode {
        top: 4px !important;
        right: 4px !important;
        bottom: 4px !important;
        left: 4px !important;
        border-radius: 9px !important;
    }
}

/* La barre du résultat reste propre même sur les écrans moins larges. */
.result-panel .toolbar > div:first-child {
    flex-wrap: wrap;
}

/* ==========================================================
   V3.0 - TRI / FILTRES / REDIMENSIONNEMENT / AUTOFIT COLONNES
   29/08/2026
   ========================================================== */

/* Les boutons actifs de la barre d'outils sont visuellement explicites. */
.result-panel .toolbar .btn.soft.is-active,
.result-panel .toolbar .btn.soft[aria-pressed="true"] {
    background: #eaf2ff;
    border-color: #9eb8e5;
    color: #123c8b;
}

.result-panel .toolbar .btn[disabled] {
    opacity: .48;
    cursor: not-allowed;
}

/* Panneau de tri compact, masqué tant qu'il n'est pas demandé. */
.table-tools-panel {
    margin: 0 18px 10px;
    padding: 10px 12px;
    border: 1px solid #d8e2f1;
    border-radius: 9px;
    background: #f8faff;
    display: flex;
    align-items: end;
    gap: 9px;
    flex-wrap: wrap;
}

.table-tools-panel[hidden] {
    display: none !important;
}

.table-tool-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 190px;
}

.table-tool-field label {
    font-size: 9px;
    font-weight: 800;
    color: #4d6088;
}

.table-tool-field select {
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    color: var(--text);
    padding: 0 9px;
    font-size: 10px;
}

.table-tools-panel small {
    flex: 1 1 320px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
    padding-bottom: 2px;
}

/* Table à colonnes contrôlables. */
#reportTable {
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
}

#reportTable th,
#reportTable td {
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
}

#reportTable thead tr.report-header-row th {
    height: 36px;
    padding-right: 25px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

#reportTable thead tr.report-header-row th:hover {
    background: #edf3ff;
}

#reportTable thead tr.report-header-row th.is-sorted-asc,
#reportTable thead tr.report-header-row th.is-sorted-desc {
    background: #e6efff;
    color: #123c8b;
}

#reportTable .th-label {
    display: inline-block;
    max-width: calc(100% - 12px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

#reportTable .sort-indicator {
    display: inline-block;
    margin-left: 4px;
    width: 10px;
    font-size: 8px;
    color: #1b4da1;
    vertical-align: middle;
}

/* Poignée à droite de chaque titre pour agrandir / réduire la colonne. */
#reportTable .col-resizer {
    position: absolute;
    z-index: 7;
    top: 0;
    right: -2px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
}

#reportTable .col-resizer:after {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 3px;
    width: 1px;
    background: transparent;
}

#reportTable th:hover .col-resizer:after,
body.is-resizing-column #reportTable .col-resizer:after {
    background: #6d91d2;
}

body.is-resizing-column,
body.is-resizing-column * {
    cursor: col-resize !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Filtres directement sous les titres de colonnes. */
#reportTable thead tr.report-filter-row th {
    position: sticky;
    top: 36px;
    z-index: 4;
    padding: 5px 6px;
    height: 36px;
    background: #eef4ff;
    border-bottom: 1px solid #cbd8ed;
}

#reportTable .column-filter-input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 25px;
    padding: 0 7px;
    border: 1px solid #cbd8ed;
    border-radius: 5px;
    outline: 0;
    background: #fff;
    color: #203b68;
    font-size: 9px;
}

#reportTable .column-filter-input:focus {
    border-color: #6f97db;
    box-shadow: 0 0 0 2px rgba(71, 116, 194, .10);
}

/* Le header principal doit rester au-dessus de la ligne des filtres. */
#reportTable thead tr.report-header-row th {
    top: 0;
    z-index: 5;
}

/* Meilleur comportement des cellules tronquées lors d'un rétrécissement manuel. */
#reportTable td {
    max-width: none;
}

/* En focus, le panneau de tri reste compact et le tableau garde tout l'espace. */
.result-panel.is-focus-mode .table-tools-panel {
    flex: 0 0 auto;
}

@media (max-width: 760px) {
    .table-tools-panel {
        margin-left: 10px;
        margin-right: 10px;
    }

    .table-tool-field {
        min-width: 145px;
        flex: 1 1 145px;
    }
}

/* Correction de priorité CSS : les titres principaux restent sticky. */
#reportTable thead tr.report-header-row th {
    position: sticky;
}


/* ==========================================================
   V3.1 - INDICATEURS DE CHARGEMENT / RECHERCHE
   29/08/2026
   ========================================================== */

/* Petit indicateur non bloquant pour recherche/filtrage local du tableau. */
.table-busy-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid #d5e0f2;
    border-radius: 999px;
    background: #f7faff;
    color: #49658f;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
}

.table-busy-indicator[hidden] {
    display: none !important;
}

.table-busy-spinner,
.btn-loading-spinner {
    box-sizing: border-box;
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(43, 89, 163, .22);
    border-top-color: #2b59a3;
    border-radius: 50%;
    animation: inassa-loading-spin .72s linear infinite;
    vertical-align: middle;
}

.btn-loading-spinner {
    width: 14px;
    height: 14px;
    border-color: rgba(255,255,255,.35);
    border-top-color: #fff;
    margin-right: 5px;
}

/* Overlay bloquant pendant l'appel PHP/MySQL. */
.report-loading-overlay {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(13, 28, 54, .42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.report-loading-overlay[hidden] {
    display: none !important;
}

.report-loading-card {
    box-sizing: border-box;
    width: min(520px, 94vw);
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 26px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(12, 31, 65, .30);
}

.report-loading-spinner {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 54px;
    height: 54px;
    border: 5px solid #e4ebf7;
    border-top-color: #1c4d9c;
    border-right-color: #5d84c5;
    border-radius: 50%;
    animation: inassa-loading-spin .85s linear infinite;
}

.report-loading-content {
    min-width: 0;
    flex: 1 1 auto;
}

.report-loading-content strong {
    display: block;
    margin-bottom: 5px;
    color: #163e7b;
    font-size: 16px;
    line-height: 1.25;
}

.report-loading-content p {
    margin: 0 0 13px;
    color: #5b6c86;
    font-size: 11px;
    line-height: 1.45;
}

.report-loading-content small {
    display: block;
    margin-top: 8px;
    color: #75849b;
    font-size: 9px;
    font-variant-numeric: tabular-nums;
}

.report-loading-progress {
    position: relative;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef7;
}

.report-loading-progress span {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 42%;
    border-radius: 999px;
    background: linear-gradient(90deg, #315fa8, #7ca2df, #315fa8);
    animation: inassa-loading-progress 1.35s ease-in-out infinite;
}

body.report-is-loading {
    overflow: hidden;
}

body.report-is-loading .procedure-form {
    pointer-events: none;
}

@keyframes inassa-loading-spin {
    to { transform: rotate(360deg); }
}

@keyframes inassa-loading-progress {
    0%   { left: -45%; }
    55%  { left: 58%; }
    100% { left: 105%; }
}

@media (max-width: 620px) {
    .report-loading-card {
        align-items: flex-start;
        gap: 14px;
        padding: 20px;
    }

    .report-loading-spinner {
        width: 42px;
        height: 42px;
        border-width: 4px;
    }

    .report-loading-content strong {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .report-loading-spinner,
    .table-busy-spinner,
    .btn-loading-spinner,
    .report-loading-progress span {
        animation-duration: 2.4s;
    }
}


/* =============================================================
   V3.2 - Rapports favoris fonctionnels
   ============================================================= */
.report-favorite-toggle{
    appearance:none;
    -webkit-appearance:none;
    border:0;
    background:transparent;
    padding:0;
    margin:0;
    min-width:18px;
    width:18px;
    height:18px;
    line-height:18px;
    display:inline-grid;
    place-items:center;
    font:inherit;
    font-size:15px;
    color:#9aa7bb;
    cursor:pointer;
    border-radius:50%;
    transition:transform .15s ease,color .15s ease,background .15s ease;
    position:relative;
    z-index:3;
}
.report-favorite-toggle:hover,
.report-favorite-toggle:focus{
    color:#e3a008;
    background:#fff7db;
    outline:none;
    transform:scale(1.12);
}
.report-favorite-toggle.is-favorite{
    color:#e3a008;
    background:#fff7db;
}
.report-links a.is-favorite-report{
    background:#fffdf5;
}
.report-links a.is-favorite-report:hover{
    background:#fff9e7;
}
.favorites-view-toggle.is-active{
    box-shadow:0 0 0 3px rgba(37,98,202,.12);
}
.favorite-hidden,
.favorite-category-hidden{
    display:none !important;
}
.favorites-empty-state{
    grid-column:1 / -1;
    background:#fff;
    border:1px dashed #cbd5e1;
    border-radius:12px;
    padding:22px;
    color:#61708c;
    font-size:12px;
    text-align:center;
    margin:8px 0 18px;
}
.rail-action-button{
    width:100%;
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px 0;
    border:0;
    background:transparent;
    color:#526a95;
    font:inherit;
    font-size:10px;
    text-align:left;
    cursor:pointer;
}
.rail-action-button:hover,
.rail-action-button.is-active{
    color:#1749ad;
}
.simple-card-wrap{
    position:relative;
    min-width:0;
}
.simple-card-wrap .simple-card{
    height:100%;
    padding-right:48px;
}
.simple-card-favorite{
    position:absolute;
    top:14px;
    right:14px;
    width:26px;
    height:26px;
    line-height:26px;
    font-size:18px;
    background:#fff;
    border:1px solid #edf1f7;
    box-shadow:0 2px 8px rgba(29,54,95,.06);
}
.simple-card-wrap.is-favorite-report .simple-card{
    border-color:#f1d78e;
    background:#fffdf5;
}
@media(max-width:850px){
    .page-head .favorites-view-toggle{margin-top:8px}
}

/* =============================================================
   08/09/2026 - CLAIM PREVIEW HISTORIQUE
   Proc_Reclamations_Recues_avant_payées_apres_portefeuille_autre
   Reproduction du modèle "CLAIM PAID IN YEAR FOR PREVIOUS YEAR"
   ============================================================= */
.claim-preview-shell{box-sizing:border-box;width:100%;min-height:280px;overflow:auto;padding:22px 24px 34px;background:#fff}
.claim-preview-paper{box-sizing:border-box;width:100%;max-width:820px;margin:0 auto;background:#fff;color:#050505;font-family:Arial,Helvetica,sans-serif}
.claim-preview-currency-section{box-sizing:border-box;padding:6px 50px 18px;background:#fff}
.claim-preview-report-title{margin:0;padding:4px 0 2px;text-align:center;color:#090909;font-size:16px;line-height:1.2;font-weight:800;text-transform:uppercase}
.claim-preview-currency-title{display:flex;justify-content:center;align-items:baseline;gap:12px;min-height:26px;padding-top:2px;font-size:16px;font-weight:800}
.claim-preview-year{color:#ff1515}.claim-preview-currency{color:#080808}
.claim-preview-rule{height:0;border-top:2px solid #050505}.claim-preview-rule-top{margin:2px 0 19px}
.claim-preview-summary-table{width:100%;min-width:0;border-collapse:collapse;table-layout:fixed;background:#fff;color:#070707;font-size:14px;line-height:1.25}
.claim-preview-summary-table th,.claim-preview-summary-table td{box-sizing:border-box;height:41px;padding:8px 7px;border:0;background:#fff;white-space:nowrap}
.claim-preview-summary-table thead th{position:static;top:auto;z-index:auto;height:43px;color:#e01212;font-size:14px;font-weight:800;text-align:center;border-top:2px solid #050505;border-bottom:2px solid #050505}
.claim-preview-summary-table thead th:first-child{width:25%;text-align:left;padding-left:3px}.claim-preview-summary-table thead th:nth-child(2){width:27%}.claim-preview-summary-table thead th:nth-child(3){width:22%}.claim-preview-summary-table thead th:nth-child(4){width:26%}
.claim-preview-summary-table tbody td{border:0!important}
.claim-preview-summary-table .claim-preview-month{padding-left:3px;color:#7b2da4;font-weight:800;text-align:left}
.claim-preview-summary-table .claim-preview-number{padding-left:7px;padding-right:7px;color:#080808;text-align:center;font-variant-numeric:tabular-nums}
.claim-preview-summary-table .claim-preview-amount{display:inline-block;width:142px;max-width:100%;text-align:right;font-variant-numeric:tabular-nums}
.claim-preview-summary-table .claim-preview-money-heading{display:inline-block;width:142px;max-width:100%;text-align:center}
.claim-preview-summary-table tfoot td{height:43px;padding-top:10px;padding-bottom:9px;font-weight:900;border-top:2px solid #050505;border-bottom:4px double #050505}
.claim-preview-summary-table tfoot td:first-child{border-top-color:transparent;border-bottom-color:transparent}
.claim-preview-black-separator{height:16px;margin:0;background:#050505}
.result-panel .table-shell.claim-preview-table-shell{max-height:none;overflow:auto;background:#fff}
@media(max-width:900px){.claim-preview-shell{padding:16px 10px 24px}.claim-preview-paper{max-width:100%}.claim-preview-currency-section{padding-left:20px;padding-right:20px}.claim-preview-summary-table{font-size:12px}.claim-preview-report-title,.claim-preview-currency-title{font-size:13px}}
@media print{.claim-preview-shell{padding:0}.claim-preview-paper{max-width:none}}

/* Claim preview: diagnostic uniquement si la procédure retourne des lignes
   mais qu'aucune colonne de montant/catégorie/date n'est reconnue. */
.claim-preview-data-warning {
    max-width: 980px;
    margin: 14px auto 18px;
    padding: 10px 14px;
    border: 1px solid #e7b14b;
    border-radius: 8px;
    background: #fff8e8;
    color: #7a5200;
    font-size: 12px;
    line-height: 1.45;
}
.claim-preview-data-warning strong { font-weight: 800; }


/* =============================================================
   08/09/2026 - IDENTITE VISUELLE DES RAPPORTS
   Logo + raison sociale + nom du rapport dans le résultat.
   ============================================================= */
.report-visual-branding{
    box-sizing:border-box;
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    padding:16px 22px 14px;
    border-bottom:1px solid #dce4f0;
    background:#fff;
    text-align:center;
}
.report-visual-branding-logo{
    display:block;
    width:104px;
    max-height:72px;
    object-fit:contain;
    margin:0 auto 2px;
}
.report-visual-branding-text{
    min-width:0;
    width:100%;
    text-align:center;
}
.report-visual-company-name{
    color:#123d8f;
    font-size:17px;
    line-height:1.18;
    font-weight:900;
    letter-spacing:.15px;
    text-align:center;
}
.report-visual-report-name{
    margin-top:4px;
    color:#13233f;
    font-size:13px;
    line-height:1.28;
    font-weight:800;
    text-align:center;
}
.claim-preview-table-shell .report-visual-branding{
    max-width:900px;
    margin:0 auto;
    border-bottom:0;
    padding-top:18px;
    padding-bottom:3px;
}
@media(max-width:700px){
    .report-visual-branding{gap:4px;padding:12px 10px}
    .report-visual-branding-logo{width:82px;max-height:58px}
    .report-visual-company-name{font-size:14px}
    .report-visual-report-name{font-size:11px}
}
@media print{
    .report-visual-branding{break-inside:avoid;border-bottom:0}
}

/* =============================================================
   08/09/2026 - IMPRESSION DU RAPPORT / FORMAT CONFIGURABLE
   ============================================================= */
.mini-step.n6,
.step.n6 { background: #475569; }

.report-actions-dock .compact-print-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(135px,1fr));
    gap:12px;
    align-items:end;
}
.print-option-field{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:6px;
}
.print-option-field label{
    color:#4a6085;
    font-size:9px;
    line-height:1.2;
    font-weight:900;
    letter-spacing:.25px;
}
.print-option-field select{
    box-sizing:border-box;
    width:100%;
    height:40px;
    padding:0 10px;
    border:1px solid #dce4f0;
    border-radius:9px;
    background:#fff;
    color:#173153;
    font-size:11px;
    font-weight:700;
    outline:none;
}
.print-option-field select:focus{
    border-color:#9db7e7;
    box-shadow:0 0 0 3px rgba(47,95,190,.08);
}
.print-option-field select:disabled{
    opacity:.58;
    cursor:not-allowed;
    background:#f5f7fb;
}
.print-actions-row{
    margin-top:14px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding-top:12px;
    border-top:1px solid #edf1f7;
}
.print-format-summary{
    color:#52657f;
    font-size:10px;
    font-weight:800;
}
.print-report-button{
    min-width:205px;
    white-space:nowrap;
}
.print-note{
    margin-top:10px;
    color:#6b7b93;
    font-size:9px;
    line-height:1.45;
}

@media(max-width:1180px){
    .report-actions-dock .compact-print-grid{
        grid-template-columns:repeat(3,minmax(150px,1fr));
    }
}
@media(max-width:760px){
    .report-actions-dock .compact-print-grid{
        grid-template-columns:1fr 1fr;
    }
    .print-actions-row{
        align-items:stretch;
        flex-direction:column;
    }
    .print-report-button{
        width:100%;
    }
}
@media(max-width:480px){
    .report-actions-dock .compact-print-grid{
        grid-template-columns:1fr;
    }
}

/*
 * L'impression est volontairement limitée au contenu du rapport.
 * Le logo, International Assurance S.A. et le nom du rapport restent visibles.
 */
@media print{
    html,
    body{
        background:#fff!important;
        height:auto!important;
        min-height:0!important;
        overflow:visible!important;
    }

    body.report-print-mode{
        margin:0!important;
        padding:0!important;
        color:#000!important;
        -webkit-print-color-adjust:exact!important;
        print-color-adjust:exact!important;
    }

    body.report-print-mode .sidebar,
    body.report-print-mode .topbar,
    body.report-print-mode .header,
    body.report-print-mode .page-header,
    body.report-print-mode .page-heading,
    body.report-print-mode .procedure-panel,
    body.report-print-mode #reportProcedureForm,
    body.report-print-mode #reportActionsDock,
    body.report-print-mode .result-toolbar,
    body.report-print-mode .table-tools,
    body.report-print-mode .table-tool-panel,
    body.report-print-mode #sortPanel,
    body.report-print-mode #paginationBar,
    body.report-print-mode .pagination,
    body.report-print-mode .report-loading-overlay,
    body.report-print-mode .claim-preview-data-warning,
    body.report-print-mode .result-panel > .step-title,
    body.report-print-mode .result-panel > .panel-header,
    body.report-print-mode .col-resizer,
    body.report-print-mode .filter-row{
        display:none!important;
    }

    body.report-print-mode .app,
    body.report-print-mode .app-shell,
    body.report-print-mode .layout,
    body.report-print-mode .main,
    body.report-print-mode .main-content,
    body.report-print-mode .content,
    body.report-print-mode .content-wrap,
    body.report-print-mode .page,
    body.report-print-mode .report-page,
    body.report-print-mode .container,
    body.report-print-mode .container-fluid{
        display:block!important;
        position:static!important;
        width:auto!important;
        max-width:none!important;
        min-width:0!important;
        height:auto!important;
        min-height:0!important;
        margin:0!important;
        padding:0!important;
        overflow:visible!important;
        background:#fff!important;
        box-shadow:none!important;
        border:0!important;
    }

    body.report-print-mode .result-panel{
        display:block!important;
        position:static!important;
        box-sizing:border-box!important;
        width:auto!important;
        max-width:none!important;
        min-width:0!important;
        height:auto!important;
        min-height:0!important;
        margin:0!important;
        padding:0!important;
        overflow:visible!important;
        border:0!important;
        border-radius:0!important;
        box-shadow:none!important;
        background:#fff!important;
        zoom:var(--report-print-scale,1);
    }

    body.report-print-mode #reportTableShell,
    body.report-print-mode .table-shell,
    body.report-print-mode .result-panel .table-shell,
    body.report-print-mode .claim-preview-table-shell,
    body.report-print-mode .claim-preview-shell{
        display:block!important;
        box-sizing:border-box!important;
        width:auto!important;
        max-width:none!important;
        min-width:0!important;
        height:auto!important;
        min-height:0!important;
        max-height:none!important;
        margin:0!important;
        padding:0!important;
        overflow:visible!important;
        border:0!important;
        box-shadow:none!important;
        background:#fff!important;
    }

    body.report-print-mode .report-visual-branding{
        display:flex!important;
        width:100%!important;
        max-width:none!important;
        margin:0 auto 9mm!important;
        padding:0 0 4mm!important;
        break-inside:avoid!important;
        page-break-inside:avoid!important;
        border-bottom:0!important;
        background:#fff!important;
    }

    body.report-print-mode .report-visual-branding-logo{
        width:100px!important;
        max-height:72px!important;
    }

    body.report-print-mode .report-visual-company-name{
        font-size:17px!important;
    }

    body.report-print-mode .report-visual-report-name{
        font-size:12px!important;
    }

    body.report-print-mode #reportTable{
        border-collapse:collapse!important;
        max-width:none!important;
        overflow:visible!important;
        font-size:9px!important;
        -webkit-print-color-adjust:exact!important;
        print-color-adjust:exact!important;
    }

    body.report-print-mode #reportTable thead{
        display:table-header-group!important;
    }

    body.report-print-mode #reportTable tbody{
        display:table-row-group!important;
    }

    body.report-print-mode #reportTable tr{
        break-inside:avoid!important;
        page-break-inside:avoid!important;
    }

    body.report-print-mode #reportTable th,
    body.report-print-mode #reportTable td{
        overflow:visible!important;
        text-overflow:clip!important;
        white-space:nowrap!important;
    }

    body.report-print-mode #reportTable th{
        position:static!important;
    }

    body.report-print-mode .claim-preview-paper{
        width:100%!important;
        max-width:none!important;
        margin:0!important;
    }

    body.report-print-mode .claim-preview-currency-section{
        break-inside:avoid!important;
        page-break-inside:avoid!important;
        padding-left:8mm!important;
        padding-right:8mm!important;
    }

    body.report-print-mode .claim-preview-black-separator{
        -webkit-print-color-adjust:exact!important;
        print-color-adjust:exact!important;
    }
}

/* Complément : sélecteurs exacts de la page report.php. */
@media print{
    body.report-print-mode .page-head,
    body.report-print-mode .top-message,
    body.report-print-mode #reportProcedurePanel,
    body.report-print-mode .result-panel > .toolbar,
    body.report-print-mode .result-panel > .table-tools-panel{
        display:none!important;
    }

    body.report-print-mode .content{
        padding:0!important;
        margin:0!important;
    }

    body.report-print-mode .run-layout{
        display:block!important;
        margin:0!important;
        padding:0!important;
    }
}

/* =====================================================================
   Gestion des utilisateurs - 10/09/2026
   ===================================================================== */
.user-management-head{align-items:flex-start}
.user-management-grid{display:grid;grid-template-columns:minmax(300px,380px) minmax(0,1fr);gap:20px;align-items:start}
.user-create-panel,.user-list-panel,.permissions-summary-panel{padding:22px}
.user-panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.user-panel-title h2{margin:3px 0 5px}
.user-panel-title p{margin:0}
.user-create-form{display:grid;gap:14px}
.user-create-form .field{display:grid;gap:6px}
.user-create-form .field label{font-size:12px;font-weight:800;letter-spacing:.04em;color:#44526a;text-transform:uppercase}
.user-create-form .field small{color:#7b8798;font-size:11px}
.user-create-form input,.user-create-form select{width:100%;box-sizing:border-box;border:1px solid #dce3ec;border-radius:10px;background:#fff;padding:11px 12px;font:inherit;color:#172033;outline:none}
.user-create-form input:focus,.user-create-form select:focus{border-color:#2467c9;box-shadow:0 0 0 3px rgba(36,103,201,.10)}
.user-table-shell{max-height:620px;overflow:auto}
.user-table{min-width:820px}
.user-table td,.user-table th{vertical-align:middle}
.role-legend{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.role-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.04em}
.role-admin{background:#e9f1ff;color:#1f5dab;border:1px solid #bfd3f5}
.role-agent{background:#eef9f1;color:#277a43;border:1px solid #c8e8d1}
.user-status{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:800}
.user-status:before{content:"";width:8px;height:8px;border-radius:50%}
.user-status.is-active{color:#23743d}.user-status.is-active:before{background:#2da152}
.user-status.is-inactive{color:#9b3942}.user-status.is-inactive:before{background:#c64b55}
.inline-user-action{margin:0}
.user-disable-btn,.user-enable-btn{padding:7px 10px;font-size:11px}
.user-disable-btn{background:#fff4f4;color:#a83642;border:1px solid #efc9ce}
.user-enable-btn{background:#eef9f1;color:#277a43;border:1px solid #c8e8d1}
.permissions-summary-panel{margin-top:20px}
.permission-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.permission-card{display:grid;gap:8px;padding:16px;border:1px solid #e1e7ef;border-radius:12px;background:#fbfcfe}
.permission-card strong{font-size:15px;color:#1c2a42}
.permission-card span{font-size:13px;color:#536177}
.alert.success{background:#edf9f0;border:1px solid #bfe6ca;color:#226b39}
@media(max-width:1050px){.user-management-grid{grid-template-columns:1fr}.permission-cards{grid-template-columns:1fr}}

/* =====================================================================
   V2.9.2 - MENU BLEU UNIFIE SUR TOUTES LES PAGES
   ===================================================================== */
.sidebar{
    background:
        radial-gradient(circle at 12% 0%,rgba(71,145,235,.22),transparent 31%),
        linear-gradient(165deg,#123d72 0%,#0d315f 38%,#09274e 72%,#071d3b 100%);
    border-right:0;
    color:#fff;
    box-shadow:8px 0 28px rgba(6,27,57,.16);
}
.sidebar .brand{
    min-height:116px;
    margin:0 2px 14px;
    padding:10px 8px 12px;
    justify-content:center;
    background:linear-gradient(145deg,#fff 0%,#f7fbff 100%);
    border:1px solid rgba(255,255,255,.72);
    border-radius:13px;
    box-shadow:0 10px 24px rgba(2,18,43,.18);
}
.sidebar .brand-logo-link{display:flex;width:100%;align-items:center;justify-content:center}
.sidebar .company-logo-sidebar{display:block;max-width:172px;max-height:76px;object-fit:contain}
.sidebar .nav-label{color:#91b9e8;letter-spacing:.35px;text-shadow:0 1px 1px rgba(0,0,0,.18)}
.sidebar .nav-item{
    color:#e4eefb;
    border:1px solid transparent;
    transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease;
}
.sidebar .nav-item span{color:#b8d4f4}
.sidebar .nav-item:hover{
    color:#fff;
    background:linear-gradient(90deg,rgba(74,144,226,.20),rgba(255,255,255,.07));
    border-color:rgba(157,202,255,.13);
    transform:translateX(1px);
}
.sidebar .nav-item:hover span{color:#fff}
.sidebar .nav-item.active{
    color:#fff;
    font-weight:800;
    background:linear-gradient(135deg,#338cf2 0%,#2277e1 48%,#1765c7 100%);
    border-color:rgba(139,195,255,.40);
    box-shadow:0 9px 20px rgba(0,72,167,.35),inset 0 1px 0 rgba(255,255,255,.18);
}
.sidebar .nav-item.active span{color:#fff}
.sidebar nav{scrollbar-width:thin;scrollbar-color:rgba(150,196,246,.35) transparent}
.sidebar nav::-webkit-scrollbar{width:5px}
.sidebar nav::-webkit-scrollbar-thumb{background:rgba(150,196,246,.35);border-radius:10px}
.sidebar .support-card{display:none}
.sidebar .sidebar-footer{color:#799bc3}

@media(prefers-reduced-motion:reduce){
    .sidebar .nav-item{transition:none}
}


/* =====================================================================
   V3.0.6.3 - Gestion complete des utilisateurs + Mon compte
   ===================================================================== */
.profile-link{color:inherit;text-decoration:none}.profile-link:hover strong{color:#154fa3}
.top-account-link{color:#365b88;font-size:11px;font-weight:800;text-decoration:none;white-space:nowrap}.top-account-link:hover{color:#174fa5;text-decoration:underline}
.user-table{min-width:900px}.user-table tr.is-editing{background:#eef6ff!important;box-shadow:inset 3px 0 #2c72cd}
.user-action-group{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.user-action-group form{display:inline-flex}
.user-edit-btn,.user-password-btn{padding:6px 9px;font-size:10px}.user-edit-btn{color:#1e5cae;background:#eef5ff;border:1px solid #c8daf3}.user-password-btn{color:#624496;background:#f4effd;border:1px solid #dacdf2}
.user-edit-panel{margin-top:16px;padding:16px;border:1px solid #cfdff1;border-radius:12px;background:#f8fbff}.user-edit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:13px}.user-edit-head h3{margin:2px 0 3px;color:#133e76;font-size:18px}.user-edit-head p{margin:0}
.user-edit-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.user-edit-form,.user-self-password-card{padding:14px;border:1px solid #dce6f2;border-radius:10px;background:#fff}.user-edit-form h4,.user-self-password-card h4{margin:0 0 10px;color:#173f74;font-size:14px}.user-edit-form{display:grid;gap:10px}.user-edit-form .field,.account-password-form .field{display:grid;gap:5px}.user-edit-form label,.account-password-form label{font-size:11px;font-weight:800;color:#44526a;text-transform:uppercase}.user-edit-form small,.account-password-form small{color:#7b8798;font-size:10px}.user-edit-form input,.user-edit-form select,.account-password-form input{box-sizing:border-box;width:100%;padding:10px 11px;border:1px solid #d6e0ec;border-radius:9px;background:#fff;color:#172033;font:inherit}.user-edit-form input:focus,.user-edit-form select:focus,.account-password-form input:focus{outline:none;border-color:#2467c9;box-shadow:0 0 0 3px rgba(36,103,201,.1)}
.user-self-password-card p{color:#60728a;font-size:12px;line-height:1.5}.password-reset-form{align-content:start}
.account-head{align-items:flex-start}.account-grid{display:grid;grid-template-columns:minmax(240px,330px) minmax(0,620px);gap:20px;align-items:start}.account-summary-card,.account-password-card{padding:22px}.account-avatar-large{display:flex;align-items:center;justify-content:center;width:64px;height:64px;margin:18px 0 12px;border-radius:50%;color:#fff;background:linear-gradient(135deg,#164e9f,#3b83da);font-size:25px;font-weight:900}.account-summary-card h2{margin:0 0 18px;color:#153e73}.account-summary-card dl{margin:0}.account-summary-card dl>div{display:flex;justify-content:space-between;gap:15px;padding:11px 0;border-top:1px solid #e7edf4}.account-summary-card dt{color:#728198;font-size:11px;font-weight:800;text-transform:uppercase}.account-summary-card dd{margin:0;color:#233d61;font-size:13px;font-weight:700}.account-password-card h2{margin:4px 0 5px}.account-password-form{display:grid;gap:13px;margin-top:17px;max-width:520px}
@media(max-width:1050px){.user-edit-columns,.account-grid{grid-template-columns:1fr}.account-grid{max-width:760px}}
@media(max-width:760px){.top-account-link{display:none}.user-action-group{min-width:210px}.user-edit-head{flex-direction:column}.account-summary-card,.account-password-card{padding:17px}}
.sidebar .nav-item .nav-beta-badge{margin-left:auto;font-size:7px;line-height:1;padding:3px 5px;border-radius:99px;background:#e6f2ff;color:#0c61cc;font-weight:900;letter-spacing:.05em}
.sidebar .nav-item.active .nav-beta-badge{background:rgba(255,255,255,.22);color:#fff}
