        * { margin:0; padding:0; box-sizing:border-box; }
        html { scroll-behavior: smooth; }

        /* ── ANIMATIONS ── */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(18px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @keyframes pulseGlow {
            0%, 100% { box-shadow: 0 0 8px rgba(99,102,241,0.4); }
            50% { box-shadow: 0 0 20px rgba(99,102,241,0.7), 0 0 40px rgba(99,102,241,0.3); }
        }
        @keyframes shimmer {
            0% { background-position: -200% 0; }
            100% { background-position: 200% 0; }
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        @keyframes glowPulse {
            0%, 100% { opacity: 0.6; }
            50% { opacity: 1; }
        }

        /* ── LAYOUT ── */
        #sidebar {
            position: fixed; top: 0; left: 0;
            width: 250px; height: 100vh;
            background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
            color: #1e293b;
            display: flex; flex-direction: column;
            z-index: 999;
            font-family: 'DM Sans', sans-serif;
            border-right: 1px solid #e2e8f0;
        }

        #main {
            margin-left: 250px;
            min-height: 100vh;
            background: #f8fafc;
            font-family: 'DM Sans', sans-serif;
            color: #1e293b;
        }

        /* ── SIDEBAR ── */
        .sb-header {
            padding: 28px 22px 18px;
            border-bottom: 1px solid #e2e8f0;
        }
        .sb-header h1 {
            font-family: 'Fraunces', serif;
            font-size: 1.35rem;
            color: #1e293b;
        }
        .sb-header h1 span {
            background: linear-gradient(135deg, #6366f1, #818cf8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .sb-header p {
            font-size: 0.72rem;
            color: #94a3b8;
            margin-top: 5px;
            letter-spacing: 0.03em;
        }

        .sb-nav {
            flex: 1; padding: 18px 12px;
            display: flex; flex-direction: column; gap: 4px;
        }
        .sb-btn {
            display: flex; align-items: center; gap: 10px;
            padding: 11px 14px; border-radius: 10px;
            cursor: pointer; font-size: 0.85rem; font-weight: 500;
            color: #64748b;
            border: none; background: none;
            width: 100%; text-align: left;
            font-family: 'DM Sans', sans-serif;
            transition: all 0.2s ease;
            position: relative;
        }
        .sb-btn:hover {
            background: #f1f5f9;
            color: #1e293b;
        }
        .sb-btn.active {
            background: rgba(99,102,241,0.1);
            color: #4f46e5;
            font-weight: 600;
            box-shadow: inset 0 0 0 1px rgba(99,102,241,0.2);
        }
        .sb-divider {
            height: 1px;
            background: #e2e8f0;
            margin: 8px 0;
        }

        .sb-footer {
            padding: 16px 12px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }
        .scrape-btn {
            width: 100%; padding: 12px;
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            color: #fff;
            border: none; border-radius: 10px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.85rem; font-weight: 600;
            cursor: pointer;
            transition: all 0.25s ease;
            position: relative;
            overflow: hidden;
        }
        .scrape-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 20px rgba(99,102,241,0.4);
        }
        .scrape-btn:disabled {
            opacity: 0.8; cursor: not-allowed;
            animation: pulseGlow 2s ease-in-out infinite;
            transform: none;
        }
        .scrape-info {
            font-size: 0.68rem;
            color: #94a3b8;
            text-align: center;
            margin-top: 8px;
        }

        /* ── TOPBAR ── */
        .topbar {
            padding: 14px 28px;
            background: rgba(255,255,255,0.85);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid #e2e8f0;
            display: flex; align-items: center; gap: 14px;
            position: sticky; top: 0; z-index: 50;
        }
        .search-wrap { flex: 1; max-width: 420px; position: relative; }
        .search-wrap input {
            width: 100%; padding: 10px 16px; padding-right: 64px;
            border: 1px solid #cbd5e1;
            border-radius: 12px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.85rem;
            background: #fff;
            color: #1e293b;
            outline: none;
            transition: all 0.3s ease;
        }
        .search-wrap input::placeholder { color: #94a3b8; }
        .search-wrap input:focus {
            border-color: #6366f1;
            background: #fff;
            box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
        }
        .search-clear {
            position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
            border: none; background: #e2e8f0; color: #64748b;
            width: 22px; height: 22px; border-radius: 50%;
            font-size: 0.75rem; cursor: pointer; display: none;
            align-items: center; justify-content: center; line-height: 1;
            transition: all 0.2s ease;
        }
        .search-clear:hover { background: #f43f5e; color: #fff; }
        .search-count {
            position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
            font-size: 0.7rem; color: #94a3b8;
            pointer-events: none; display: none;
        }
        .top-pills { display: flex; gap: 10px; margin-left: auto; }
        .pill {
            padding: 6px 14px; border-radius: 50px;
            font-size: 0.78rem; font-weight: 600;
            border: 1px solid transparent;
        }
        .pill-teal {
            background: #ecfdf5;
            color: #059669;
            border-color: #a7f3d0;
        }
        .pill-red {
            background: #fff1f2;
            color: #e11d48;
            border-color: #fecdd3;
        }

        /* ── CONTENT ── */
        .content { padding: 24px 28px; }

        /* ── DASHBOARD CARDS ── */
        .cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 14px; margin-bottom: 24px;
        }
        .card {
            background: #fff;
            padding: 22px;
            border-radius: 16px;
            border: 1px solid #e2e8f0;
            animation: fadeInUp 0.5s ease forwards;
            opacity: 0;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .card:hover {
            border-color: #cbd5e1;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        }
        .card:nth-child(1) { animation-delay: 0s; }
        .card:nth-child(2) { animation-delay: 0.08s; }
        .card:nth-child(3) { animation-delay: 0.16s; }
        .card:nth-child(4) { animation-delay: 0.24s; }
        .card .icon {
            font-size: 1.4rem;
            margin-bottom: 8px;
            display: inline-block;
        }
        .card .lbl {
            font-size: 0.72rem;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            font-weight: 500;
        }
        .card .val {
            font-family: 'Fraunces', serif;
            font-size: 2rem;
            font-weight: 700;
            margin-top: 6px;
            transition: color 0.3s ease;
        }
        .val-teal { color: #059669; }
        .val-red { color: #e11d48; }
        .val-indigo { color: #4f46e5; }
        .val-amber { color: #d97706; }

        /* ── CHART CARDS ── */
        .charts {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px; margin-bottom: 24px;
        }
        .chart-card {
            background: #fff;
            padding: 22px;
            border-radius: 16px;
            border: 1px solid #e2e8f0;
            animation: fadeInUp 0.5s ease forwards;
            opacity: 0;
        }
        .chart-card:nth-child(1) { animation-delay: 0.1s; }
        .chart-card:nth-child(2) { animation-delay: 0.18s; }
        .chart-card:nth-child(3) { animation-delay: 0.26s; }
        .chart-card:nth-child(4) { animation-delay: 0.34s; }
        .chart-card h3 {
            font-family: 'Fraunces', serif;
            font-size: 1rem;
            margin-bottom: 18px;
            color: #1e293b;
        }
        .bar-row {
            display: flex; align-items: center; gap: 10px;
            margin-bottom: 8px;
        }
        .bar-label {
            width: 130px;
            font-size: 0.78rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: #475569;
        }
        .bar-track {
            flex: 1; height: 8px;
            background: #e2e8f0;
            border-radius: 4px;
            overflow: hidden;
        }
        .bar-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.6s ease;
        }
        .bar-count {
            width: 36px;
            font-size: 0.72rem;
            color: #94a3b8;
            text-align: right;
            font-weight: 600;
        }

        /* ── DASHBOARD PROJETS / KANBAN ── */
        .dash-section-title {
            font-family: 'Fraunces', serif;
            font-size: 1.2rem;
            color: #1e293b;
            margin-bottom: 16px;
        }
        .dash-empty {
            text-align: center;
            color: #94a3b8;
            padding: 48px 20px;
            font-size: 0.95rem;
        }
        .proj-accordion { margin-bottom: 12px; }
        .proj-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 14px 18px;
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.92rem;
            color: #1e293b;
            transition: all 0.2s ease;
            user-select: none;
        }
        .proj-header:hover { border-color: #6366f1; box-shadow: 0 2px 8px rgba(99,102,241,0.1); }
        .proj-header .proj-arrow {
            transition: transform 0.2s ease;
            font-size: 0.7rem;
            color: #94a3b8;
        }
        .proj-header.open .proj-arrow { transform: rotate(90deg); }
        .proj-header .proj-count {
            margin-left: auto;
            font-size: 0.72rem;
            color: #64748b;
            font-weight: 500;
        }
        .proj-body {
            display: none;
            padding: 14px 0 6px;
        }
        .proj-body.open { display: block; }
        .kanban {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            padding-bottom: 6px;
        }
        .kanban-col {
            flex: 1;
            min-width: 150px;
            max-width: 220px;
            background: #f1f5f9;
            border-radius: 10px;
            padding: 10px;
        }
        .kanban-col-title {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            font-weight: 700;
            padding: 4px 8px 8px;
            border-bottom: 2px solid;
            margin-bottom: 8px;
        }
        .kanban-card {
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 10px 12px;
            margin-bottom: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
            font-size: 0.8rem;
        }
        .kanban-card:hover {
            border-color: #6366f1;
            box-shadow: 0 2px 8px rgba(99,102,241,0.12);
            transform: translateY(-1px);
        }
        .kanban-card .kc-name {
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .kanban-card .kc-meta {
            font-size: 0.7rem;
            color: #94a3b8;
            display: flex;
            justify-content: space-between;
        }
        /* ── DASHBOARD FLOWS ── */
        .dash-flows {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 28px;
        }
        .dash-flow-section {
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 14px;
            padding: 20px;
        }
        .dash-flow-section h3 {
            font-family: 'Fraunces', serif;
            font-size: 1rem;
            margin-bottom: 14px;
            color: #1e293b;
        }
        .flow-item {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 10px 12px;
            border-left: 3px solid #6366f1;
            margin-bottom: 8px;
            border-radius: 0 8px 8px 0;
            background: #f8fafc;
            font-size: 0.82rem;
            transition: opacity 0.2s;
        }
        .flow-item.past { opacity: 0.5; }
        .flow-item.done { opacity: 0.5; text-decoration: line-through; }
        .flow-item .fi-date {
            font-weight: 600;
            min-width: 80px;
            color: #475569;
            font-size: 0.75rem;
        }
        .flow-item .fi-content { flex: 1; }
        .flow-item .fi-job {
            font-size: 0.7rem;
            color: #6366f1;
            margin-top: 3px;
        }
        @media (max-width: 900px) {
            .dash-flows { grid-template-columns: 1fr; }
            .kanban { flex-direction: column; }
            .kanban-col { max-width: 100%; }
        }

        /* ── FILTERS ── */
        .filters {
            display: flex; flex-wrap: wrap;
            gap: 8px; margin-bottom: 16px;
        }
        .fsel {
            padding: 8px 30px 8px 12px;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            background: #fff;
            color: #1e293b;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.8rem;
            cursor: pointer; outline: none;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%236366f1' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 10px center;
            transition: all 0.2s ease;
        }
        .fsel option { background: #fff; color: #1e293b; }
        .fsel:focus {
            border-color: #6366f1;
            box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
        }
        .clear-btn {
            padding: 6px 14px;
            border: 1px solid #fecdd3;
            border-radius: 50px;
            font-size: 0.75rem;
            color: #e11d48;
            cursor: pointer;
            background: #fff1f2;
            font-family: 'DM Sans', sans-serif;
            transition: all 0.2s ease;
        }
        .clear-btn:hover {
            background: #ffe4e6;
            border-color: #fda4af;
        }

        /* ── FILTER CHIPS ── */
        .filter-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
        .filter-chip {
            display:inline-flex; align-items:center; gap:5px;
            padding: 4px 10px 4px 12px;
            border-radius: 50px;
            font-size: 0.73rem; font-weight: 600;
            background: #eef2ff;
            color: #4338ca;
            border: 1px solid #c7d2fe;
            cursor: default;
            animation: fadeInUp 0.2s ease;
        }
        .filter-chip .chip-x {
            background: none; border: none;
            color: #94a3b8;
            cursor: pointer; font-size: 0.8rem;
            padding: 0 2px;
            line-height: 1;
            transition: color 0.15s;
            font-family: 'DM Sans', sans-serif;
        }
        .filter-chip .chip-x:hover { color: #e11d48; }

        /* ── BULK SELECT ── */
        .job-check {
            width: 18px; height: 18px;
            accent-color: #6366f1;
            cursor: pointer;
            flex-shrink: 0;
        }
        .bulk-bar {
            position: sticky; bottom: 0; z-index: 40;
            background: rgba(255,255,255,0.95);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-top: 1px solid #c7d2fe;
            padding: 12px 20px;
            display: flex; align-items: center; gap: 12px;
            animation: fadeInUp 0.2s ease;
        }
        .bulk-bar .bulk-count {
            font-size: 0.85rem; font-weight: 600; color: #4f46e5;
        }
        .bulk-bar .fsel { font-size: 0.8rem; }
        .bulk-bar .bulk-apply {
            padding: 8px 16px;
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            color: #fff; border: none; border-radius: 10px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.82rem; font-weight: 600;
            cursor: pointer; transition: all 0.2s ease;
        }
        .bulk-bar .bulk-apply:hover {
            box-shadow: 0 4px 20px rgba(99,102,241,0.4);
            transform: translateY(-1px);
        }
        .bulk-bar .bulk-cancel {
            padding: 8px 14px; border: 1px solid #cbd5e1;
            border-radius: 10px; background: #fff;
            color: #64748b; font-family: 'DM Sans', sans-serif;
            font-size: 0.8rem; cursor: pointer; transition: all 0.2s ease;
        }
        .bulk-bar .bulk-cancel:hover { border-color: #fda4af; color: #e11d48; }

        /* ── JOBS LIST ── */
        .jobs-head {
            display: flex; justify-content: space-between;
            align-items: center; margin-bottom: 12px;
        }
        .jobs-head .cnt {
            font-size: 0.85rem;
            color: #64748b;
        }
        .jobs-head .cnt b { color: #1e293b; }
        .export-btn {
            padding: 7px 14px;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            background: #fff;
            font-size: 0.78rem;
            cursor: pointer;
            font-family: 'DM Sans', sans-serif;
            color: #475569;
            transition: all 0.2s ease;
        }
        .export-btn:hover {
            border-color: #6366f1;
            color: #4f46e5;
        }
        .export-btn.active-sort {
            background: #eef2ff;
            color: #4f46e5;
            border-color: #a5b4fc;
        }

        .job-list {
            display: flex; flex-direction: column; gap: 10px;
        }
        .job {
            background: #fff;
            border: 1px solid #e2e8f0;
            border-left: 3px solid #6366f1;
            border-radius: 14px;
            padding: 18px 20px;
            cursor: pointer;
            transition: all 0.25s ease;
            animation: fadeInUp 0.4s ease forwards;
            opacity: 0;
        }
        .job:hover {
            border-color: #cbd5e1;
            border-left-color: #4f46e5;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
            transform: translateY(-2px);
        }
        .job-title {
            font-family: 'Fraunces', serif;
            font-size: 1.05rem;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 6px;
        }
        .job-meta {
            display: flex; flex-wrap: wrap; gap: 10px;
            font-size: 0.8rem;
            color: #64748b;
            margin-bottom: 8px;
        }
        .job-tags { display: flex; flex-wrap: wrap; gap: 6px; }
        .tag {
            padding: 3px 10px;
            border-radius: 50px;
            font-size: 0.68rem;
            font-weight: 600;
            border: 1px solid transparent;
        }
        .tag-src {
            background: #eef2ff;
            color: #4338ca;
            border-color: #c7d2fe;
        }
        .tag-ctr {
            background: #ecfdf5;
            color: #047857;
            border-color: #a7f3d0;
        }
        .tag-cat {
            background: #fffbeb;
            color: #b45309;
            border-color: #fde68a;
        }
        .tag-reg {
            background: #fff1f2;
            color: #be123c;
            border-color: #fecdd3;
        }
        .job-desc {
            font-size: 0.82rem;
            color: #94a3b8;
            margin-top: 6px;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            line-height: 1.5;
        }
        .job-actions {
            display: flex; gap: 6px; margin-top: 10px;
            align-items: center;
        }
        .act-btn {
            padding: 6px 10px;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            font-size: 0.78rem;
            cursor: pointer;
            background: #fff;
            font-family: 'DM Sans', sans-serif;
            color: #1e293b;
            transition: all 0.2s ease;
        }
        .act-btn:hover {
            border-color: #6366f1;
            color: #4f46e5;
        }
        .act-btn.on {
            background: #fff1f2;
            color: #e11d48;
            border-color: #fecdd3;
        }
        .act-btn.on-teal {
            background: #ecfdf5;
            color: #059669;
            border-color: #a7f3d0;
        }
        .act-btn.on-amber {
            background: #fffbeb;
            color: #b45309;
            border-color: #fcd34d;
        }

        /* ── PAGINATION ── */
        .pag {
            display: flex; justify-content: center;
            gap: 6px; margin-top: 24px; padding-bottom: 24px;
        }
        .pg {
            padding: 8px 14px;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            background: #fff;
            font-size: 0.82rem;
            cursor: pointer;
            font-family: 'DM Sans', sans-serif;
            color: #64748b;
            transition: all 0.2s ease;
        }
        .pg:hover {
            border-color: #6366f1;
            color: #4f46e5;
        }
        .pg.on {
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            color: #fff;
            border-color: transparent;
            box-shadow: 0 2px 12px rgba(99,102,241,0.4);
        }
        .pg:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        /* ── EMPTY ── */
        .empty {
            text-align: center; padding: 60px 20px;
        }
        .empty h3 {
            font-family: 'Fraunces', serif;
            font-size: 1.15rem;
            color: #1e293b;
            margin-bottom: 8px;
        }
        .empty p {
            color: #94a3b8;
            font-size: 0.88rem;
        }

        /* ── MODAL ── */
        .modal-bg {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.3);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 1000;
            display: none;
            align-items: center;
            justify-content: center;
        }
        .modal-bg.show { display: flex; }
        .modal {
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 20px;
            width: 90%; max-width: 720px;
            max-height: 85vh;
            overflow-y: auto;
            padding: 28px;
            animation: fadeInUp 0.3s ease;
            box-shadow: 0 20px 60px rgba(0,0,0,0.15);
        }
        .modal h2 {
            font-family: 'Fraunces', serif;
            font-size: 1.35rem;
            color: #1e293b;
            margin-bottom: 14px;
        }
        .modal-close {
            float: right;
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            width: 34px; height: 34px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 1rem;
            color: #64748b;
            transition: all 0.2s ease;
        }
        .modal-close:hover {
            background: #fff1f2;
            border-color: #fecdd3;
            color: #e11d48;
        }
        .modal-meta {
            display: flex; flex-wrap: wrap; gap: 14px;
            margin-bottom: 16px;
            font-size: 0.88rem;
            color: #64748b;
        }
        .modal-meta b { color: #1e293b; }
        .modal-desc {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            padding: 22px 24px;
            border-radius: 12px;
            font-size: 0.86rem;
            line-height: 1.75;
            margin-bottom: 16px;
            color: #475569;
            max-height: 500px;
            overflow-y: auto;
        }
        .modal-desc::-webkit-scrollbar { width: 5px; }
        .modal-desc::-webkit-scrollbar-track { background: transparent; }
        .modal-desc::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
        .modal-desc .desc-section {
            font-weight: 600;
            color: #4338ca;
            margin-top: 16px;
            margin-bottom: 6px;
            font-size: 0.83rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            border-bottom: 1px solid #e0e7ff;
            padding-bottom: 4px;
        }
        .modal-desc .desc-section:first-child { margin-top: 0; }
        .modal-desc ul {
            margin: 8px 0; padding-left: 6px;
            list-style: none;
        }
        .modal-desc ul li {
            position: relative; padding-left: 16px; margin-bottom: 5px;
            color: #475569;
        }
        .modal-desc ul li::before {
            content: '›'; position: absolute; left: 0;
            color: #6366f1; font-weight: 700; font-size: 1rem;
        }
        .modal-desc p {
            margin: 6px 0;
            text-align: justify;
        }
        .modal-desc p:first-child { margin-top: 0; }
        .modal-btns {
            display: flex; flex-wrap: wrap;
            gap: 8px; margin-bottom: 16px;
        }
        .mbtn {
            padding: 10px 18px;
            border-radius: 10px;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.83rem; font-weight: 600;
            cursor: pointer;
            border: 1px solid #cbd5e1;
            background: #fff;
            color: #475569;
            text-decoration: none;
            transition: all 0.2s ease;
        }
        .mbtn:hover {
            border-color: #6366f1;
            color: #4f46e5;
        }
        .mbtn-primary {
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            color: #fff;
            border-color: transparent;
        }
        .mbtn-primary:hover {
            box-shadow: 0 4px 20px rgba(99,102,241,0.4);
            transform: translateY(-1px);
        }
        .modal-contact {
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            padding: 16px;
            border-radius: 12px;
            margin-bottom: 16px;
            font-size: 0.88rem;
            color: #475569;
            line-height: 1.7;
        }
        .modal-contact b { color: #4338ca; }
        .modal-contact span { color: #334155; }
        .modal-contact a { color: #4f46e5; text-decoration: none; }
        .modal-contact a:hover { text-decoration: underline; }
        .modal-notes textarea {
            width: 100%; padding: 12px;
            border: 1px solid #cbd5e1;
            border-radius: 12px;
            background: #fff;
            color: #1e293b;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.83rem;
            resize: vertical;
            min-height: 70px;
            outline: none;
            transition: border-color 0.2s ease;
        }
        .modal-notes textarea::placeholder { color: #94a3b8; }
        .modal-notes textarea:focus {
            border-color: #6366f1;
            box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
        }
        .modal-notes label {
            display: block;
            font-size: 0.76rem;
            color: #64748b;
            margin-bottom: 6px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        /* scrollbar */
        .modal::-webkit-scrollbar { width: 6px; }
        .modal::-webkit-scrollbar-track { background: transparent; }
        .modal::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

        /* ── LOGS TABLE ── */
        .logs-tbl { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
        .logs-tbl th {
            text-align: left; padding: 10px 14px;
            font-size: 0.7rem; text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #94a3b8;
            border-bottom: 1px solid #e2e8f0;
        }
        .logs-tbl td {
            padding: 10px 14px;
            border-bottom: 1px solid #f1f5f9;
            color: #475569;
        }
        .logs-tbl td b { color: #1e293b; }
        .logs-tbl tr:hover td { background: #f8fafc; }

        /* ── SPINNER ── */
        .spinner {
            width: 16px; height: 16px;
            border: 2px solid #e2e8f0;
            border-top-color: #6366f1;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
            display: inline-block;
            vertical-align: middle;
        }

        /* ── MARK / HIGHLIGHT ── */
        mark {
            background: #eef2ff;
            color: #4338ca;
            padding: 1px 3px;
            border-radius: 3px;
        }

        .hidden { display: none !important; }

        /* ── VIEW TRANSITION ── */
        .view-enter {
            animation: fadeInUp 0.35s ease forwards;
        }

        /* section headings in favs/apps */
        .section-title {
            font-family: 'Fraunces', serif;
            color: #1e293b;
            margin-bottom: 14px;
            font-size: 1.1rem;
        }

        /* ── PIPELINE BADGES ── */
        .pip-nouveau { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
        .pip-rappel { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; }
        .pip-rappel::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c2410c; margin-right: 5px; vertical-align: middle; animation: glowPulse 2s ease-in-out infinite; }
        .pip-rdv { background: #f5f3ff; color: #7c3aed; border: 1px solid #c4b5fd; }
        .pip-rdv::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #7c3aed; margin-right: 5px; vertical-align: middle; animation: glowPulse 2s ease-in-out infinite; }
        .pip-proposition { background: #ede9fe; color: #6d28d9; border: 1px solid #c4b5fd; }
        .pip-echeance { background: #cffafe; color: #0e7490; border: 1px solid #67e8f9; }
        .pip-gagne { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
        .pip-perdu { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
        .pip-badge {
            display: inline-block; padding: 2px 10px; border-radius: 50px;
            font-size: 0.7rem; font-weight: 600;
        }
        .pipeline-sel {
            padding: 6px 28px 6px 10px; border: 1px solid #cbd5e1; border-radius: 10px;
            background: #fff; font-family: 'DM Sans', sans-serif; font-size: 0.78rem;
            cursor: pointer; outline: none; appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%236366f1' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 8px center;
            transition: all 0.2s ease;
        }
        .pipeline-sel:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.15); }

        /* ── PROJET BADGES ── */
        .projet-badge {
            display: inline-flex; align-items: center; gap: 3px;
            padding: 2px 8px; border-radius: 50px;
            font-size: 0.65rem; font-weight: 600;
            background: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc;
            margin: 1px 2px;
        }
        .projet-badge .pj-x {
            cursor: pointer; font-size: 0.6rem; opacity: 0.5;
            margin-left: 2px; line-height: 1;
        }
        .projet-badge .pj-x:hover { opacity: 1; color: #e11d48; }
        .projet-multi {
            display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px;
        }
        .projet-tag {
            display: inline-block; padding: 3px 10px; border-radius: 50px;
            font-size: 0.72rem; font-weight: 500; cursor: pointer;
            border: 1px solid #cbd5e1; background: #f8fafc; color: #475569;
            transition: all 0.15s ease; user-select: none;
        }
        .projet-tag:hover { background: #e0f2fe; border-color: #7dd3fc; }
        .projet-tag.active {
            background: #0ea5e9; color: #fff; border-color: #0284c7;
        }

        /* ── ESTABLISHMENT CARDS ── */
        .estab-card {
            background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #6366f1;
            border-radius: 14px; padding: 18px 20px; margin-bottom: 10px;
            transition: all 0.25s ease; animation: fadeInUp 0.4s ease forwards; opacity: 0;
        }
        .estab-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transform: translateY(-2px); }
        .estab-header { display: flex; align-items: center; gap: 14px; cursor: pointer; }
        .estab-name { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 600; color: #1e293b; flex: 1; }
        .estab-stats { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: #64748b; margin-top: 6px; }
        .estab-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
        .estab-contact { font-size: 0.8rem; color: #475569; margin-top: 6px; }
        .estab-contact a { color: #4f46e5; text-decoration: none; }
        .estab-contact a:hover { text-decoration: underline; }
        .estab-expand {
            margin-top: 12px; padding-top: 12px; border-top: 1px solid #f1f5f9;
            display: none;
            margin-left: 48px;
            border-left: 3px solid #e0e7ff;
            padding-left: 16px;
        }
        .estab-expand.open { display: block; }
        .estab-expand .job { border-left-width: 2px; padding: 12px 16px; margin-bottom: 6px; }

        /* ── ESTABLISHMENT NOTES ── */
        .estab-notes { padding: 0 20px; }
        .modal-notes-ta {
            width: 100%; padding: 12px;
            border: 1px solid #cbd5e1;
            border-radius: 12px;
            background: #fff;
            color: #1e293b;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.83rem;
            resize: vertical;
            min-height: 70px;
            outline: none;
            transition: border-color 0.2s ease;
        }
        .modal-notes-ta::placeholder { color: #94a3b8; }
        .modal-notes-ta:focus {
            border-color: #6366f1;
            box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
        }

        /* ── PIPELINE FUNNEL ── */
        .funnel { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
        .funnel-step {
            flex: 1; min-width: 120px; padding: 14px 16px; border-radius: 12px;
            text-align: center; cursor: pointer; transition: all 0.25s ease;
            border: 2px solid transparent; position: relative;
        }
        .funnel-step:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
        .funnel-step.active { border-color: #1e293b; }
        .funnel-step .f-count { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 700; }
        .funnel-step .f-label { font-size: 0.72rem; font-weight: 600; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
        .funnel-step .f-companies { font-size: 0.68rem; margin-top: 4px; opacity: 0.7; }

        /* ── LOGIN PAGE ── */
        #login-page {
            position: fixed; inset: 0; z-index: 9999;
            background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
            display: flex; align-items: center; justify-content: center;
            font-family: 'DM Sans', sans-serif;
        }
        .login-box {
            background: #fff; border-radius: 20px; padding: 48px 40px;
            width: 90%; max-width: 400px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: fadeInUp 0.4s ease;
        }
        .login-box h1 {
            font-family: 'Fraunces', serif; font-size: 1.8rem;
            text-align: center; margin-bottom: 6px; color: #1e293b;
        }
        .login-box h1 span {
            background: linear-gradient(135deg, #6366f1, #818cf8);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
        }
        .login-box .login-sub {
            text-align: center; font-size: 0.82rem; color: #94a3b8; margin-bottom: 28px;
        }
        .login-field { margin-bottom: 16px; }
        .login-field label {
            display: block; font-size: 0.76rem; color: #64748b; font-weight: 600;
            text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
        }
        .login-field input {
            width: 100%; padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: 12px;
            font-family: 'DM Sans', sans-serif; font-size: 0.9rem; color: #1e293b;
            outline: none; transition: all 0.2s ease;
        }
        .login-field input:focus {
            border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
        }
        .login-btn {
            width: 100%; padding: 14px; margin-top: 8px;
            background: linear-gradient(135deg, #6366f1, #4f46e5);
            color: #fff; border: none; border-radius: 12px;
            font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600;
            cursor: pointer; transition: all 0.25s ease;
        }
        .login-btn:hover { box-shadow: 0 4px 20px rgba(99,102,241,0.4); transform: translateY(-1px); }
        .login-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
        .login-error {
            background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3;
            border-radius: 10px; padding: 10px 14px; font-size: 0.82rem;
            margin-bottom: 14px; display: none;
        }

        /* ── USER IN SIDEBAR ── */
        .sb-user {
            padding: 12px 14px; border-top: 1px solid #e2e8f0;
            display: flex; align-items: center; gap: 10px;
        }
        .sb-user-avatar {
            width: 32px; height: 32px; border-radius: 8px;
            background: rgba(99,102,241,0.1); color: #4f46e5;
            display: flex; align-items: center; justify-content: center;
            font-weight: 700; font-size: 0.85rem;
        }
        .sb-user-info { flex: 1; overflow: hidden; }
        .sb-user-name { font-size: 0.82rem; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .sb-user-role { font-size: 0.68rem; color: #94a3b8; }
        .sb-logout {
            background: none; border: 1px solid #e2e8f0; color: #94a3b8;
            padding: 5px 10px; border-radius: 8px; font-size: 0.72rem; cursor: pointer;
            font-family: 'DM Sans', sans-serif; transition: all 0.2s ease;
        }
        .sb-logout:hover { border-color: #fecdd3; color: #e11d48; }

        /* ── ADMIN VIEW ── */
        .admin-section {
            background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
            padding: 22px; margin-bottom: 16px;
        }
        .admin-section h3 {
            font-family: 'Fraunces', serif; font-size: 1.05rem; color: #1e293b; margin-bottom: 14px;
        }
        .admin-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
        .admin-table th {
            text-align: left; padding: 10px 14px; font-size: 0.7rem;
            text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8;
            border-bottom: 1px solid #e2e8f0;
        }
        .admin-table td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; color: #475569; }
        .admin-table tr:hover td { background: #f8fafc; }
        .admin-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
        .admin-form input, .admin-form select {
            padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 10px;
            font-family: 'DM Sans', sans-serif; font-size: 0.85rem; outline: none;
        }
        .admin-form input:focus, .admin-form select:focus { border-color: #6366f1; }
        .admin-form button {
            padding: 10px 20px; background: linear-gradient(135deg, #6366f1, #4f46e5);
            color: #fff; border: none; border-radius: 10px; font-family: 'DM Sans', sans-serif;
            font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
        }
        .admin-form button:hover { box-shadow: 0 4px 20px rgba(99,102,241,0.4); }
        .admin-del {
            background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3;
            padding: 5px 12px; border-radius: 8px; font-size: 0.75rem;
            cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.2s ease;
        }
        .admin-del:hover { background: #ffe4e6; }
        .admin-action {
            background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe;
            padding: 5px 12px; border-radius: 8px; font-size: 0.75rem;
            cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.2s ease;
        }
        .admin-action:hover { background: #dbeafe; }

        /* ── RESPONSIVE ── */
        @media(max-width: 768px) {
            #sidebar { width: 200px; }
            #main { margin-left: 200px; }
            .charts { grid-template-columns: 1fr; }
            .cards { grid-template-columns: 1fr 1fr; }
            .funnel { flex-direction: column; }
        }

        /* ── EVENTS / CALENDAR ── */
        .event-date-input, .event-time-input {
            font-size: 0.72rem; padding: 2px 6px;
            border: 1px solid #cbd5e1; border-radius: 6px;
            background: #fffbeb;
            font-family: 'DM Sans', sans-serif;
            cursor: pointer; outline: none;
            transition: border-color 0.2s;
        }
        .event-date-input:focus, .event-time-input:focus {
            border-color: #6366f1;
        }
        .evt-quick {
            display: inline-flex; align-items: center; gap: 4px;
            padding: 3px 6px;
            background: #fffbeb; border: 1px solid #fde68a;
            border-radius: 8px;
        }
        .evt-ok-btn {
            padding: 2px 8px; border: none; border-radius: 5px;
            background: #d97706; color: #fff;
            font-family: 'DM Sans', sans-serif;
            font-size: 0.7rem; font-weight: 600;
            cursor: pointer; transition: background 0.2s;
        }
        .evt-ok-btn:hover { background: #b45309; }
        .evt-badge {
            display: inline-flex; align-items: center; gap: 3px;
            font-size: 0.68rem; color: #d97706; font-weight: 600;
        }
        .event-day-group { margin-bottom: 20px; }
        .event-day-title {
            font-family: 'Fraunces', serif;
            font-size: 1rem; font-weight: 600;
            color: #1e293b; margin-bottom: 8px;
            padding-bottom: 6px;
            border-bottom: 2px solid #e2e8f0;
        }
        .event-item {
            display: flex; align-items: center; gap: 12px;
            padding: 10px 14px; margin-bottom: 4px;
            background: #fff; border-radius: 10px;
            border: 1px solid #e2e8f0;
            cursor: pointer; transition: all 0.2s;
        }
        .event-item:hover {
            border-color: #6366f1;
            box-shadow: 0 2px 8px rgba(99,102,241,0.1);
        }
        .event-time-label {
            font-size: 0.85rem; font-weight: 700;
            color: #4f46e5; min-width: 50px;
        }
        .event-info { flex: 1; }
        .event-info .evt-title { font-size: 0.85rem; font-weight: 600; color: #1e293b; }
        .event-info .evt-meta { font-size: 0.75rem; color: #64748b; }
        .event-actions { display: flex; gap: 6px; }
        .event-actions button {
            background: none; border: 1px solid #e2e8f0; border-radius: 6px;
            padding: 4px 8px; font-size: 0.72rem; cursor: pointer;
            font-family: 'DM Sans', sans-serif;
            color: #64748b; transition: all 0.2s;
        }
        .event-actions button:hover { border-color: #6366f1; color: #4f46e5; }
        .event-actions button.del:hover { border-color: #e11d48; color: #e11d48; }

        /* ── TASKS ── */
        .task-form {
            display: grid;
            grid-template-columns: 2fr 1fr 100px 1fr auto;
            gap: 10px;
            margin-bottom: 20px;
            align-items: end;
        }
        @media (max-width: 900px) {
            .task-form { grid-template-columns: 1fr 1fr; }
        }
        .task-form .tf-group { display: flex; flex-direction: column; gap: 3px; }
        .task-form .tf-group label { font-size: 0.7rem; color: #64748b; font-weight: 600; }
        .task-form .tf-group input, .task-form .tf-group select, .task-form .tf-group textarea {
            padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
            font-size: 0.82rem; font-family: 'DM Sans', sans-serif; background: #fff;
            width: 100%; box-sizing: border-box;
        }
        .task-form .tf-group input:focus, .task-form .tf-group select:focus, .task-form .tf-group textarea:focus {
            outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
        }
        .task-form button.tf-submit {
            padding: 8px 18px; border: none; border-radius: 8px;
            background: #4f46e5; color: #fff; font-weight: 600;
            font-family: 'DM Sans', sans-serif; cursor: pointer; font-size: 0.82rem;
            transition: background 0.2s; white-space: nowrap; height: 36px;
        }
        .task-form button.tf-submit:hover { background: #4338ca; }
        .task-item {
            display: flex; align-items: flex-start; gap: 10px;
            padding: 10px 14px; margin-bottom: 4px;
            border: 1px solid #e2e8f0; border-radius: 8px;
            background: #fff; transition: all 0.2s; cursor: pointer;
        }
        .task-item:hover { border-color: #6366f1; box-shadow: 0 2px 8px rgba(99,102,241,0.1); }
        .task-item.done { opacity: 0.55; }
        .task-item.done .task-title { text-decoration: line-through; }
        .task-item.expanded { border-color: #818cf8; background: #faf5ff; }
        .task-check { margin-top: 3px; cursor: pointer; width: 18px; height: 18px; accent-color: #4f46e5; }
        .task-title { font-size: 0.85rem; font-weight: 600; color: #1e293b; }
        .task-meta { font-size: 0.72rem; color: #64748b; margin-top: 2px; }
        .task-badge { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 0.68rem; font-weight: 600; background: #dbeafe; color: #1e40af; }
        .task-badge-pj { background: #fef3c7; color: #92400e; }
        .task-detail {
            margin-top: 8px; padding: 12px; background: #f8fafc;
            border-radius: 8px; border: 1px solid #e2e8f0;
        }
        .task-detail textarea {
            width: 100%; min-height: 60px; padding: 8px; border: 1px solid #cbd5e1;
            border-radius: 6px; font-size: 0.82rem; font-family: 'DM Sans', sans-serif; resize: vertical;
        }
        .task-detail textarea:focus { outline: none; border-color: #6366f1; }
        .task-attachments { margin-top: 10px; }
        .task-att-item {
            display: flex; align-items: center; gap: 8px; padding: 5px 8px;
            background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 4px;
            font-size: 0.78rem;
        }
        .task-att-item a { color: #4f46e5; text-decoration: none; font-weight: 500; }
        .task-att-item a:hover { text-decoration: underline; }
        .task-att-item .att-size { color: #94a3b8; font-size: 0.68rem; }
        .task-att-item button {
            margin-left: auto; background: none; border: 1px solid #e2e8f0;
            border-radius: 4px; padding: 2px 6px; font-size: 0.68rem;
            cursor: pointer; color: #94a3b8;
        }
        .task-att-item button:hover { border-color: #e11d48; color: #e11d48; }
        .task-upload-zone {
            margin-top: 8px; padding: 10px; border: 2px dashed #cbd5e1; border-radius: 8px;
            text-align: center; font-size: 0.78rem; color: #94a3b8; cursor: pointer;
            transition: all 0.2s;
        }
        .task-upload-zone:hover { border-color: #6366f1; color: #6366f1; }
        .cal-add-btn {
            font-size: 0.75rem; font-weight: 700; color: #94a3b8; cursor: pointer;
            width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
            border-radius: 4px; transition: all 0.15s; line-height: 1;
        }
        .cal-add-btn:hover { background: #4f46e5; color: #fff; }
        .cal-cell { cursor: pointer; }
        .week-slot { cursor: pointer; }
        .cal-event.task-event { background: #dcfce7; color: #166534; }
        .cal-event.task-event:hover { background: #bbf7d0; }
        .week-event.task-event { background: #dcfce7; color: #166534; }
        .week-event.task-event:hover { background: #bbf7d0; }

        .cal-nav {
            display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
        }
        .cal-nav button {
            padding: 6px 14px; border: 1px solid #cbd5e1; border-radius: 8px;
            background: #fff; cursor: pointer; font-family: 'DM Sans', sans-serif;
            font-size: 0.82rem; color: #475569; transition: all 0.2s;
        }
        .cal-nav button:hover { border-color: #6366f1; color: #4f46e5; }
        .cal-nav button.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }
        .cal-nav .cal-title {
            font-family: 'Fraunces', serif;
            font-size: 1.1rem; font-weight: 600; color: #1e293b;
        }
        .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: #e2e8f0; border-radius: 12px; overflow: hidden; }
        .cal-hdr { padding: 8px; text-align: center; font-size: 0.75rem; font-weight: 600; color: #64748b; background: #f8fafc; }
        .cal-cell {
            min-height: 90px; padding: 4px 6px;
            background: #fff;
            font-size: 0.78rem;
            vertical-align: top;
        }
        .cal-cell.other-month { background: #f8fafc; color: #cbd5e1; }
        .cal-cell.today { background: #eef2ff; }
        .cal-day-num { font-weight: 600; margin-bottom: 4px; font-size: 0.78rem; }
        .cal-event {
            font-size: 0.68rem; padding: 2px 6px; border-radius: 4px;
            background: #dbeafe; color: #1e40af;
            margin-bottom: 2px; cursor: pointer;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            transition: background 0.15s;
        }
        .cal-event:hover { background: #bfdbfe; }
        .week-grid { display: grid; grid-template-columns: 60px repeat(7, 1fr); gap: 1px; background: #e2e8f0; border-radius: 12px; overflow: hidden; }
        .week-hdr { padding: 8px 4px; text-align: center; font-size: 0.72rem; font-weight: 600; color: #64748b; background: #f8fafc; }
        .week-time { padding: 4px 6px; font-size: 0.68rem; color: #94a3b8; background: #f8fafc; text-align: right; height: 40px; display: flex; align-items: flex-start; justify-content: flex-end; }
        .week-slot {
            height: 40px; border-bottom: 1px solid #f1f5f9;
            background: #fff; padding: 1px 2px; position: relative;
        }
        .week-slot.today-col { background: #faf5ff; }
        .week-event {
            font-size: 0.65rem; padding: 1px 4px; border-radius: 3px;
            background: #dbeafe; color: #1e40af;
            cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            position: absolute; left: 1px; right: 1px;
        }
        .week-event:hover { background: #bfdbfe; }

        /* === Annuaire Santé (ANS) === */
        .ans-panel {
            background: #f0f9ff; border: 1.5px solid #bae6fd; border-radius: 14px;
            padding: 14px 18px; margin-top: 12px;
        }
        .ans-header {
            display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
        }
        .ans-header h4 {
            font-family: 'Fraunces', serif; font-size: 0.95rem; font-weight: 600;
            color: #0369a1; margin: 0;
        }
        .ans-finess {
            font-size: 0.72rem; color: #64748b; background: #e0f2fe;
            padding: 2px 8px; border-radius: 6px; font-family: monospace;
        }
        .ans-details {
            display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px;
            font-size: 0.82rem; color: #334155; margin-bottom: 10px;
        }
        .ans-details span { display: flex; align-items: center; gap: 4px; }
        .ans-contacts { margin-top: 10px; }
        .ans-contacts-title {
            font-size: 0.82rem; font-weight: 600; color: #0369a1;
            margin-bottom: 6px; display: flex; align-items: center; gap: 8px;
        }
        .ans-contact-row {
            display: flex; align-items: center; gap: 10px;
            padding: 5px 10px; border-radius: 8px;
            font-size: 0.78rem; color: #334155;
            transition: background 0.15s;
        }
        .ans-contact-row:hover { background: #e0f2fe; }
        .ans-contact-row .name { font-weight: 600; min-width: 160px; }
        .ans-contact-row .spec { color: #0369a1; font-size: 0.72rem; }
        .ans-contact-row .rpps { color: #94a3b8; font-size: 0.68rem; font-family: monospace; }
        .ans-link-btn {
            padding: 5px 14px; border-radius: 8px; font-size: 0.78rem; font-weight: 600;
            border: 1.5px solid #0369a1; background: #fff; color: #0369a1;
            cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s;
        }
        .ans-link-btn:hover { background: #0369a1; color: #fff; }
        .ans-sync-btn {
            padding: 4px 12px; border-radius: 8px; font-size: 0.72rem; font-weight: 600;
            border: 1px solid #bae6fd; background: #e0f2fe; color: #0369a1;
            cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s;
        }
        .ans-sync-btn:hover { background: #bae6fd; }
        .tag-spec {
            display: inline-block; padding: 2px 8px; border-radius: 6px;
            font-size: 0.68rem; font-weight: 600;
            background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe;
        }
        .ans-search-results {
            max-height: 300px; overflow-y: auto; margin-top: 10px;
        }
        .ans-search-item {
            padding: 8px 12px; border-radius: 10px; cursor: pointer;
            border: 1.5px solid #e2e8f0; margin-bottom: 6px;
            transition: all 0.15s; font-size: 0.82rem;
        }
        .ans-search-item:hover { border-color: #0369a1; background: #f0f9ff; }
        .ans-search-item .name { font-weight: 600; color: #0f172a; }
        .ans-search-item .info { font-size: 0.72rem; color: #64748b; margin-top: 2px; }

        /* Annuaire Santé standalone page */
        #v-ans .ans-estab-card { border-left-color: #0ea5e9; border-radius: 14px; border-width: 1px; border-left-width: 4px; }
        #v-ans .ans-estab-card:hover { border-left-color: #0284c7; }
