/* ================================================================
   ThriveCentral — Design System Frontend (préfixe tc-)
   Basé sur le design system Antigravity (adaptation de mt-)
   ================================================================ */

/* ── Variables ── */
:root {
    --tc-bg:            #eef2f7;
    --tc-white:         #ffffff;
    --tc-sidebar-w:     240px;

    --tc-primary:       #2563EB;
    --tc-primary-light: #EFF6FF;
    --tc-primary-dark:  #1d4ed8;

    --tc-green:         #16A34A;
    --tc-green-light:   #F0FDF4;

    --tc-orange:        #D97706;
    --tc-orange-light:  #FFFBEB;

    --tc-red:           #DC2626;
    --tc-red-light:     #FEF2F2;

    --tc-purple:        #7C3AED;
    --tc-purple-light:  #F5F3FF;

    --tc-text:          #1e293b;
    --tc-text-soft:     #64748b;

    --tc-border:        #e2e8f0;
    --tc-shadow:        0 2px 12px rgba(0,0,0,.07);
    --tc-shadow-md:     0 4px 20px rgba(0,0,0,.10);
    --tc-radius:        14px;
    --tc-radius-sm:     8px;
    --tc-font:          -apple-system,'Inter',BlinkMacSystemFont,'Segoe UI',sans-serif;
}

/* ── Reset isolation WordPress ── */
.tc-app *, .tc-app *::before, .tc-app *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.tc-app h1, .tc-app h2, .tc-app h3, .tc-app h4 { font-family: var(--tc-font); }
.tc-app a { color: var(--tc-primary); }
.tc-app img { max-width: 100%; }
.tc-app button { font-family: var(--tc-font); }
.tc-app ul { list-style: none; }

/* ── Layout principal ── */
.tc-app {
    font-family: var(--tc-font);
    display: flex;
    min-height: 700px;
    background: var(--tc-bg);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.12);
    position: relative;
    color: var(--tc-text);
}

/* ── Sidebar ── */
.tc-sidebar {
    width: var(--tc-sidebar-w);
    min-width: var(--tc-sidebar-w);
    background: var(--tc-white);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--tc-border);
    flex-shrink: 0;
}

.tc-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px 14px;
    text-decoration: none;
    border-bottom: 1px solid var(--tc-border);
}
.tc-sidebar-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tc-sidebar-logo-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--tc-text);
    line-height: 1.2;
}
.tc-sidebar-logo-text span {
    font-size: 11px;
    color: var(--tc-text-soft);
}

/* Navigation */
.tc-sidebar-nav {
    flex: 1;
    padding: 8px 10px;
    overflow-y: auto;
}
.tc-nav-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--tc-text-soft);
    padding: 14px 8px 5px;
    display: block;
    border-top: 1px solid var(--tc-border);
}
.tc-sidebar-nav > .tc-nav-section:first-child { border-top: none; padding-top: 6px; }

.tc-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--tc-text-soft);
    font-size: 13.5px;
    font-weight: 500;
    transition: all .18s;
    margin-bottom: 2px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
}
.tc-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }
.tc-nav-item:hover { background: var(--tc-bg); color: var(--tc-text); }
.tc-nav-item.active {
    background: var(--tc-primary-light);
    color: var(--tc-primary);
    font-weight: 600;
}
.tc-nav-item.active svg { stroke: var(--tc-primary); }

.tc-nav-badge {
    margin-left: auto;
    background: var(--tc-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.tc-nav-badge-soft {
    margin-left: auto;
    background: var(--tc-bg);
    color: var(--tc-text-soft);
    font-size: 11px;
    font-weight: 600;
    min-width: 22px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}
.tc-nav-plugin-item { opacity: .85; cursor: default; }
.tc-nav-plugin-item:hover { background: none; }
.tc-nav-plugin-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.tc-nav-plugin-dot.blue   { background: var(--tc-primary); }
.tc-nav-plugin-dot.green  { background: var(--tc-green); }
.tc-nav-plugin-dot.orange { background: var(--tc-orange); }
.tc-nav-plugin-dot.purple { background: var(--tc-purple); }
.tc-nav-plugin-dot.red    { background: var(--tc-red); }
.tc-nav-plugin-empty { font-size: 12px; color: var(--tc-text-soft); opacity: .6; cursor: default; }
.tc-nav-plugin-empty:hover { background: none; }

/* Bloc utilisateur */
.tc-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--tc-border);
    background: var(--tc-bg);
}
.tc-sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tc-sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--tc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.tc-sidebar-user-role {
    font-size: 11px;
    color: var(--tc-text-soft);
}
.tc-sidebar-logout {
    margin-left: auto;
    color: var(--tc-text-soft);
    opacity: .5;
    transition: opacity .18s;
    flex-shrink: 0;
}
.tc-sidebar-logout:hover { opacity: 1; color: var(--tc-red); }

/* ── Zone contenu ── */
.tc-content {
    flex: 1;
    overflow-y: auto;
    background: var(--tc-bg);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
/* ═══════════════════════════════════════════════════════════════
   Header sticky — scoping .tc-app pour battre le CSS du thème.
   !important sur les propriétés de layout critiques.
   ═══════════════════════════════════════════════════════════════ */
.tc-app .tc-content-header {
    background: var(--tc-white) !important;
    border-bottom: 1px solid var(--tc-border) !important;
    padding: 0 24px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    gap: 0 !important;
    flex-wrap: nowrap !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    min-height: 64px !important;
    box-sizing: border-box !important;
}

/* Colonne gauche : toggle + titre */
.tc-app .tc-header-left {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
    padding: 0 20px 0 0 !important;
}
.tc-app .tc-content-header h1 {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--tc-text) !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}
.tc-app .tc-header-sub {
    font-size: 12px !important;
    color: var(--tc-text-soft) !important;
    margin-top: 2px !important;
    white-space: nowrap !important;
}

/* Séparateur vertical entre sections */
.tc-app .tc-header-sep {
    width: 1px !important;
    align-self: stretch !important;
    background: var(--tc-border) !important;
    flex-shrink: 0 !important;
    margin: 10px 0 !important;
}

/* Colonne centre : boutons plugins */
.tc-app .tc-header-plugins {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
    padding: 0 16px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    align-self: center !important;
}
.tc-app .tc-header-plugins::-webkit-scrollbar { display: none !important; }

/* Bouton plugin — reset complet puis re-style */
.tc-app .tc-plugin-shortcut {
    /* reset des surcharges thème */
    all: unset !important;
    /* layout */
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 7px !important;
    flex-shrink: 0 !important;
    /* apparence — fond coloré par défaut (variante blue) */
    padding: 7px 15px 7px 11px !important;
    border-radius: 20px !important;
    border: none !important;
    background: var(--tc-primary) !important;
    color: #fff !important;
    font-family: inherit !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: filter 0.18s ease, background 0.18s ease !important;
}
/* Hover : légèrement plus foncé */
.tc-app .tc-plugin-shortcut:hover,
.tc-app .tc-plugin-shortcut:focus {
    background: var(--tc-primary-dark) !important;
    color: #fff !important;
    outline: none !important;
    filter: none !important;
}
/* Variantes couleur — état par défaut */
.tc-app .tc-plugin-shortcut--green  { background: var(--tc-green)  !important; }
.tc-app .tc-plugin-shortcut--orange { background: var(--tc-orange) !important; }
.tc-app .tc-plugin-shortcut--purple { background: var(--tc-purple) !important; }
/* Variantes couleur — hover */
.tc-app .tc-plugin-shortcut--green:hover,
.tc-app .tc-plugin-shortcut--green:focus,
.tc-app .tc-plugin-shortcut--orange:hover,
.tc-app .tc-plugin-shortcut--orange:focus,
.tc-app .tc-plugin-shortcut--purple:hover,
.tc-app .tc-plugin-shortcut--purple:focus  { filter: brightness(0.88) !important; background: inherit !important; outline: none !important; }

/* Icone : boîte rigide 16×16 */
.tc-app .tc-plugin-shortcut-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: 16px !important;
    height: 16px !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Override du reset SVG global des thèmes : max-width:100%, height:auto */
.tc-app .tc-plugin-shortcut-icon svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0 !important;
}
.tc-app .tc-plugin-shortcut-name {
    display: block !important;
    line-height: 1 !important;
}

/* Colonne droite : actions (cloche) */
.tc-app .tc-header-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    padding: 0 0 0 20px !important;
}

/* Mobile */
@media (max-width: 768px) {
    .tc-app .tc-content-header { padding: 0 16px !important; }
    .tc-app .tc-header-left    { padding-right: 12px !important; }
    .tc-app .tc-header-sep     { display: none !important; }
    .tc-app .tc-header-plugins { padding: 0 8px !important; gap: 6px !important; }
    .tc-app .tc-plugin-shortcut { padding: 8px !important; border-radius: 50% !important; gap: 0 !important; }
    .tc-app .tc-plugin-shortcut-name { display: none !important; }
    .tc-app .tc-header-actions { padding-left: 8px !important; }
}
.tc-content-body {
    padding: 22px 24px 40px;
    flex: 1;
}

/* Bouton menu mobile */
.tc-menu-toggle {
    display: none;
    background: var(--tc-white);
    border: 1px solid var(--tc-border);
    border-radius: 8px;
    padding: 7px 9px;
    cursor: pointer;
    align-items: center;
    color: var(--tc-text);
}

/* ── Bouton cloche notif ── */
.tc-header-notif-btn {
    position: relative;
    background: none;
    border: 1.5px solid var(--tc-border);
    border-radius: 10px;
    padding: 7px 9px;
    cursor: pointer;
    color: var(--tc-text-soft);
    transition: all .18s;
}
.tc-header-notif-btn:hover { border-color: var(--tc-primary); color: var(--tc-primary); }
.tc-header-notif-dot {
    position: absolute;
    top: 5px; right: 5px;
    width: 8px; height: 8px;
    background: var(--tc-red);
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Popover notifications */
.tc-notif-popover {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: var(--tc-radius);
    box-shadow: var(--tc-shadow-md);
    border: 1px solid var(--tc-border);
    z-index: 999;
    overflow: hidden;
}
.tc-notif-popover.open { display: block; }
.tc-notif-popover-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--tc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--tc-text);
}
.tc-notif-popover-body { max-height: 340px; overflow-y: auto; }
.tc-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--tc-border);
    cursor: pointer;
    transition: background .15s;
}
.tc-notif-item:last-child { border-bottom: none; }
.tc-notif-item:hover { background: var(--tc-bg); }
.tc-notif-item.unread { background: var(--tc-primary-light); }
.tc-notif-dot-type {
    width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0;
}
.tc-notif-dot-type.info    { background: var(--tc-primary); }
.tc-notif-dot-type.success { background: var(--tc-green); }
.tc-notif-dot-type.warning { background: var(--tc-orange); }
.tc-notif-dot-type.danger  { background: var(--tc-red); }
.tc-notif-item-title { font-size: 12.5px; font-weight: 600; color: var(--tc-text); }
.tc-notif-item-meta  { font-size: 11px; color: var(--tc-text-soft); margin-top: 2px; }
.tc-notif-empty { text-align: center; padding: 24px 16px; }
.tc-notif-empty svg { opacity: .2; margin: 0 auto 8px; display: block; }
.tc-notif-empty p { font-size: 13px; color: var(--tc-text-soft); }

/* ── KPI Cards ── */
.tc-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.tc-kpi {
    background: #fff;
    border-radius: var(--tc-radius);
    padding: 14px 16px 12px;
    box-shadow: var(--tc-shadow);
    position: relative;
    overflow: hidden;
    min-height: 110px;
    transition: transform .2s, box-shadow .2s;
}
.tc-kpi:hover { transform: translateY(-2px); box-shadow: var(--tc-shadow-md); }
.tc-kpi-title {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--tc-text-soft);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}
.tc-kpi-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}
.tc-kpi-label { font-size: 11px; color: var(--tc-text-soft); }
.tc-kpi-blob {
    position: absolute;
    bottom: -4px; right: -4px;
    width: 68px; height: 44px;
    opacity: .12;
    border-radius: 50%;
}
.tc-kpi-icon {
    position: absolute;
    top: 14px; right: 14px;
    opacity: .12;
}
.tc-kpi.blue   .tc-kpi-value { color: var(--tc-primary); }
.tc-kpi.green  .tc-kpi-value { color: var(--tc-green); }
.tc-kpi.orange .tc-kpi-value { color: var(--tc-orange); }
.tc-kpi.red    .tc-kpi-value { color: var(--tc-red); }
.tc-kpi.purple .tc-kpi-value { color: var(--tc-purple); }
.tc-kpi.blue   .tc-kpi-blob  { background: radial-gradient(ellipse at bottom right, var(--tc-primary) 0%, transparent 70%); }
.tc-kpi.green  .tc-kpi-blob  { background: radial-gradient(ellipse at bottom right, var(--tc-green) 0%, transparent 70%); }
.tc-kpi.orange .tc-kpi-blob  { background: radial-gradient(ellipse at bottom right, var(--tc-orange) 0%, transparent 70%); }
.tc-kpi.red    .tc-kpi-blob  { background: radial-gradient(ellipse at bottom right, var(--tc-red) 0%, transparent 70%); }
.tc-kpi.purple .tc-kpi-blob  { background: radial-gradient(ellipse at bottom right, var(--tc-purple) 0%, transparent 70%); }
.tc-kpi.blue   .tc-kpi-icon  { color: var(--tc-primary); }
.tc-kpi.green  .tc-kpi-icon  { color: var(--tc-green); }
.tc-kpi.orange .tc-kpi-icon  { color: var(--tc-orange); }
.tc-kpi.red    .tc-kpi-icon  { color: var(--tc-red); }
.tc-kpi.purple .tc-kpi-icon  { color: var(--tc-purple); }

/* ── Grilles ── */
.tc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.tc-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }

/* ── Cards ── */
.tc-card {
    background: #fff;
    border-radius: var(--tc-radius);
    box-shadow: var(--tc-shadow);
    overflow: hidden;
}
.tc-card-head {
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--tc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.tc-card-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: var(--tc-text) !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tc-card-body { padding: 16px 18px; }
.tc-card-body.tc-p0 { padding: 0; }
.tc-card-foot {
    padding: 10px 18px;
    border-top: 1px solid var(--tc-border);
    text-align: center;
}
.tc-card-foot a {
    font-size: 13px;
    color: var(--tc-primary);
    text-decoration: none;
    font-weight: 500;
}

/* ── Boutons ── */
.tc-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    border-radius: var(--tc-radius-sm) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: none !important;
    text-decoration: none !important;
    transition: all .2s !important;
    white-space: nowrap !important;
    font-family: var(--tc-font) !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.tc-btn-primary   { background: var(--tc-primary) !important; color: #fff !important; }
.tc-btn-primary:hover { background: var(--tc-primary-dark) !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.28) !important; }
.tc-btn-secondary { background: #fff !important; color: var(--tc-text) !important; border: 1.5px solid var(--tc-border) !important; }
.tc-btn-secondary:hover { border-color: var(--tc-primary) !important; color: var(--tc-primary) !important; }
.tc-btn-success   { background: var(--tc-green) !important; color: #fff !important; }
.tc-btn-success:hover { background: #15803d !important; }
.tc-btn-danger    { background: var(--tc-red) !important; color: #fff !important; }
.tc-btn-danger:hover  { background: #b91c1c !important; }
.tc-btn-sm { padding: 4px 10px !important; font-size: 12px !important; }

/* ── Badges ── */
.tc-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.tc-badge.blue   { background: var(--tc-primary-light); color: var(--tc-primary); }
.tc-badge.green  { background: var(--tc-green-light); color: var(--tc-green); }
.tc-badge.orange { background: var(--tc-orange-light); color: var(--tc-orange); }
.tc-badge.red    { background: var(--tc-red-light); color: var(--tc-red); }
.tc-badge.purple { background: var(--tc-purple-light); color: var(--tc-purple); }

/* ── Notices ── */
.tc-notice {
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.tc-notice.success { background: var(--tc-green-light); color: #166534; border-left: 3px solid var(--tc-green); }
.tc-notice.danger  { background: var(--tc-red-light); color: #991b1b; border-left: 3px solid var(--tc-red); }
.tc-notice.info    { background: var(--tc-primary-light); color: #1e40af; border-left: 3px solid var(--tc-primary); }
.tc-notice.warning { background: var(--tc-orange-light); color: #92400e; border-left: 3px solid var(--tc-orange); }

/* ── Filtres ── */
.tc-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 13px 18px;
    background: #fff;
    border-radius: var(--tc-radius);
    box-shadow: var(--tc-shadow);
    margin-bottom: 16px;
}
.tc-search { position: relative; }
.tc-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--tc-text-soft);
    pointer-events: none;
}
.tc-input, .tc-select, .tc-textarea {
    padding: 8px 12px;
    border: 1.5px solid var(--tc-border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--tc-text);
    background: #fff;
    transition: border .2s, box-shadow .2s;
    outline: none;
    width: 100%;
    font-family: var(--tc-font);
}
.tc-input:focus, .tc-select:focus, .tc-textarea:focus {
    border-color: var(--tc-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* ── Tableau ── */
.tc-table-wrap { overflow-x: auto; }
.tc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tc-table th {
    background: var(--tc-bg);
    color: var(--tc-text-soft);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 10px 14px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--tc-border);
}
.tc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--tc-border);
    vertical-align: middle;
}
.tc-table tr:last-child td { border-bottom: none; }
.tc-table tr:hover td { background: #f8fafc; }
.tc-td-actions { display: flex; gap: 4px; }

/* ── Liste de tâches (dashboard) ── */
.tc-task-list { width: 100%; }
.tc-task-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 18px;
    border-bottom: 1px solid var(--tc-border);
    transition: background .15s;
}
.tc-task-item:last-child { border-bottom: none; }
.tc-task-item:hover { background: var(--tc-bg); }
.tc-task-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--tc-border);
    background: none;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .18s;
    color: #fff;
}
.tc-task-check:hover { border-color: var(--tc-green); }
.tc-task-check.checked { background: var(--tc-green); border-color: var(--tc-green); }
.tc-task-item-body { flex: 1; min-width: 0; }
.tc-task-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--tc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tc-task-item-title.done {
    text-decoration: line-through;
    color: var(--tc-text-soft);
    font-weight: 400;
}
.tc-task-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
}
.tc-task-due {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--tc-text-soft);
}
.tc-task-priority { flex-shrink: 0; }
.tc-task-title-cell {
    font-size: 13px;
    font-weight: 600;
    color: var(--tc-text);
}
.tc-task-title-cell.done { text-decoration: line-through; color: var(--tc-text-soft); }
.tc-task-link { color: inherit; text-decoration: none; }
.tc-task-link:hover { color: var(--tc-primary); text-decoration: underline; }
.tc-task-desc-cell { font-size: 11.5px; color: var(--tc-text-soft); margin-top: 2px; }
.tc-due-date { font-size: 12px; color: var(--tc-text-soft); }
.tc-due-date.overdue { color: var(--tc-red); font-weight: 600; }
.tc-no-date { color: var(--tc-text-soft); opacity: .4; }

/* ── Plugins connectés (barre de progression) ── */
.tc-plugin-list { display: flex; flex-direction: column; gap: 10px; }
.tc-plugin-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tc-plugin-color-bar {
    width: 4px;
    height: 36px;
    border-radius: 4px;
    flex-shrink: 0;
}
.tc-plugin-color-bar.blue   { background: var(--tc-primary); }
.tc-plugin-color-bar.green  { background: var(--tc-green); }
.tc-plugin-color-bar.orange { background: var(--tc-orange); }
.tc-plugin-color-bar.purple { background: var(--tc-purple); }
.tc-plugin-info { flex-shrink: 0; width: 120px; }
.tc-plugin-name { font-size: 12.5px; font-weight: 600; color: var(--tc-text); display: block; }
.tc-plugin-count { font-size: 11px; color: var(--tc-text-soft); }
.tc-plugin-bar-wrap {
    flex: 1;
    height: 6px;
    background: var(--tc-bg);
    border-radius: 6px;
    overflow: hidden;
}
.tc-plugin-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width .4s ease;
}
.tc-plugin-bar-fill.blue   { background: var(--tc-primary); }
.tc-plugin-bar-fill.green  { background: var(--tc-green); }
.tc-plugin-bar-fill.orange { background: var(--tc-orange); }
.tc-plugin-bar-fill.purple { background: var(--tc-purple); }

/* ── Notifications liste (dans card) ── */
.tc-notif-list { width: 100%; }
.tc-notif-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--tc-border);
}
.tc-notif-list-item:last-child { border-bottom: none; }
.tc-notif-list-item.unread { background: var(--tc-primary-light); }
.tc-notif-type-dot {
    width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0;
}
.tc-notif-type-dot.info    { background: var(--tc-primary); }
.tc-notif-type-dot.success { background: var(--tc-green); }
.tc-notif-type-dot.warning { background: var(--tc-orange); }
.tc-notif-type-dot.danger  { background: var(--tc-red); }
.tc-notif-list-title { font-size: 12.5px; font-weight: 600; color: var(--tc-text); }
.tc-notif-list-meta  { font-size: 11px; color: var(--tc-text-soft); margin-top: 2px; }

/* ── Page notifications complète ── */
.tc-notif-full-list { width: 100%; }
.tc-notif-full-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--tc-border);
    transition: background .15s;
}
.tc-notif-full-item:last-child { border-bottom: none; }
.tc-notif-full-item:hover { background: var(--tc-bg); }
.tc-notif-full-item.unread { background: var(--tc-primary-light); }
.tc-notif-full-icon {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.tc-notif-full-icon.info    { background: var(--tc-primary-light); color: var(--tc-primary); }
.tc-notif-full-icon.success { background: var(--tc-green-light); color: var(--tc-green); }
.tc-notif-full-icon.warning { background: var(--tc-orange-light); color: var(--tc-orange); }
.tc-notif-full-icon.danger  { background: var(--tc-red-light); color: var(--tc-red); }
.tc-notif-full-body { flex: 1; min-width: 0; }
.tc-notif-full-title { font-size: 13.5px; font-weight: 600; color: var(--tc-text); }
.tc-notif-full-msg   { font-size: 12.5px; color: var(--tc-text-soft); margin-top: 3px; }
.tc-notif-full-meta  {
    display: flex; align-items: center; gap: 8px;
    margin-top: 6px; font-size: 11.5px; color: var(--tc-text-soft);
}
.tc-notif-mark-read, .tc-notif-link-btn {
    background: none; border: none; cursor: pointer;
    color: var(--tc-text-soft); padding: 4px; border-radius: 6px;
    transition: all .15s; flex-shrink: 0;
}
.tc-notif-mark-read:hover { background: var(--tc-green-light); color: var(--tc-green); }
.tc-notif-link-btn:hover  { background: var(--tc-primary-light); color: var(--tc-primary); }

/* ── État vide ── */
.tc-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--tc-text-soft);
}
.tc-empty svg { opacity: .2; margin: 0 auto 12px; display: block; }
.tc-empty p   { font-size: 13.5px; margin-bottom: 14px; line-height: 1.6; }

/* ── Spinner ── */
.tc-spinner {
    display: inline-block;
    width: 24px; height: 24px;
    border: 3px solid var(--tc-border);
    border-top-color: var(--tc-primary);
    border-radius: 50%;
    animation: tcSpin .7s linear infinite;
}
@keyframes tcSpin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .tc-kpi-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .tc-grid-2, .tc-grid-3 { grid-template-columns: 1fr; }
    .tc-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .tc-app { flex-direction: column; border-radius: 12px; }
    .tc-sidebar {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--tc-border);
        display: none;
    }
    .tc-sidebar.open { display: flex; }
    .tc-menu-toggle { display: flex; }
    .tc-content-body { padding: 14px 14px 28px; }
    .tc-kpi-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .tc-kpi-row { grid-template-columns: 1fr; }
    .tc-filters { flex-direction: column; align-items: stretch; }
    .tc-filters .tc-input, .tc-filters .tc-select { width: 100% !important; }
}