/* Liste des affaires — thème cyan (réutilise .sh-* de support-hub) */

body:has(.mh-hub-page) .container,
body:has(.mh-hub-page) #content,
body:has(.mh-hub-page).has-navbar > .content,
body:has(.mh-hub-page)[data-navbar="side"].minimized #content,
body:has(.mh-hub-page)[data-navbar="side"].has-navbar > .content {
    max-width: none !important;
    width: 100%;
}

.mh-hub-page.sh-hub-page,
.mh-hub-page .sh-hub {
    --sh-accent: #0e7490;
    --sh-accent-2: #0891b2;
    --sh-accent-dark: #155e75;
    --sh-accent-soft: #ecfeff;
    --sh-accent-ring: rgba(14, 116, 144, .2);
    --sh-info: #0e7490;
    --sh-info-bg: #ecfeff;
    --sh-info-dot: #06b6d4;
}

.mh-hub-page .sh-header {
    background:
        radial-gradient(1200px 300px at 85% -60%, rgba(255, 255, 255, .14), transparent 60%),
        radial-gradient(600px 220px at 10% 140%, rgba(8, 145, 178, .4), transparent 60%),
        linear-gradient(120deg, #164e63 0%, #0e7490 45%, #0891b2 100%);
}

.mh-hub-page .sh-header .sh-header-btn {
    width: auto;
    height: auto;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    gap: 8px;
    display: inline-flex;
    align-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
}

.mh-hub-page .sh-header .sh-header-btn:hover {
    background: rgba(255, 255, 255, .24);
    color: #fff;
}

.mh-hub-page .sh-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.mh-hub-page .sh-kpi.is-on {
    outline: 2px solid var(--sh-accent);
    outline-offset: 0;
}

.mh-hub-page .sh-asof-label {
    font-size: 12px;
    color: var(--sh-muted, #64748b);
    margin-right: 6px;
    white-space: nowrap;
}

.mh-hub-page .sh-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mh-hub-page .sh-row-title {
    font-weight: 600;
    color: var(--sh-text, #0f172a);
}

.mh-hub-page .sh-row-sub {
    font-size: 12px;
    color: var(--sh-muted, #64748b);
    margin-top: 2px;
}

.mh-hub-page .sh-muted {
    color: var(--sh-muted, #64748b);
    font-size: 12px;
}

.mh-hub-page .sh-actions {
    white-space: nowrap;
}

.mh-hub-page .sh-btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    min-height: 28px;
}

.mh-hub-page .sh-dropdown {
    position: relative;
}

.mh-hub-page .sh-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 200px;
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 10px;
    padding: 6px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mh-hub-page .sh-dropdown-menu[hidden] {
    display: none !important;
}

.mh-hub-page .sh-dropdown-menu button {
    text-align: left;
    border: 0;
    background: transparent;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #0f172a;
}

.mh-hub-page .sh-dropdown-menu button:hover {
    background: #ecfeff;
}

.mh-hub-page .sh-load-more {
    padding: 14px;
    text-align: center;
}

@media (max-width: 1100px) {
    .mh-hub-page .sh-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .mh-hub-page .sh-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---- Onglets entité ---- */
.mh-hub-page .mh-tabs {
    display: flex;
    gap: 4px;
    margin: 14px 0 12px;
    border-bottom: 2px solid #e2e8f0;
    flex-wrap: wrap;
}

.mh-hub-page .mh-tab {
    border: 0;
    background: transparent;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 8px 8px 0 0;
}

.mh-hub-page .mh-tab:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.mh-hub-page .mh-tab.is-on {
    color: #0e7490;
    border-bottom-color: #0e7490;
    background: #ecfeff;
}

.mh-hub-page .mh-tab .fas {
    margin-right: 6px;
}

/* ---- Grille ---- */
.mh-hub-page .mh-table th.mh-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.mh-hub-page .mh-table th.mh-sortable:hover,
.mh-hub-page .mh-table th.is-sorted {
    color: #0e7490;
}

.mh-hub-page .mh-table th.num {
    text-align: right;
}

.mh-hub-page .mh-table td {
    white-space: nowrap;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mh-hub-page .mh-chip {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    color: #0e7490;
    background: #cffafe;
    vertical-align: middle;
}

.mh-hub-page .mh-classe {
    display: inline-block;
    min-width: 24px;
    text-align: center;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: #e2e8f0;
    color: #334155;
}

.mh-hub-page .mh-classe-a { background: #dcfce7; color: #166534; }
.mh-hub-page .mh-classe-b { background: #dbeafe; color: #1e40af; }
.mh-hub-page .mh-classe-c { background: #fef3c7; color: #92400e; }
.mh-hub-page .mh-classe-d { background: #fee2e2; color: #991b1b; }

.mh-hub-page .mh-create-btn {
    background: #fff;
    color: #0e7490;
    border-color: #fff;
}

.mh-hub-page .sh-header .mh-create-btn:hover {
    background: #ecfeff;
    color: #155e75;
}

/* ---- Cartes de statut (une par statut de l'entité) + pilotage ---- */
.mh-hub-page .mh-block-title {
    margin: 14px 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #64748b;
}

.mh-hub-page .mh-status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.mh-hub-page .mh-scard {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 14px;
    text-align: left;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #94a3b8;
    border-radius: 10px;
    cursor: pointer;
    transition: box-shadow .15s, transform .15s;
}

.mh-hub-page .mh-scard:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.mh-hub-page .mh-scard.is-on {
    box-shadow: 0 0 0 2px var(--mh-tone, #0e7490);
    background: #f8fafc;
}

.mh-hub-page .mh-scard-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--mh-tone, #0f172a);
    font-variant-numeric: tabular-nums;
}

.mh-hub-page .mh-scard-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
}

.mh-hub-page .mh-scard.tone-total { --mh-tone: #0e7490; border-left-color: #0e7490; }
.mh-hub-page .mh-scard.tone-ok { --mh-tone: #15803d; border-left-color: #16a34a; }
.mh-hub-page .mh-scard.tone-info { --mh-tone: #0369a1; border-left-color: #0ea5e9; }
.mh-hub-page .mh-scard.tone-warn { --mh-tone: #b45309; border-left-color: #f59e0b; }
.mh-hub-page .mh-scard.tone-danger { --mh-tone: #b91c1c; border-left-color: #ef4444; }
.mh-hub-page .mh-scard.tone-neutral { --mh-tone: #475569; border-left-color: #94a3b8; }

.mh-hub-page .sh-kpi.tone-ok .sh-kpi-icon { background: #dcfce7; color: #15803d; }
.mh-hub-page .sh-kpi.tone-info .sh-kpi-icon { background: #e0f2fe; color: #0369a1; }
.mh-hub-page .sh-kpi.tone-warn .sh-kpi-icon { background: #fef3c7; color: #b45309; }
.mh-hub-page .sh-kpi.tone-danger .sh-kpi-icon { background: #fee2e2; color: #b91c1c; }
