/* ============================================================
   SMART IMPORT — Drop zone
   ============================================================ */


.smart-import-dropzone {
    width: 100%;
    height: 138px;
    border: 2px dashed #b0bec5;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    margin: 8px 0 4px 0;
}

.smart-import-dropzone.x-drop-panel-file-over,
.smart-import-dropzone:hover {
    border-color: #1976d2;
    background: #e3f2fd;
}

.smart-dz-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 4px;
    pointer-events: none;
    user-select: none;
}

.smart-dz-icon {
    font-size: 28px;
    color: #90a4ae;
    line-height: 1;
}

.smart-dz-title {
    font-size: 13px;
    font-weight: 600;
    color: #1976d2;
    text-align: center;
}

.smart-dz-hint {
    font-size: 11px;
    color: #90a4ae;
}

/* ============================================================
   SMART IMPORT — Card zone (empty state)
   ============================================================ */

.smart-empty-state {
    width: 100%;
    padding: 32px 0 16px;
    text-align: center;
    color: #b0bec5;
}

.smart-empty-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.smart-empty-state p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

/* ============================================================
   FILE STATUS CARD — Carte par fichier
   ============================================================ */

.smart-file-card {
    display: inline-block;
    width: 156px;
    height: 128px;
    background: #ffffff;
    border: 1.5px solid #e0e7ef;
    border-radius: 10px;
    padding: 10px 10px 8px;
    margin: 4px;
    box-sizing: border-box;
    vertical-align: top;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    position: relative;
}

/* ---- File type icons ---- */

.sfc-icon {
    width: 40px;
    height: 40px;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    flex-shrink: 0;
}

.sfc-icon-pdf  { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.sfc-icon-docx { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.sfc-icon-doc  { background: #e8eaf6; color: #283593; border: 1px solid #9fa8da; }
.sfc-icon-generic { background: #f5f5f5; color: #616161; border: 1px solid #e0e0e0; }

/* ---- Nom & taille ---- */

.sfc-name {
    font-size: 11px;
    font-weight: 600;
    color: #263238;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 136px;
    margin-bottom: 1px;
}

.sfc-size {
    font-size: 10px;
    color: #90a4ae;
    margin-bottom: 4px;
}

/* ---- Progress bar ---- */

.sfc-progress-track {
    width: 100%;
    height: 4px;
    background: #eceff1;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 3px;
}

.sfc-progress-fill {
    height: 100%;
    background: #1976d2;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.sfc-pct {
    font-size: 10px;
    color: #1976d2;
    font-weight: 600;
    text-align: right;
}

/* ---- Texte de statut ---- */

.sfc-status {
    font-size: 10.5px;
    font-weight: 500;
    margin-top: 2px;
}

.sfc-queued   { color: #90a4ae; }
.sfc-uploading { color: #1976d2; }
.sfc-analyzing { color: #7b1fa2; }
.sfc-done     { color: #2e7d32; }
.sfc-error    { color: #c62828; }

/* ---- Spinner (AI Analysis state) ---- */

.sfc-spinner {
    width: 40px;
    height: 40px;
    border-radius: 7px;
    background: #f3e5f5;
    border: 1px solid #ce93d8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #7b1fa2;
    animation: sfc-spin 1.1s linear infinite;
    margin-bottom: 5px;
}

@keyframes sfc-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ---- Final state icons ---- */

.sfc-icon-done {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e8f5e9;
    border: 1.5px solid #a5d6a7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #2e7d32;
    margin-bottom: 5px;
    animation: sfc-pop 0.25s ease;
}

@keyframes sfc-pop {
    0%   { transform: scale(0.7); opacity: 0.4; }
    70%  { transform: scale(1.12); }
    100% { transform: scale(1); opacity: 1; }
}

.sfc-icon-error {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffebee;
    border: 1.5px solid #ef9a9a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #c62828;
    margin-bottom: 5px;
}

/* ---- Card background by state ---- */

.smart-file-card.sfc-state-queued   { border-color: #e0e7ef; }
.smart-file-card.sfc-state-uploading { border-color: #90caf9; background: #fafcff; }
.smart-file-card.sfc-state-analyzing { border-color: #ce93d8; background: #fdf6ff; }
.smart-file-card.sfc-state-done     { border-color: #a5d6a7; background: #f9fff9; }
.smart-file-card.sfc-state-error    { border-color: #ef9a9a; background: #fff8f8; }

/* ============================================================
   SMART IMPORT — Barre de progression globale (style "image 2")
   ============================================================ */

.sip-global-bar {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 8px 14px 6px;
    margin: 6px 8px 2px;
    box-sizing: border-box;
}

.sip-global-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.sip-global-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #2e7d32;
}

.sip-global-counts {
    font-size: 11px;
    color: #388e3c;
    font-weight: 500;
}

.sip-global-track {
    width: 100%;
    height: 6px;
    background: #c8e6c9;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 3px;
}

.sip-global-fill {
    height: 100%;
    background: #43a047;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.sip-global-pct {
    text-align: right;
    font-size: 10px;
    color: #388e3c;
    font-weight: 700;
    margin-top: 1px;
}

/* ============================================================
   SMART IMPORT — Drop zone
   ============================================================ */

.smart-import-dropzone {
    width: 100%;
    height: 128px;
    border: 2px dashed #b0bec5;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    margin: 4px 0;
}

.smart-import-dropzone.x-drop-panel-file-over,
.smart-import-dropzone:hover {
    border-color: #1976d2;
    background: #e3f2fd;
}

.smart-dz-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 4px;
    pointer-events: none;
    user-select: none;
}

.smart-dz-icon {
    font-size: 26px;
    color: #90a4ae;
    line-height: 1;
}

.smart-dz-title {
    font-size: 13px;
    font-weight: 600;
    color: #1976d2;
    text-align: center;
}

.smart-dz-hint {
    font-size: 11px;
    color: #90a4ae;
}

/* ============================================================
   SMART IMPORT — Empty zone
   ============================================================ */

.smart-empty-state {
    width: 100%;
    padding: 28px 0 12px;
    text-align: center;
    color: #b0bec5;
}

.smart-empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.smart-empty-state p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

/* ============================================================
   FILE STATUS CARD — Per-file card (Smart Import window)
   ============================================================ */

.smart-file-card {
    display: inline-block;
    width: 150px;
    height: 126px;
    background: #ffffff;
    border: 1.5px solid #e0e7ef;
    border-radius: 10px;
    padding: 9px 9px 7px;
    margin: 4px;
    box-sizing: border-box;
    vertical-align: top;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.sfc-icon {
    width: 38px;
    height: 38px;
    border-radius: 7px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.sfc-icon-pdf    { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.sfc-icon-docx   { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.sfc-icon-doc    { background: #e8eaf6; color: #283593; border: 1px solid #9fa8da; }
.sfc-icon-generic{ background: #f5f5f5; color: #616161; border: 1px solid #e0e0e0; }

.sfc-name {
    font-size: 10.5px;
    font-weight: 600;
    color: #263238;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 132px;
    margin-bottom: 1px;
}

.sfc-size {
    font-size: 9.5px;
    color: #90a4ae;
    margin-bottom: 3px;
}

.sfc-progress-track {
    width: 100%;
    height: 4px;
    background: #eceff1;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2px;
}

.sfc-progress-fill {
    height: 100%;
    background: #1976d2;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.sfc-pct {
    font-size: 9.5px;
    color: #1976d2;
    font-weight: 600;
    text-align: right;
}

.sfc-status {
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
}

.sfc-queued    { color: #90a4ae; }
.sfc-uploading { color: #1976d2; }
.sfc-analyzing { color: #7b1fa2; }
.sfc-done      { color: #2e7d32; }
.sfc-error     { color: #c62828; }

.sfc-spinner {
    width: 38px; height: 38px;
    border-radius: 7px;
    background: #f3e5f5; border: 1px solid #ce93d8;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: #7b1fa2;
    animation: sfc-spin 1.1s linear infinite;
    margin-bottom: 4px;
}

@keyframes sfc-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.sfc-icon-done {
    width: 38px; height: 38px; border-radius: 50%;
    background: #e8f5e9; border: 1.5px solid #a5d6a7;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #2e7d32;
    margin-bottom: 4px;
    animation: sfc-pop 0.25s ease;
}

@keyframes sfc-pop {
    0%  { transform: scale(0.7); opacity: 0.4; }
    70% { transform: scale(1.12); }
    100%{ transform: scale(1); opacity: 1; }
}

.sfc-icon-error {
    width: 38px; height: 38px; border-radius: 50%;
    background: #ffebee; border: 1.5px solid #ef9a9a;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: #c62828;
    margin-bottom: 4px;
}

/* Card background states */
.smart-file-card.sfc-state-queued   { border-color: #e0e7ef; }
.smart-file-card.sfc-state-uploading{ border-color: #90caf9; background: #fafcff; }
.smart-file-card.sfc-state-analyzing{ border-color: #ce93d8; background: #fdf6ff; }
.smart-file-card.sfc-state-done     { border-color: #a5d6a7; background: #f9fff9; }
.smart-file-card.sfc-state-error    { border-color: #ef9a9a; background: #fff8f8; }

/* ============================================================
   SMART IMPORT LIVE GRID — "Import in progress" tab
   ============================================================ */

/* ContentPanel header */
.sil-header-counts {
    font-size: 11px;
    color: #546e7a;
    font-weight: 500;
    padding-right: 8px;
    line-height: 22px;
}

.sil-header-counts b {
    color: #1976d2;
}

/* File type icons in the grid */
.sil-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.sil-icon-pdf    { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.sil-icon-docx   { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.sil-icon-doc    { background: #e8eaf6; color: #283593; border: 1px solid #9fa8da; }
.sil-icon-generic{ background: #f5f5f5; color: #616161; border: 1px solid #e0e0e0; }

/* Badges de statut */
.sil-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.sil-badge-queued {
    background: #f5f5f5;
    color: #90a4ae;
    border: 1px solid #e0e0e0;
}

.sil-badge-analyzing {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.sil-badge-done {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.sil-badge-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.sil-badge-created {
    background: linear-gradient(180deg, #fff8e1 0%, #ffefc2 100%);
    color: #9a5b00;
    border: 1px solid #e7be5f;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}
/* Spinner in the grid (AI Analysis state) */
.sil-spin {
    display: inline-block;
    animation: sfc-spin 1.1s linear infinite;
}

/* Cellule upload avec barre de progression inline */
.sil-upload-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.sil-progress-track {
    flex: 1;
    height: 5px;
    background: #e3f2fd;
    border-radius: 3px;
    overflow: hidden;
}

.sil-progress-fill {
    height: 100%;
    background: #1976d2;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.sil-pct {
    font-size: 10px;
    color: #1976d2;
    font-weight: 600;
    min-width: 28px;
    text-align: right;
}

/* Row highlighting based on state */
.x-grid3-row .sfc-state-done td   { background-color: #f9fff9 !important; }
.x-grid3-row .sfc-state-error td  { background-color: #fff8f8 !important; }

/* ============================================================
   SMART IMPORT — Barre de progression globale (style "image 2")
   ============================================================ */

.sip-global-bar {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 8px 14px 6px;
    margin: 6px 8px 2px;
    box-sizing: border-box;
}

.sip-global-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.sip-global-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #2e7d32;
}

.sip-global-counts {
    font-size: 11px;
    color: #388e3c;
    font-weight: 500;
}

.sip-global-track {
    width: 100%;
    height: 6px;
    background: #c8e6c9;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 3px;
}

.sip-global-fill {
    height: 100%;
    background: #43a047;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.sip-global-pct {
    text-align: right;
    font-size: 10px;
    color: #388e3c;
    font-weight: 700;
    margin-top: 1px;
}

/* ============================================================
   SMART IMPORT — Drop zone
   ============================================================ */

.smart-import-dropzone {
    width: 100%;
    height: 128px;
    border: 2px dashed #b0bec5;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    margin: 4px 0;
}

.smart-import-dropzone.x-drop-panel-file-over,
.smart-import-dropzone:hover {
    border-color: #1976d2;
    background: #e3f2fd;
}

.smart-dz-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 4px;
    pointer-events: none;
    user-select: none;
}

.smart-dz-icon {
    font-size: 26px;
    color: #90a4ae;
    line-height: 1;
}

.smart-dz-title {
    font-size: 13px;
    font-weight: 600;
    color: #1976d2;
    text-align: center;
}

.smart-dz-hint {
    font-size: 11px;
    color: #90a4ae;
}

/* ============================================================
   SMART IMPORT — Empty zone
   ============================================================ */

.smart-empty-state {
    width: 100%;
    padding: 28px 0 12px;
    text-align: center;
    color: #b0bec5;
}

.smart-empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.smart-empty-state p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

/* ============================================================
   FILE STATUS CARD — Card per file (Smart Import window)
   ============================================================ */

.smart-file-card {
    display: inline-block;
    width: 150px;
    height: 126px;
    background: #ffffff;
    border: 1.5px solid #e0e7ef;
    border-radius: 10px;
    padding: 9px 9px 7px;
    margin: 4px;
    box-sizing: border-box;
    vertical-align: top;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.sfc-icon {
    width: 38px;
    height: 38px;
    border-radius: 7px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.sfc-icon-pdf    { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.sfc-icon-docx   { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.sfc-icon-doc    { background: #e8eaf6; color: #283593; border: 1px solid #9fa8da; }
.sfc-icon-generic{ background: #f5f5f5; color: #616161; border: 1px solid #e0e0e0; }

.sfc-name {
    font-size: 10.5px;
    font-weight: 600;
    color: #263238;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 132px;
    margin-bottom: 1px;
}

.sfc-size {
    font-size: 9.5px;
    color: #90a4ae;
    margin-bottom: 3px;
}

.sfc-progress-track {
    width: 100%;
    height: 4px;
    background: #eceff1;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2px;
}

.sfc-progress-fill {
    height: 100%;
    background: #1976d2;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.sfc-pct {
    font-size: 9.5px;
    color: #1976d2;
    font-weight: 600;
    text-align: right;
}

.sfc-status {
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
}

.sfc-queued    { color: #90a4ae; }
.sfc-uploading { color: #1976d2; }
.sfc-analyzing { color: #7b1fa2; }
.sfc-done      { color: #2e7d32; }
.sfc-error     { color: #c62828; }

.sfc-spinner {
    width: 38px; height: 38px;
    border-radius: 7px;
    background: #f3e5f5; border: 1px solid #ce93d8;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: #7b1fa2;
    animation: sfc-spin 1.1s linear infinite;
    margin-bottom: 8px;
}

@keyframes sfc-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.sfc-icon-done {
    width: 38px; height: 38px; border-radius: 50%;
    background: #e8f5e9; border: 1.5px solid #a5d6a7;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #2e7d32;
    margin-bottom: 4px;
    animation: sfc-pop 0.25s ease;
}

@keyframes sfc-pop {
    0%  { transform: scale(0.7); opacity: 0.4; }
    70% { transform: scale(1.12); }
    100%{ transform: scale(1); opacity: 1; }
}

.sfc-icon-error {
    width: 38px; height: 38px; border-radius: 50%;
    background: #ffebee; border: 1.5px solid #ef9a9a;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: #c62828;
    margin-bottom: 4px;
}

/* Card background states */
.smart-file-card.sfc-state-queued   { border-color: #e0e7ef; }
.smart-file-card.sfc-state-uploading{ border-color: #90caf9; background: #fafcff; }
.smart-file-card.sfc-state-analyzing{ border-color: #ce93d8; background: #fdf6ff; }
.smart-file-card.sfc-state-done     { border-color: #a5d6a7; background: #f9fff9; }
.smart-file-card.sfc-state-error    { border-color: #ef9a9a; background: #fff8f8; }

/* ============================================================
   SMART IMPORT LIVE GRID — "Import in progress" tab
   ============================================================ */

/* ContentPanel header */
.sil-header-counts {
    font-size: 11px;
    color: #546e7a;
    font-weight: 500;
    padding-right: 8px;
    line-height: 22px;
}

.sil-header-counts b {
    color: #1976d2;
}

/* File type icons in the grid */
.sil-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.sil-icon-pdf    { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.sil-icon-docx   { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.sil-icon-doc    { background: #e8eaf6; color: #283593; border: 1px solid #9fa8da; }
.sil-icon-generic{ background: #f5f5f5; color: #616161; border: 1px solid #e0e0e0; }

/* Badges de statut */
.sil-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.sil-badge-queued {
    background: #f5f5f5;
    color: #90a4ae;
    border: 1px solid #e0e0e0;
}

.sil-badge-analyzing {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.sil-badge-done {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.sil-badge-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Spinner in the grid (AI Analysis state) */
.sil-spin {
    display: inline-block;
    animation: sfc-spin 1.1s linear infinite;
}

/* Cellule upload avec barre de progression inline */
.sil-upload-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.sil-progress-track {
    flex: 1;
    height: 5px;
    background: #e3f2fd;
    border-radius: 3px;
    overflow: hidden;
}

.sil-progress-fill {
    height: 100%;
    background: #1976d2;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.sil-pct {
    font-size: 10px;
    color: #1976d2;
    font-weight: 600;
    min-width: 28px;
    text-align: right;
}

/* Row highlighting based on state */
.x-grid3-row .sfc-state-done td   { background-color: #f9fff9 !important; }
.x-grid3-row .sfc-state-error td  { background-color: #fff8f8 !important; }

/* ============================================================
   SMART IMPORT LIVE GRID — nouvelles classes colonnes riches
   ============================================================ */

/* Nom du contrat dans la grille */
.sil-name {
    font-weight: 500;
    color: #263238;
    line-height: 1.4;
}

/* Tag type de contrat */
.sil-tag {
    display: inline-block;
    padding: 1px 7px;
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 500;
    white-space: nowrap;
}

/* Bouton cerveau dans la colonne action */
.ls-brain-icon-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
}

.ls-brain-icon-btn .x-btn-text {
    background-image: url('gxt/themes/legalsuite/images/legalsuite/Icon_Septeo-Brain_RVB_2.svg');
    background-repeat: no-repeat;
    background-size: 20px 20px;
    background-position: center;
    width: 22px;
    height: 22px;
    display: inline-block;
}

/* Animated loading dots for cells awaiting analysis */
.sil-loading-dots {
    color: #b0bec5;
    font-size: 16px;
    letter-spacing: 2px;
    animation: sil-blink 1.4s infinite;
}

@keyframes sil-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* Row appearance animation when analysis is complete */
@keyframes sil-row-pop {
    from { background-color: #e8f5e9; }
    to   { background-color: transparent; }
}

/* Ligne "done" : flash vert puis retour normal */
.x-grid3-row.sil-row-done {
    animation: sil-row-pop 1.2s ease-out forwards;
}

/* Row being analyzed: slightly tinted background */
.x-grid3-row.sil-row-analyzing td {
    background-color: #fdf6ff !important;
    color: #7b1fa2;
}

/* ============================================================
   SMART IMPORT — Barre de progression globale (style "image 2")
   ============================================================ */

.sip-global-bar {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 8px 14px 6px;
    margin: 6px 8px 2px;
    box-sizing: border-box;
}

.sip-global-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.sip-global-title {
    font-size: 12.5px;
    font-weight: 600;
    color: #2e7d32;
}

.sip-global-counts {
    font-size: 11px;
    color: #388e3c;
    font-weight: 500;
}

.sip-global-track {
    width: 100%;
    height: 6px;
    background: #c8e6c9;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 3px;
}

.sip-global-fill {
    height: 100%;
    background: #43a047;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.sip-global-pct {
    text-align: right;
    font-size: 10px;
    color: #388e3c;
    font-weight: 700;
    margin-top: 1px;
}

/* ============================================================
   SMART IMPORT — Drop zone
   ============================================================ */

.smart-import-dropzone {
    width: 100%;
    height: 128px;
    border: 2px dashed #b0bec5;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    margin: 4px 0;
}

.smart-import-dropzone.x-drop-panel-file-over,
.smart-import-dropzone:hover {
    border-color: #1976d2;
    background: #e3f2fd;
}

.smart-dz-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 4px;
    pointer-events: none;
    user-select: none;
}

.smart-dz-icon {
    font-size: 26px;
    color: #90a4ae;
    line-height: 1;
}

.smart-dz-title {
    font-size: 13px;
    font-weight: 600;
    color: #1976d2;
    text-align: center;
}

.smart-dz-hint {
    font-size: 11px;
    color: #90a4ae;
}

/* ============================================================
   SMART IMPORT — Empty zone
   ============================================================ */

.smart-empty-state {
    width: 100%;
    padding: 28px 0 12px;
    text-align: center;
    color: #b0bec5;
}

.smart-empty-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.smart-empty-state p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

/* ============================================================
   FILE STATUS CARD — Per-file card (Smart Import window)
   ============================================================ */

.smart-file-card {
    display: inline-block;
    width: 150px;
    height: 126px;
    background: #ffffff;
    border: 1.5px solid #e0e7ef;
    border-radius: 10px;
    padding: 9px 9px 7px;
    margin: 4px;
    box-sizing: border-box;
    vertical-align: top;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.sfc-icon {
    width: 38px;
    height: 38px;
    border-radius: 7px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.sfc-icon-pdf    { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.sfc-icon-docx   { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.sfc-icon-doc    { background: #e8eaf6; color: #283593; border: 1px solid #9fa8da; }
.sfc-icon-generic{ background: #f5f5f5; color: #616161; border: 1px solid #e0e0e0; }

.sfc-name {
    font-size: 10.5px;
    font-weight: 600;
    color: #263238;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 132px;
    margin-bottom: 1px;
}

.sfc-size {
    font-size: 9.5px;
    color: #90a4ae;
    margin-bottom: 3px;
}

.sfc-progress-track {
    width: 100%;
    height: 4px;
    background: #eceff1;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2px;
}

.sfc-progress-fill {
    height: 100%;
    background: #1976d2;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.sfc-pct {
    font-size: 9.5px;
    color: #1976d2;
    font-weight: 600;
    text-align: right;
}

.sfc-status {
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
}

.sfc-queued    { color: #90a4ae; }
.sfc-uploading { color: #1976d2; }
.sfc-analyzing { color: #7b1fa2; }
.sfc-done      { color: #2e7d32; }
.sfc-error     { color: #c62828; }

.sfc-spinner {
    width: 38px; height: 38px;
    border-radius: 7px;
    background: #f3e5f5; border: 1px solid #ce93d8;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: #7b1fa2;
    animation: sfc-spin 1.1s linear infinite;
    margin-bottom: 4px;
}

@keyframes sfc-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.sfc-icon-done {
    width: 38px; height: 38px; border-radius: 50%;
    background: #e8f5e9; border: 1.5px solid #a5d6a7;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: #2e7d32;
    margin-bottom: 4px;
    animation: sfc-pop 0.25s ease;
}

@keyframes sfc-pop {
    0%  { transform: scale(0.7); opacity: 0.4; }
    70% { transform: scale(1.12); }
    100%{ transform: scale(1); opacity: 1; }
}

.sfc-icon-error {
    width: 38px; height: 38px; border-radius: 50%;
    background: #ffebee; border: 1.5px solid #ef9a9a;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: #c62828;
    margin-bottom: 4px;
}

/* Card background states */
.smart-file-card.sfc-state-queued   { border-color: #e0e7ef; }
.smart-file-card.sfc-state-uploading{ border-color: #90caf9; background: #fafcff; }
.smart-file-card.sfc-state-analyzing{ border-color: #ce93d8; background: #fdf6ff; }
.smart-file-card.sfc-state-done     { border-color: #a5d6a7; background: #f9fff9; }
.smart-file-card.sfc-state-error    { border-color: #ef9a9a; background: #fff8f8; }

/* ============================================================
   SMART IMPORT LIVE GRID — Onglet "Import en cours"
   ============================================================ */

/* ContentPanel header */
.sil-header-counts {
    font-size: 11px;
    color: #546e7a;
    font-weight: 500;
    padding-right: 8px;
    line-height: 22px;
}

.sil-header-counts b {
    color: #1976d2;
}

/* File type icons in the grid */
.sil-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.sil-icon-pdf    { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.sil-icon-docx   { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.sil-icon-doc    { background: #e8eaf6; color: #283593; border: 1px solid #9fa8da; }
.sil-icon-generic{ background: #f5f5f5; color: #616161; border: 1px solid #e0e0e0; }

/* Badges de statut */
.sil-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.sil-badge-queued {
    background: #f5f5f5;
    color: #90a4ae;
    border: 1px solid #e0e0e0;
}

.sil-badge-analyzing {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.sil-badge-done {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.sil-badge-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Spinner in the grid (AI Analysis state) */
.sil-spin {
    display: inline-block;
    animation: sfc-spin 1.1s linear infinite;
}

/* Cellule upload avec barre de progression inline */
.sil-upload-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.sil-progress-track {
    flex: 1;
    height: 5px;
    background: #e3f2fd;
    border-radius: 3px;
    overflow: hidden;
}

.sil-progress-fill {
    height: 100%;
    background: #1976d2;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.sil-pct {
    font-size: 10px;
    color: #1976d2;
    font-weight: 600;
    min-width: 28px;
    text-align: right;
}

/* Row highlighting based on state */
.x-grid3-row .sfc-state-done td   { background-color: #f9fff9 !important; }
.x-grid3-row .sfc-state-error td  { background-color: #fff8f8 !important; }

/* ============================================================
   SMART IMPORT LIVE GRID — nouvelles classes colonnes riches
   ============================================================ */

/* Nom du contrat dans la grille */
.sil-name {
    font-weight: 500;
    color: #263238;
    line-height: 1.4;
}

/* Tag type de contrat */
.sil-tag {
    display: inline-block;
    padding: 1px 7px;
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 500;
    white-space: nowrap;
}

/* Bouton cerveau dans la colonne action */
.ls-brain-icon-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    cursor: pointer;
}

.ls-brain-icon-btn .x-btn-text {
    background-image: url('gxt/themes/legalsuite/images/legalsuite/Icon_Septeo-Brain_RVB_2.svg');
    background-repeat: no-repeat;
    background-size: 20px 20px;
    background-position: center;
    width: 22px;
    height: 22px;
    display: inline-block;
}

/* ============================================================
   SKELETON SHIMMER — cellules en attente d'analyse (style Salesforce)
   ============================================================ */

.sil-skeleton {
    display: flex;
    align-items: center;
    height: 16px;
    padding: 0 2px;
}

.sil-skeleton-bar {
    height: 10px;
    width: 80%;
    max-width: 120px;
    border-radius: 5px;
    background: linear-gradient(90deg, #e0e0e0 25%, #eeeeee 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: sil-shimmer 1.4s infinite;
}

@keyframes sil-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tag droit applicable — bleu-gris */
.sil-tag.sil-tag-law {
    background: #e8eaf6;
    color: #3949ab;
    border-color: #9fa8da;
}

/* Row appearance animation when analysis is complete */
@keyframes sil-row-pop {
    from { background-color: #e8f5e9; }
    to   { background-color: transparent; }
}

/* Ligne "done" : flash vert puis retour normal */
.x-grid3-row.sil-row-done {
    animation: sil-row-pop 1.2s ease-out forwards;
}

/* Row being analyzed: slightly tinted background */
.x-grid3-row.sil-row-analyzing td {
    background-color: #fdf6ff !important;
    color: #7b1fa2;
}

/* Conteneur */
.ls-smart-import .ls-grid-panel {
  border: 1px solid #e6e9ef;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.06);
  background: #fff;
}

/* Fix grid body width not expanding when IAAssistant panel closes */
.ls-smart-import .x-grid3,
.ls-smart-import .x-grid3-scroller,
.ls-smart-import .x-grid3-body,
.ls-smart-import .x-grid3-row-table {
  width: 100% !important;
}

/* Header de colonnes */
.ls-smart-import .x-grid3-hd {
  background: #f7f9fc;
  border-bottom: 1px solid #e6e9ef;
  font-weight: 600;
  color: #344054;
}

/* Lignes */
.ls-smart-import .x-grid3-row td {
  padding: 14px 10px;  /* + haut */
  vertical-align: middle;
  border-bottom: 1px solid #f0f2f6;
}

.ls-smart-import .x-grid3-row-over {
  background: #f7fbff !important;
}

/* Clamp 2 lignes */
.ls-smart-import .ls-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 16px;
  max-height: 32px;
  color: #475467;
}

/* Montant */
.ls-smart-import .ls-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #101828;
}
.ls-smart-import .ls-currency {
  font-weight: 500;
  color: #667085;
  font-size: 11px;
}

/* Statut chip */
.ls-smart-import .sil-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid transparent;
}

.ls-smart-import .sil-badge-done {
  background: #ecfdf3;
  color: #027a48;
  border-color: #abefc6;
}
.ls-smart-import .sil-badge-analyzing {
  background: #eff8ff;
  color: #175cd3;
  border-color: #b2ddff;
}
.ls-smart-import .sil-badge-queued {
  background: #f2f4f7;
  color: #344054;
  border-color: #eaecf0;
}
.ls-smart-import .sil-badge-error {
  background: #fef3f2;
  color: #b42318;
  border-color: #fecdca;
}

/* Grid scroller - let GXT handle scrolling natively for proper header sync */
/* Onglets style "segmented" */
.ls-smart-import .x-tab-strip {
  background: transparent;
  border: 0;
  padding: 8px 8px 0 8px;
}

.ls-smart-import .x-tab-strip .x-tab-strip-inner {
  border-radius: 999px;
  background: #f2f4f7;
  padding: 4px;
}

.ls-smart-import .x-tab-strip .x-tab-strip-text {
  font-weight: 600;
  color: #344054;
}

/* tab */
.ls-smart-import .x-tab-strip .x-tab-strip-active {
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.06);
}

.ls-smart-import .x-tab-strip .x-tab-strip-active .x-tab-strip-text {
  color: #101828;
}

/* compteur */
.ls-smart-import .ls-tab-count {
  margin-left: 6px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}

/* =============================
   SoftLaw Tabs - Modern LegalSuite
   ============================= */

/* 1) Nettoyage header TabPanel */
.ls-file-tab .x-tab-panel-header {
  background: #ffffff !important;
  border: 0 !important;
  padding: 0 !important;
}

/* 2) Strip: barre des onglets */
.ls-file-tab .x-tab-strip {
  background: #ffffff !important;
  border: 0 !important;
  border-bottom: 1px solid #eaecf0 !important;
  padding: 0 18px !important;
  margin: 0 !important;
  height: 44px !important;
}

/* 3) Chaque onglet (li) */
.ls-file-tab .x-tab-strip li.x-component {
  margin: 0 22px 0 0 !important;
  padding: 0 !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
}

/* 4) Supprime skin Ext (right/left/inner) */
.ls-file-tab .x-tab-strip a.x-tab-right,
.ls-file-tab .x-tab-strip em.x-tab-left,
.ls-file-tab .x-tab-strip span.x-tab-strip-inner {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}

/* 5) Texte onglet */
.ls-file-tab .x-tab-strip span.x-tab-strip-text {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;

  font-size: 12px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .35px !important;

  color: #667085 !important;
  padding: 0 2px !important;
  line-height: 44px !important; /* centre vertical */
}

/* Hover (non actif) */
.ls-file-tab .x-tab-strip li.x-component:not(.x-tab-strip-active) .x-tab-strip-text:hover {
  color: #344054 !important;
}

/* 6) Onglet actif: underline propre sous le texte */
.ls-file-tab .x-tab-strip li.x-tab-strip-active .x-tab-strip-text {
  color: #101828 !important;
}

.ls-file-tab .x-tab-strip li.x-tab-strip-active .x-tab-strip-text:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;                 /* place l’underline dans la barre */
  height: 2px;
  border-radius: 2px;
  background: #2f80ed;         /* accent */
}



/* ============================================================
   SMART IMPORT INSIGHTS PANEL — Heading icon
   ============================================================ */

.sii-heading-icon::before {
    content: "\1F4CA";  /* 📊 chart emoji */
    margin-right: 6px;
}


/* Header: align everything to the right */
.smartimport-title-near-close .x-window-header{
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* Cancel the inline float on toolbar (inline style wins unless !important) */
.smartimport-title-near-close .x-window-header > .x-panel-toolbar{
  float: none !important;
  margin: 0 !important;
  order: 2 !important;          /* toolbar after title */
}

/* Title should be right-aligned and placed before the toolbar */
.smartimport-title-near-close .x-window-header > .x-window-header-text{
  float: none !important;
  order: 1 !important;          /* title before toolbar */
  margin: 0 !important;
  white-space: nowrap !important;
}

/* ============================================================
   SmartImportWindow — Dropzone "glass" like screenshot
   ============================================================ */

/* Le bloc global (la zone en pointillés) */
.smart-import-dropzone{
  height: 170px !important;                       /* ajuste 160-190 selon ton layout */
  border: 2px dashed #4e79ff !important;
  border-radius: 14px !important;

  /* "glass" soft gradient */
  background: radial-gradient(120% 140% at 50% 60%,
              #ffffff 0%,
              #f4f7ff 45%,
              #eef2ff 100%) !important;

  box-shadow:
    inset 0 0 0 1px rgba(78,121,255,.10),
    0 10px 30px rgba(16,24,40,.10);

  position: relative;
  overflow: hidden;
}

/* Optionnel : léger voile lumineux comme sur la capture */
.smart-import-dropzone:before{
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at 50% 30%,
              rgba(120, 140, 255, .20) 0%,
              rgba(120, 140, 255, .10) 35%,
              rgba(255,255,255,0) 70%);
  pointer-events: none;
}

/* Hover + drag over : plus "focus" */
.smart-import-dropzone:hover,
.smart-import-dropzone.x-drop-panel-file-over{
  border-color: #2f63ff !important;
  box-shadow:
    inset 0 0 0 1px rgba(47,99,255,.18),
    0 14px 36px rgba(16,24,40,.14);
}

/* Centrage vertical/horizontal du contenu */
.smart-dz-inner{
  position: relative; /* au-dessus du :before */
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Icône upload (plus proche de la capture) */
.smart-dz-icon{
  width: 44px;
  height: 44px;
  border-radius: 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(78,121,255,.10);
  border: 1px solid rgba(78,121,255,.25);
  color: #2f63ff;

  font-size: 22px;     /* si c’est une police icône */
  line-height: 1;
}

/* Titre haut (dans le bandeau au-dessus de la dropzone) */
.smart-import-window-title{
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .25px;
  color: #2b2f70;
}

/* Texte principal */
.smart-dz-title{
  font-size: 14px;
  font-weight: 600;
  color: #475467;     /* gris LS */
}

/* Hint (la ligne PDF/DOC/DOCX...) */
.smart-dz-hint{
  font-size: 12px;
  color: #667085;
}

/* ──────────────────────────────────────────────────────────────
   Duplicate Detection Modal - Selection Checkboxes
   ────────────────────────────────────────────────────────────── */

/* Select All container */
.sii-dup-select-all-container {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sii-dup-select-all label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: #1e293b;
  font-size: 13px;
  user-select: none;
}

.sii-dup-select-all input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
  accent-color: #4e79ff;
  border-radius: 4px;
}

/* Duplicate list container */
.sii-dup-list {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sii-dup-items {
  padding: 6px 0;
}

/* Individual duplicate item */
.sii-dup-item {
  padding: 12px 14px;
  margin: 4px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #fafbfc;
  transition: all 0.2s ease;
}

.sii-dup-item:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sii-dup-item:last-child {
  margin-bottom: 4px;
}

/* Checkbox label wrapper */
.sii-dup-checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  margin-bottom: 6px;
  user-select: none;
}

.sii-dup-checkbox {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  margin-top: 1px;
  cursor: pointer;
  accent-color: #4e79ff;
  flex-shrink: 0;
  border-radius: 4px;
}

.sii-dup-checkbox:checked + .sii-dup-name {
  color: #1e40af;
}

/* Document name */
.sii-dup-checkbox-label .sii-dup-name {
  font-weight: 500;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  transition: color 0.15s ease;
}

/* Status metadata */
.sii-dup-meta {
  font-size: 11px;
  color: #64748b;
  margin-left: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sii-dup-meta::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #94a3b8;
  border-radius: 50%;
}

/* Subtitle text */
.sii-dup-subtitle-text {
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 14px;
  padding: 0 2px;
}

/* Warning text */
.sii-dup-warning {
  margin-top: 14px;
}

.sii-dup-warning-text {
  font-size: 12px;
  color: #92400e;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sii-dup-warning-text::before {
  content: '⚠';
  font-size: 14px;
}

/* ---------------------------------------------------------
   HEADER / ACTION BAR
   --------------------------------------------------------- */
.sii-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px !important;
  min-height: 44px !important;
  background: #f8faff;
  border: 1px solid #dfe6f1;
  border-radius: 12px;
  box-shadow: none;
}

.sii-bar-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
}
.ls-section-panel.ls-sii-section .x-panel-header .x-panel-header-text,
.sii-bar-title,
.sii-bar-title > span:first-child {
  font-size: 14px !important;
  font-weight: 700;
  color: #14213d;
}

.sii-heading-sub {
  margin-top: 2px !important;
  font-size: 11px !important;
  color: #7a8799;
}

/* Boutons plus petits */
.sii-launch-btn button,
.sii-toggle-btn button,
.sii-delete-dup-btn button,
.btn-reset.btn-actions-text {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 28px !important;
}

.sii-launch-btn button {
  background: linear-gradient(90deg, #4f46e5, #3b00ff) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 10px rgba(59, 0, 255, 0.18) !important;
}

.sii-toggle-btn button,
.sii-delete-dup-btn button {
  background: #fff !important;
  border: 1px solid #d7dfeb !important;
  color: #334155 !important;
}
.x-theme-legalsuite .ls-file-tab .ls-fieldset-panel.sii-panel .x-panel-body {
    padding: 0 !important;
}


/* ── Lien cliquable titre contrat ───────────────────────────────── */
.sil-title-link button {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2px 4px !important;
    color: #3b4fc8 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-align: left !important;
    cursor: pointer !important;
    border-radius: 4px !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

.sil-title-link button:hover {
    background: rgba(185, 199, 251, 0.35) !important;
    color: #1a2fa0 !important;
    text-decoration: underline !important;
}

.sil-title-link button:active {
    background: rgba(185, 199, 251, 0.6) !important;
}
.sil-live-grid-panel .x-grid3-hd-inner:hover {
    background-color: white !important;
}


/* 3. Cards — largeur fixe pour grille en FlowLayout */
.smart-file-card {
    width: 140px !important;
    min-width: 140px !important;
    height: 118px !important;
    box-sizing: border-box !important;
    display: inline-block !important;
    vertical-align: top !important;
    margin: 4px !important;
    flex-shrink: 0 !important;
}


/* 5. Zone interne de la dropzone — padding réduit */
.smart-dz-inner {
    padding: 6px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
}

.smart-dz-icon {
    font-size: 18px !important;
    line-height: 1 !important;
    margin-bottom: 2px !important;
}

.smart-dz-title {
    font-size: 12px !important;
    margin: 0 !important;
}

.smart-dz-title p {
    margin: 0 !important;
}

.smart-dz-hint {
    font-size: 11px !important;
    margin: 0 !important;
}

/* 6. Barre globale — hauteur fixe */
.sip-global-bar {
    height: 60px !important;
    box-sizing: border-box !important;
    padding: 6px 12px !important;
}

/* 7. Fenêtre slide — positionnement correct sans couper le contenu */
.smartimport-title-near-close.slide-editor-window {
    overflow: visible !important;
}

.smartimport-title-near-close.slide-editor-window .x-window-bwrap {
    overflow: visible !important;
}

.smartimport-title-near-close.slide-editor-window .x-window-ml,
.smartimport-title-near-close.slide-editor-window .x-window-mr,
.smartimport-title-near-close.slide-editor-window .x-window-mc {
    overflow: visible !important;
}

/* 8. Le body de la fenêtre — laisser le scroll enfant remonter */
.smartimport-title-near-close.slide-editor-window .x-window-body {
    overflow: visible !important;
}

.ls-analyzed-doc-grid-container .scroller-right-wrap {
    display: none;
}

.ls-analyzed-doc-grid-container .scroller-left-wrap {
    display: none;
}

.ls-analyzed-doc-grid-container .scroller-right-wrap {
    display: none;
}

.ls-analyzed-doc-grid-container .scroller-left-wrap {
    display: none;
}

.ls-analyzed-doc-grid-container .scroller-right-wrap {
    display: none;
}

.ls-analyzed-doc-grid-container .scroller-left-wrap {
    display: none;
}



/* Force le panel principal en colonne flex */
.smart-import-dropzone-panel {
    gap: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
}

/* Zone cards — prend tout l'espace restant et scrolle */
.smart-cards-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 14px 20px !important;
    box-sizing: border-box !important;
}

/* Écrase le overflow:hidden de GXT sur x-component */
.smart-cards-scroll.x-component {
    overflow-y: auto !important;
}


/* ============================================================
   SMART IMPORT — Modern override V2
   Ajouté en fin de fichier pour conserver le formatage existant
   ============================================================ */


/* Barre globale */
.sip-global-bar {
    height: auto !important;
    min-height: 68px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%) !important;
    border: 1px solid #dde5f0 !important;
    border-radius: 16px !important;
    padding: 12px 14px 10px !important;
    margin: 6px 8px 4px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06) !important;
}

.sip-global-header {
    margin-bottom: 9px !important;
}

.sip-global-title {
    color: #1f2a3d !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.sip-global-counts {
    color: #6b778c !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.sip-global-track {
    height: 8px !important;
    background: #edf2fb !important;
    border-radius: 999px !important;
    margin-bottom: 6px !important;
}

.sip-global-fill {
    background: linear-gradient(90deg, #7c3aed 0%, #3b82f6 100%) !important;
    border-radius: 999px !important;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.18) !important;
}

.sip-global-pct {
    color: #4f5d75 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

/* Dropzone */
.smart-import-dropzone {
    height: 100% !important;
    border: 1.5px dashed #cfd8ea !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%) !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
    margin: 4px 0 6px 0 !important;
}

.smart-import-dropzone:hover,
.smart-import-dropzone.x-drop-panel-file-over {
    border-color: #7c3aed !important;
    background: linear-gradient(180deg, #fcfbff 0%, #f6f2ff 100%) !important;
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.08) !important;
}

.smart-dz-inner {
    gap: 6px !important;
    padding: 10px 0 !important;
    min-height: 500px;
    display: flex;
    justify-content: center; /* horizontal */
    align-items: center;     /* vertical */
}

.smart-dz-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    background: #f3efff !important;
    border: 1px solid #e5dbff !important;
    color: #7c3aed !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    margin-bottom: 4px !important;
}

.smart-dz-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #243247 !important;
}

.smart-dz-hint {
    font-size: 11px !important;
    color: #7b8799 !important;
}

/* Scroll area */
.smart-cards-scroll {
    padding: 10px 10px 20px !important;
}

/* Cards */
.smart-file-card {
    width: 148px !important;
    min-width: 148px !important;
    height: 132px !important;
    border: 1px solid #e4eaf3 !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%) !important;
    padding: 12px 12px 10px !important;
    margin: 6px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.smart-file-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10) !important;
    border-color: #d8e0ec !important;
}

.smart-file-card.sfc-state-analyzing,
.smart-file-card.sfc-state-uploading,
.smart-file-card.sfc-state-error,
.smart-file-card.sfc-state-done {
    background-image: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%) !important;
}

.smart-file-card.sfc-state-analyzing {
    border-color: #e5dbff !important;
}

.smart-file-card.sfc-state-uploading {
    border-color: #d8e8ff !important;
}

.smart-file-card.sfc-state-error {
    border-color: #f6d4d4 !important;
}

.smart-file-card.sfc-state-done {
    border-color: #cfe9db !important;
}

.smart-file-card.sfc-state-analyzing:before,
.smart-file-card.sfc-state-uploading:before,
.smart-file-card.sfc-state-error:before,
.smart-file-card.sfc-state-done:before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 4px;
    border-radius: 0 8px 8px 0;
}

.smart-file-card.sfc-state-analyzing:before {
    background: linear-gradient(180deg, #a78bfa 0%, #7c3aed 100%);
}

.smart-file-card.sfc-state-uploading:before {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.smart-file-card.sfc-state-error:before {
    background: linear-gradient(180deg, #f87171 0%, #ef4444 100%);
}

.smart-file-card.sfc-state-done:before {
    background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
}

/* Icones */
.sfc-icon,
.sfc-spinner,
.sfc-icon-done,
.sfc-icon-error {
    width: 36px !important;
    height: 36px !important;
    margin-bottom: 7px !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}

.sfc-icon {
    font-size: 10px !important;
}

.sfc-icon-pdf {
    background: #fff4f4 !important;
    color: #ef4444 !important;
    border: 1px solid #fecaca !important;
}

.sfc-icon-docx {
    background: #eff6ff !important;
    color: #2563eb !important;
    border: 1px solid #bfdbfe !important;
}

.sfc-icon-doc {
    background: #eef2ff !important;
    color: #4f46e5 !important;
    border: 1px solid #c7d2fe !important;
}

.sfc-icon-generic {
    background: #f8fafc !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

.sfc-spinner {
    background: #f6f0ff !important;
    border: 1px solid #e7d8ff !important;
    color: #7c3aed !important;
}

.sfc-icon-done {
    background: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #10b981 !important;
}

.sfc-icon-error {
    background: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    color: #ef4444 !important;
}

/* Texte */
.sfc-name {
    max-width: 122px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #243247 !important;
    line-height: 1.35 !important;
    margin-bottom: 3px !important;
}

.sfc-size {
    font-size: 10px !important;
    color: #8a97ab !important;
    margin-bottom: 6px !important;
}

/* Progress */
.sfc-progress-track {
    height: 5px !important;
    background: #ebf1fa !important;
    border-radius: 999px !important;
    margin-bottom: 4px !important;
}

.sfc-progress-fill {
    background: linear-gradient(90deg, #7c3aed 0%, #3b82f6 100%) !important;
    border-radius: 999px !important;
}

.sfc-pct {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #3b82f6 !important;
}

/* Status */
.sfc-status {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    margin-top: 4px !important;
    letter-spacing: 0 !important;
}

.sfc-queued {
    color: #7b8799 !important;
}

.sfc-uploading {
    color: #2563eb !important;
}

.sfc-analyzing {
    color: #7c3aed !important;
}

.sfc-done {
    color: #10b981 !important;
}

.sfc-error {
    color: #ef4444 !important;
}

.smart-file-card .sfc-status:before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    vertical-align: middle;
}

.smart-file-card .sfc-status.sfc-uploading:before {
    background: #2563eb;
}

.smart-file-card .sfc-status.sfc-analyzing:before {
    background: #7c3aed;
}

.smart-file-card .sfc-status.sfc-done:before {
    background: #10b981;
}

.smart-file-card .sfc-status.sfc-error:before {
    background: #ef4444;
}

.smart-file-card .sfc-status.sfc-queued:before {
    background: #94a3b8;
}


 

/* =========================================================
   BatchCreateDialog - style proche des dialogs standards
   ========================================================= */

 

.glx-batch-create-dialog.x-window {
  border-radius: 10px !important;
  overflow: hidden;
}

 

/* Conserver le look GXT standard, juste le lisser */
.glx-batch-create-dialog .x-window-tl,
.glx-batch-create-dialog .x-window-tr,
.glx-batch-create-dialog .x-window-tc,
.glx-batch-create-dialog .x-window-ml,
.glx-batch-create-dialog .x-window-mr,
.glx-batch-create-dialog .x-window-mc,
.glx-batch-create-dialog .x-window-bl,
.glx-batch-create-dialog .x-window-br,
.glx-batch-create-dialog .x-window-bc {
background: #fff !important;
}

 

/* Header proche du standard existant */
.glx-batch-create-dialog .x-window-header {
padding: 12px 14px !important;
border-bottom: 1px solid #e6e9f0;
background: #ffffff !important;
}

 

.glx-batch-create-dialog .x-window-header-text {
font-size: 16px !important;
font-weight: 600 !important;
color: #1f2937 !important;
}

 

/* Body */
.glx-batch-create-dialog .x-window-body {
background: #ffffff !important;
}

 

/* Contenu principal */
.glx-batch-create-content {
padding: 16px !important;
}

 

/* Texte introductif */
.glx-batch-create-content .x-html,
.glx-batch-create-content div[style*="font-size:13px"] {
font-size: 13px !important;
line-height: 1.5 !important;
color: #374151 !important;
margin-bottom: 8px;
}

 

/* Formulaire */
.glx-batch-create-form {
background: transparent !important;
}

 

.glx-batch-create-form .x-panel-body {
background: transparent !important;
}

 

.glx-batch-create-form .x-form-item {
margin-bottom: 10px !important;
}

 

.glx-batch-create-form .x-form-item-label {
font-size: 12px !important;
font-weight: 600 !important;
color: #4b5563 !important;
padding-top: 6px !important;
}

 

/* Combo */
.glx-batch-create-form .x-form-field-wrap {
border: 1px solid #d7ddea !important;
border-radius: 8px !important;
background: #fff !important;
min-height: 34px;
}

 

.glx-batch-create-form .x-form-field-wrap:hover {
border-color: #bfc9dc !important;
}

 

.glx-batch-create-form .x-form-text {
border: none !important;
background: transparent !important;
height: 32px !important;
padding: 6px 10px !important;
font-size: 13px !important;
color: #1f2937 !important;
}

 

.glx-batch-create-form .x-form-trigger {
border: none !important;
background-color: transparent !important;
}

 

/* Checkbox */
.glx-batch-create-form .x-form-check-wrap {
  display: flex !important;
  align-items: center;
  min-height: 32px;
}

 

.glx-batch-create-form .x-form-checkbox {
	position: static !important;
	left: auto !important;
	top: auto !important;
	margin-top: 0 !important;
	transform: scale(1.05);
}

 

/* Séparateur */
.glx-batch-create-content .glx-batch-create-separator,
.glx-batch-create-content div[style*="height:1px;background:#e0e0e0"] {
  background: #e6e9f0 !important;
  height: 1px !important;
  margin: 12px 0 10px 0 !important;
}

 

/* Footer boutons */
.glx-batch-create-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

 

/* Style bouton standard appli */
.glx-batch-create-footer .x-btn button,
.glx-batch-create-footer .ls-button button {
  min-width: 140px;
  height: 34px;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

 

/* Bouton Annuler : outlined bleu comme ton exemple */
.glx-batch-create-cancel button {
  background: transparent !important;
  color: #3d64ed !important;
  border: 1px solid #3d64ed !important;
}

 

.glx-batch-create-cancel button:hover {
  background: rgba(61, 100, 237, 0.06) !important;
}

 

/* Bouton principal : plein bleu mais sobre */
.glx-batch-create-confirm button {
background: #3d64ed !important;
color: #ffffff !important;
border: 1px solid #3d64ed !important;
}

 

.glx-batch-create-confirm button:hover {
background: #3157dc !important;
border-color: #3157dc !important;
}


/* =========================
   BANNER (haut de page)
========================= */
.softlaw-batch-banner {
	background: linear-gradient(90deg, #eef6ff, #f8fbff);
	border: 1px solid #d6e9ff;
	border-left: 4px solid #2b6cb0;
	border-radius: 6px;
	padding: 12px 16px;
	margin-bottom: 12px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.softlaw-batch-banner-content {
	display: flex;
	align-items: center;
	color: #1e3a5f;
	font-size: 13px;
	font-weight: 500;
}

.softlaw-batch-banner-icon {
	font-size: 16px;
	margin-right: 10px;
	color: #2b6cb0;
}


/* =========================
   LIGNES BATCH (table)
========================= */
.softlaw-batch-row {
	position: relative;
	transition: all 0.2s ease;
	animation: fadeInRow 0.3s ease;
}

/* Fond léger différencié */
.softlaw-batch-row td {
	background-color: #f7faff !important;
	border-bottom: 1px solid #edf2f7;
}

/* Barre latérale moderne */
.softlaw-batch-row::before {
	content: "";
	position: absolute;
	left: 0;
	top: 6px;
	bottom: 6px;
	width: 4px;
	background: linear-gradient(to bottom, #2b6cb0, #63a4ff);
	border-radius: 4px;
}

/* Hover UX moderne */
.softlaw-batch-row:hover td {
	background-color: #edf4ff !important;
}

.softlaw-batch-row:hover {
	transform: translateX(2px);
}

/* Texte légèrement mis en avant */
.softlaw-batch-row td:first-child {
	font-weight: 500;
	color: #1e3a5f;
}


/* =========================
   BADGE "NOUVEAU" (CSS only)
========================= */

/* Sécurité : éviter doublons */
.softlaw-batch-row td::before {
	content: none !important;
}
.sii-action-bar-no-borders {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px 8px 12px !important;
  min-height: 44px !important;
  box-shadow: none;
}

.x-theme-legalsuite .live-grid-section .x-panel-collapsed {

  padding: 0px;

  margin: 0px !important;

}

 

.x-theme-legalsuite .ls-section-panel.ls-sii-section {

  margin: 0px 10px;

  border: 1px solid #dfe6f1;

  border-radius: 12px;

  margin-bottom: 20px;

  min-height: 60px;

}

 

.x-theme-legalsuite .ls-section-panel.ls-sii-section .x-small-editor.x-panel-header{

  background-color: red;

  padding: 24px 12px;

}

 

.x-theme-legalsuite .ls-section-panel.ls-sii-section .x-small-editor.x-panel-header{

  background-color: transparent;

}

 

.sii-collapse-toggle {

  cursor: pointer;

}

 

.sii-collapse-toggle #liveGrid-toggle {

    transform: rotate(180deg);

}

 

.x-theme-legalsuite .live-grid-section .x-grid3-td-checker .x-grid3-hd-inner {

  background-position: 0px -30px;

}

 

.x-theme-legalsuite .live-grid-section .x-grid3-td-checker.x-grid3-hd-checker-on .x-grid3-hd-inner {

  background-position: 0px 0px;

}

 

.x-theme-legalsuite .ls-section-panel .ls-grid-paging-bar .paging-size .x-form-text {

  background-color: transparent;

}

 

.x-theme-legalsuite .sl-batch-create-dialog .x-form-element .alarm-checkbox > label {

  padding-left: 0px !important;

  margin-left: 0px !important;

}



/* === Smart Import - layout général === */

.sii-action-bar {
  margin: 12px !important;
  padding: 14px 18px !important;
  border: 1px solid #dfe6f5 !important;
  border-radius: 14px !important;
  background: linear-gradient(135deg, #ffffff 0%, #f7f8ff 100%) !important;
  box-shadow: 0 4px 14px rgba(36, 55, 100, 0.06);
  align-items: center;
}

.sii-bar-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #111b4f !important;
}

.sii-heading-sub {
  display: block;
  margin-top: 3px;
  font-size: 11px !important;
  font-weight: 400 !important;
  color: #7b849e !important;
}

/* === Bloc / section : Documents analysés, contrats à valider, terminés === */

.ls-sii-section,
.live-grid-section {
  margin: 12px 4px !important;
  border: 1px solid #dfe6f5 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 6px 18px rgba(36, 55, 100, 0.07);
  overflow: hidden !important;
}

/* Header de chaque bloc */
.sii-action-bar-no-borders {
  padding: 14px 18px !important;
  min-height: 46px !important;
  background: linear-gradient(90deg, #ffffff 0%, #f7f8ff 100%) !important;
  border-bottom: 1px solid #edf1fa !important;
  align-items: center;
}

/* Ligne "Contrats à valider" et "Documents terminés" si ce sont juste des titres */
.ls-sii-section + .ls-sii-section,
.live-grid-section + .live-grid-section {
  margin-top: 10px !important;
}

/* Compteurs */
.sil-header-counts {
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef3ff;
  color: #4267b2 !important;
  font-size: 11px !important;
  font-weight: 600;
}

/* Bouton collapse */
.sii-collapse-toggle {
  width: 28px !important;
  height: 28px !important;
  border-radius: 50%;
  background: #fff !important;
  border: 1px solid #d8def2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s ease;
}

.sii-collapse-toggle:hover {
  background: #f0f4ff !important;
  border-color: #7b61ff;
  box-shadow: 0 3px 8px rgba(98, 81, 221, 0.18);
}

/* === Boutons du header === */

.sii-action-bar .ls-button button,
.sii-action-bar-no-borders .ls-button button {
  border-radius: 999px !important;
  height: 34px !important;
  font-weight: 600 !important;
  background-color: #ffffff !important;
  border: 1px solid #8b95c9 !important;
  color: #6973a6 !important;
  box-shadow: 0 2px 6px rgba(36, 55, 100, 0.04);
}

.sii-action-bar .ls-button button:hover,
.sii-action-bar-no-borders .ls-button button:hover {
  background-color: #f4f6ff !important;
  border-color: #6654e8 !important;
  color: #4b3fd6 !important;
}

/* Bouton créer toutes les fiches */
.sii-create-all-btn button {
  background-color: #ffffff !important;
  border-radius: 999px !important;
}

.sii-create-all-btn.x-item-disabled button {
  opacity: .55;
  background: #f7f7fb !important;
}

/* === Grille dans le bloc === */

.live-grid-section .x-grid3-header {
  background: #f8faff !important;
  border-bottom: 1px solid #e5ebf7 !important;
}


.live-grid-section .x-grid3-row {
  border-bottom: 1px solid #eef2f8 !important;
  background: #ffffff !important;
  transition: background .15s ease;
}

.live-grid-section .x-grid3-row:hover {
  background: #f7faff !important;
}

.live-grid-section .x-grid3-row-selected {
  background: #eaf4ff !important;
  box-shadow: inset 4px 0 0 #4f7cff;
}

.live-grid-section .x-grid3-cell-inner {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  line-height: 16px !important;
}

/* Badges */
.sil-tag,
.sil-badge {
  border-radius: 999px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

.sil-tag-law {
  background: #f2edff !important;
  color: #5b3fd1 !important;
  border: 1px solid #c9bbff !important;
}

/* PDF icon */
.sil-type-icon {
  border-radius: 7px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}

/* === Suppression du grand vide violet en bas si causé par le body === */
.x-tab-panel-body,
.x-tab-panel-body-top {
  background: #ffffff !important;
}

.ls-filetab-item {
  background: #ffffff !important;
}

/* =========================
   ANIMATION
========================= */
@keyframes fadeInRow {
	from {
		opacity: 0;
		transform: translateY(3px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============================================================
   SMART IMPORT — Summary Cards (état masqué des stats)
   ============================================================ */

.sii-summary-row {
    padding: 12px 16px;
    display: flex;
    gap: 12px;
}

.sii-summary-card {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e8edf7;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(36, 55, 100, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sii-summary-card:hover {
    box-shadow: 0 8px 24px rgba(36, 55, 100, 0.10);
    transform: translateY(-2px);
}

.sii-summary-icon {
    font-size: 22px;
    margin-bottom: 10px;
    line-height: 1;
}

.sii-summary-value {
    font-size: 32px;
    font-weight: 800;
    color: #111b4f;
    line-height: 1;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
}

.sii-summary-label {
    font-size: 12px;
    font-weight: 500;
    color: #7b849e;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Accent latéral */
.sii-summary-card::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
}

.sii-card-blue::before   { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.sii-card-green::before  { background: linear-gradient(180deg, #34d399, #10b981); }
.sii-card-orange::before { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.sii-card-purple::before { background: linear-gradient(180deg, #a78bfa, #7c3aed); }

/* Valeur colorée selon le type */
.sii-card-blue   .sii-summary-value { color: #2563eb; }
.sii-card-green  .sii-summary-value { color: #10b981; }
.sii-card-orange .sii-summary-value { color: #f59e0b; }
.sii-card-purple .sii-summary-value { color: #7c3aed; }

/* Fond teinté léger */
.sii-card-blue   { background: linear-gradient(135deg, #ffffff, #eff6ff); }
.sii-card-green  { background: linear-gradient(135deg, #ffffff, #ecfdf5); }
.sii-card-orange { background: linear-gradient(135deg, #ffffff, #fffbeb); }
.sii-card-purple { background: linear-gradient(135deg, #ffffff, #f5f3ff); }



/* ============================================================
   SMART IMPORT — Summary Cards redesign
   ============================================================ */

.sii-summary-row {
    padding: 10px 16px 14px;
}

.sii-summary-card {
    background: #ffffff;
    border: 1px solid #e8edf7;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(36, 55, 100, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 72px;
    box-sizing: border-box;
}

.sii-summary-card:hover {
    box-shadow: 0 6px 18px rgba(36, 55, 100, 0.10);
    transform: translateY(-1px);
}

.sii-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sii-summary-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.sii-summary-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.sii-summary-label {
    font-size: 11px;
    font-weight: 600;
    color: #7b849e;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1;
}

.sii-summary-sub {
    font-size: 10px;
    color: #a0abc0;
    margin-top: 1px;
}

/* Blue — Analysés */
.sii-card-blue .sii-summary-icon {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}
.sii-card-blue .sii-summary-value { color: #2563eb; }

/* Green — Fiches créées */
.sii-card-green .sii-summary-icon {
    background: #ecfdf5;
    color: #10b981;
    border: 1px solid #a7f3d0;
}
.sii-card-green .sii-summary-value { color: #10b981; }

/* Orange — À valider */
.sii-card-orange .sii-summary-icon {
    background: #fffbeb;
    color: #f59e0b;
    border: 1px solid #fde68a;
}
.sii-card-orange .sii-summary-value { color: #f59e0b; }

/* Purple — Confiance IA */
.sii-card-purple .sii-summary-icon {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}
.sii-card-purple .sii-summary-value { color: #7c3aed; }
.sii-bar-title {
    display: inline-block !important;
}


.x-grid3-td-contractTitle span.lib {
    display: block;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.x-grid3-td-governingLaw .x-grid3-cell-inner {
    overflow: hidden;
}

.x-grid3-td-governingLaw .sil-tag {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.sil-badge-created {
    cursor: pointer;
}
