/* Hygio Gest — panel d'administration de la plateforme (V4) */
:root {
    --gest-navy: #0f2342;
    --gest-navy-2: #16305a;
    --gest-active: #f6ecd6;
    --gest-bg: #f5f7fb;
    --gest-border: #e6eaf2;
    --gest-text: #1b2b45;
    --gest-muted: #6b7a90;
    --gest-blue: #1f6feb;
}
html, body { background: var(--gest-bg); color: var(--gest-text); font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; }
.gest-layout { display: flex; min-height: 100vh; }
.gest-sidebar { width: 260px; flex-shrink: 0; background: var(--gest-navy); color: #e8eef9; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.gest-brand { display: flex; align-items: center; gap: .6rem; padding: 1.4rem 1.5rem; font-size: 1.3rem; font-weight: 700; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); text-decoration: none; }
.gest-brand .logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg,#29b6f6,#1f6feb); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 1rem; }
.gest-nav { list-style: none; padding: 1rem .75rem; margin: 0; flex: 1; overflow-y: auto; }
.gest-nav a { display: flex; align-items: center; gap: .85rem; padding: .7rem .9rem; margin-bottom: .2rem; border-radius: 10px; color: #dbe4f3; text-decoration: none; font-weight: 500; }
.gest-nav a i { font-size: 1.15rem; width: 1.3rem; text-align: center; }
.gest-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.gest-nav a.active { background: var(--gest-active); color: var(--gest-navy); font-weight: 600; }
.gest-nav .badge { margin-left: auto; }
.gest-user { border-top: 1px solid rgba(255,255,255,.08); padding: 1rem 1.25rem; display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.gest-avatar { width: 40px; height: 40px; border-radius: 50%; background: #2b4470; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.gest-user small { color: #9fb1cf; display: block; }
.gest-main { flex: 1; min-width: 0; padding: 1.75rem 2rem 3rem; }
.gest-topbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.gest-title h1 { font-size: 1.85rem; font-weight: 700; margin: 0; color: var(--gest-navy); }
.gest-title p { color: #4a6a9c; margin: .25rem 0 0; }
.gest-search { min-width: 320px; }
.gest-search .form-control { border-radius: 8px; border-color: var(--gest-border); padding-left: 2.2rem; }
.gest-search .bi { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--gest-muted); }
.gest-card { background: #fff; border: 1px solid var(--gest-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,35,66,.04); }
.gest-card > .gest-card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--gest-border); display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.gest-card > .gest-card-header h2 { font-size: 1.05rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: .5rem; }
.gest-card > .gest-card-body { padding: 1.25rem; }
.kpi { display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem; height: 100%; }
.kpi-icon { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.kpi-icon.blue { background: #e7f0ff; color: #1f6feb; }
.kpi-icon.violet { background: #f0eafe; color: #7c4dff; }
.kpi-icon.red { background: #fde9ea; color: #e5484d; }
.kpi-icon.green { background: #e5f7ed; color: #1f9d55; }
.kpi-icon.amber { background: #fff4e0; color: #d98a00; }
.kpi-icon.gray { background: #eef1f6; color: #5b6b82; }
.kpi-label { font-weight: 600; font-size: .9rem; }
.kpi-value { font-size: 1.8rem; font-weight: 700; line-height: 1.2; margin: .15rem 0; }
.kpi-trend { font-size: .82rem; }
.kpi-trend.up { color: #1f9d55; } .kpi-trend.down { color: #e5484d; } .kpi-trend.neutral { color: var(--gest-muted); }
.gest-table { width: 100%; margin: 0; }
.gest-table th { font-size: .82rem; color: #3d4e67; font-weight: 600; padding: .8rem 1rem; border-bottom: 1px solid var(--gest-border); background: #fbfcfe; white-space: nowrap; }
.gest-table td { padding: .85rem 1rem; border-bottom: 1px solid #f0f2f7; vertical-align: middle; font-size: .92rem; }
.gest-table tr:last-child td { border-bottom: 0; }
.gest-table tr.clickable:hover td { background: #f8faff; cursor: pointer; }
.initials { width: 34px; height: 34px; border-radius: 50%; background: #eef2f8; color: #33476a; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; margin-right: .6rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.green { background: #e5f7ed; color: #1f9d55; } .pill.amber { background: #fff4e0; color: #c47c00; } .pill.red { background: #fde9ea; color: #d33a3f; }
.pill.blue { background: #e7f0ff; color: #1f6feb; } .pill.gray { background: #eef1f6; color: #5b6b82; } .pill.violet { background: #f0eafe; color: #6d3fe0; }
.pill.no-dot::before { display: none; }
.plan-badge { padding: .25rem .65rem; border-radius: 8px; font-size: .8rem; font-weight: 600; }
.plan-badge.pro { background: #e7f0ff; color: #1f6feb; } .plan-badge.essentiel { background: #f5e8fb; color: #a234c9; }
.gest-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--gest-border); padding: 0 1rem; overflow-x: auto; }
.gest-tabs a { padding: .9rem 1rem; color: #3d4e67; text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: .45rem; }
.gest-tabs a.active { color: var(--gest-blue); border-bottom-color: var(--gest-blue); font-weight: 600; }
.btn-primary { background: var(--gest-blue); border-color: var(--gest-blue); }
.text-muted-2 { color: var(--gest-muted) !important; }
.service-row { display: flex; align-items: center; justify-content: space-between; padding: .65rem 0; border-bottom: 1px solid #f0f2f7; }
.service-row:last-child { border-bottom: 0; }
.msg { border: 1px solid var(--gest-border); border-radius: 10px; padding: .75rem 1rem; margin-bottom: .75rem; background: #fff; }
.msg.admin { background: #f4f8ff; border-color: #d6e4ff; }
.msg.internal { background: #fff8e6; border-color: #f5dca0; }
.msg .meta { font-size: .8rem; color: var(--gest-muted); margin-bottom: .3rem; }
.gest-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gest-navy); }
.gest-login .card { width: 420px; border-radius: 14px; border: 0; }
@media (max-width: 992px) {
    .gest-layout { flex-direction: column; }
    .gest-sidebar { width: 100%; height: auto; position: static; }
    .gest-nav { display: flex; flex-wrap: wrap; gap: .25rem; }
    .gest-main { padding: 1rem; }
    .gest-search { min-width: 0; width: 100%; }
}
