        :root {
            --primary-dark: #0a1628;
            --primary-cyan: #00d4ff;
            --primary-orange: #ff6b00;
            --secondary-gray: #6b7280;
            --light-gray: #f3f4f6;
            --white: #ffffff;
            --success: #10b981;
            --error: #ef4444;
            --warning: #f59e0b;
            --info: #3b82f6;
            --card-shadow: 0 2px 10px rgba(0,0,0,0.05);
            --header-gradient: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-cyan) 50%, var(--primary-orange) 100%);
        }

        body.dark-mode {
            --primary-dark: #e5e7eb;
            --secondary-gray: #9ca3af;
            --light-gray: #111827;
            --white: #1f2937;
            --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            --header-gradient: linear-gradient(135deg, #1f2937 0%, var(--primary-cyan) 50%, var(--primary-orange) 100%);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background-color: var(--light-gray);
            color: var(--primary-dark);
            line-height: 1.6;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 20px 20px;
        }

        .sticky-header-group {
            position: -webkit-sticky;
            position: sticky;
            top: 0;
            z-index: 1000;
            background-color: var(--light-gray);
            padding-top: 20px;
        }

        .header {
            background: var(--header-gradient);
            color: var(--white);
            padding: 2rem;
            border-radius: 12px;
            margin-bottom: 1rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1.5rem;
        }
        body.dark-mode .header {
            color: #ffffff;
        }


        .header h1 {
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .header p {
            font-size: 1.1rem;
            opacity: 0.9;
        }

        #header-logo-container img {
            max-height: 100px;
            max-width: 300px;
            object-fit: contain;
            border-radius: 6px;
            background-color: rgba(255, 255, 255, 0.1);
            padding: 5px;
        }

        #client-logo-container img {
            max-height: 120px;
            max-width: 250px;
            object-fit: contain;
            border-radius: 8px;
            background-color: rgba(255, 255, 255, 0.15);
            padding: 8px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }

        .user-session-bar {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.75rem;
            flex-wrap: wrap;
            padding: 0.75rem;
            background: var(--white);
            border-radius: 8px;
            box-shadow: var(--card-shadow);
            margin-bottom: 2rem;
            transition: background-color 0.3s ease;
        }

        .nav-tabs {
            display: flex;
            gap: 1rem;
            margin-bottom: 2rem;
            flex-wrap: wrap;
        }
        /* Hamburger button - masque sur desktop */
        .hamburger-btn {
            display: none;
            background: none;
            border: 2px solid rgba(55,65,81,0.35);
            border-radius: 8px;
            cursor: pointer;
            padding: 0.4rem 0.6rem;
            flex-direction: column;
            gap: 5px;
            align-items: center;
            justify-content: center;
            margin-left: auto;
        }
        .hamburger-btn span {
            display: block;
            width: 22px;
            height: 2px;
            background: #374151;
            border-radius: 2px;
            transition: all 0.3s ease;
        }
        body.dark-mode .hamburger-btn {
            border-color: rgba(255,255,255,0.5);
        }
        body.dark-mode .hamburger-btn span {
            background: #f3f4f6;
        }
        .hamburger-btn.open span:nth-child(1) {
            transform: translateY(7px) rotate(45deg);
        }
        .hamburger-btn.open span:nth-child(2) {
            opacity: 0;
        }
        .hamburger-btn.open span:nth-child(3) {
            transform: translateY(-7px) rotate(-45deg);
        }


        .nav-tab {
            padding: 1rem 2rem;
            background: var(--white);
            border: 2px solid transparent;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            color: var(--primary-dark);
        }

        .nav-tab:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        }

        .nav-tab.active {
            background: linear-gradient(135deg, var(--primary-cyan), var(--primary-orange));
            color: var(--white);
            border-color: transparent;
        }
         body.dark-mode .nav-tab.active {
            color: #ffffff;
        }

        .content {
            background: var(--white);
            border-radius: 12px;
            padding: 2rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            transition: background-color 0.3s ease;
        }

        .section {
            display: none;
        }

        .section.active {
            display: block;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: var(--primary-dark);
        }

        .form-control {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 1rem;
            transition: all 0.3s ease;
            background-color: var(--white);
            color: var(--primary-dark);
        }
        body.dark-mode .form-control {
            border-color: var(--secondary-gray);
        }


        .form-control:focus {
            outline: none;
            border-color: var(--primary-cyan);
            box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
        }

        textarea.form-control {
            resize: vertical;
            min-height: 100px;
        }

        .btn {
            padding: 0.75rem 1.5rem;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }


        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--primary-cyan), var(--primary-orange));
            color: var(--white);
        }

        .btn-secondary {
            background: var(--secondary-gray);
            color: var(--white);
        }

        .btn-success {
            background: var(--success);
            color: var(--white);
        }

        .btn-danger {
            background: var(--error);
            color: var(--white);
        }

        .btn-info {
            background: var(--info);
            color: var(--white);
        }

        .btn-lg {
            padding: 1rem 2rem;
            font-size: 1.1rem;
        }

        .btn-sm {
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
        }

        .theme-toggle-btn {
            background: transparent;
            color: var(--primary-dark);
            border: 1px solid transparent;
            cursor: pointer;
            padding: 0.35rem 0.75rem;
            border-radius: 6px;
            font-size: 1rem;
        }
        .theme-toggle-btn:hover {
             background: rgba(0,0,0,0.05);
        }
        body.dark-mode .theme-toggle-btn {
             color: var(--primary-dark);
        }
        body.dark-mode .theme-toggle-btn:hover {
            background: rgba(255,255,255,0.1);
        }

        .table-container {
            overflow-y: auto;
            max-height: 55vh;
            margin-top: 1rem;
        }

        table {
            width: 100%;
            border-collapse: collapse;
        }

        th, td {
            padding: 1rem;
            text-align: left;
            border-bottom: 1px solid #e5e7eb;
        }
        body.dark-mode th, body.dark-mode td {
            border-bottom-color: var(--secondary-gray);
        }


        th {
            background: var(--light-gray);
            font-weight: 600;
            color: var(--primary-dark);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        tr:hover {
            background: var(--light-gray);
        }
         body.dark-mode tr:hover {
            background: #111827;
        }

        body.dark-mode #agencyFilesContainer a {
            color: var(--primary-dark);
            text-decoration: none;
        }
        body.dark-mode #agencyFilesContainer a:hover {
            color: var(--primary-cyan);
            text-decoration: underline;
        }

        #agencyFilesContainer .table-container tbody,
        #detailsModal .table-container tbody {
            display: block;
            max-height: 250px;
            overflow-y: auto;
        }

        #agencyFilesContainer .table-container tbody tr,
        #detailsModal .table-container tbody tr {
            display: table;
            width: 100%;
            table-layout: fixed;
        }

        #agencyFilesContainer .table-container thead tr,
        #detailsModal .table-container thead tr {
            display: table;
            width: calc(100% - 8px); /* For scrollbar */
            table-layout: fixed;
        }


        .card {
            background: var(--white);
            border-radius: 12px;
            padding: 1.5rem;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            margin-bottom: 1.5rem;
            transition: all 0.3s ease;
        }

        .card:hover {
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        }

        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid var(--light-gray);
        }
        body.dark-mode .card-header {
            border-bottom-color: #374151;
        }

        .card-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--primary-dark);
        }

        .card-body {
            padding: 0;
        }

        .grid {
            display: grid;
            gap: 1.5rem;
        }

        .grid-2 {
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        }

        .grid-3 {
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        }

        .grid-4 {
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        }

        .grid-5 {
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        }

        .grid-6 {
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            overflow-y: auto;
        }

        .modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            background: var(--white);
            border-radius: 12px;
            padding: 2rem;
            max-width: 800px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
            animation: slideIn 0.3s ease;
        }

        #fileManagerModal .modal-content, #docEditorModal .modal-content {
            max-width: 950px;
        }

        #projectDetailsModal .modal-content {
             max-width: 1200px;
        }

        @keyframes slideIn {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--secondary-gray);
            transition: color 0.3s ease;
        }

        .modal-close:hover {
            color: var(--primary-dark);
        }

        .alert {
            padding: 1rem 1.5rem;
            border-radius: 8px;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .alert-success {
            background: #d1fae5;
            color: #065f46;
            border: 1px solid #a7f3d0;
        }

        .alert-error {
            background: #fee2e2;
            color: #991b1b;
            border: 1px solid #fecaca;
        }

        .alert-warning {
            background: #fef3c7;
            color: #92400e;
            border: 1px solid #fde68a;
        }

        .alert-info {
            background: #dbeafe;
            color: #1e40af;
            border: 1px solid #bfdbfe;
        }
         body.dark-mode .alert-info {
            background: #1e40af; color: #dbeafe; border-color: #3b82f6;
        }
         body.dark-mode .alert-success {
            background: #065f46; color: #d1fae5; border-color: #10b981;
        }
         body.dark-mode .alert-error {
            background: #991b1b; color: #fee2e2; border-color: #ef4444;
        }
         body.dark-mode .alert-warning {
            background: #92400e; color: #fef3c7; border-color: #f59e0b;
        }


        .spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(0, 0, 0, 0.1);
            border-radius: 50%;
            border-top-color: var(--primary-cyan);
            animation: spin 1s ease-in-out infinite;
        }
        body.dark-mode .spinner {
            border: 3px solid rgba(255, 255, 255, 0.1);
            border-top-color: var(--primary-cyan);
        }


        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 9999;
        }

        .loading-overlay.active {
            display: flex;
        }

        .loading-content {
            background: var(--white);
            padding: 2rem;
            border-radius: 12px;
            text-align: center;
        }

        .badge, .status-select {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.875rem;
            font-weight: 600;
            border: 1px solid transparent;
        }
        .status-select {
            appearance: none;
            background-position: right 0.2rem center;
            padding-right: 1.5rem;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-size: 1em 1em;
        }
        .badge-draft, .status-select.Brouillon { background: #e5e7eb; color: #374151; border-color: #d1d5db; }
        .badge-sent, .status-select.Envoyé { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
        .badge-paid, .status-select.Payé { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
        .badge-overdue, .status-select.En\.retard { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
        .badge-warning, .status-select.En\.attente\.d\'approbation { background: #fef3c7; color: #92400e; border-color: #fde68a; }
        .badge-success, .status-select.Approuvé { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
        .badge-danger, .status-select.Refusé { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

        .search-box {
            position: relative;
            margin-bottom: 1.5rem;
        }

        .search-box input {
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 3rem;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 1rem;
            background-color: var(--white);
            color: var(--primary-dark);
        }
         body.dark-mode .search-box input {
            border-color: var(--secondary-gray);
        }

        .search-box i {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--secondary-gray);
        }

        .upload-area {
            border: 2px dashed #e5e7eb;
            border-radius: 8px;
            padding: 2rem;
            text-align: center;
            transition: all 0.3s ease;
            cursor: pointer;
        }
        body.dark-mode .upload-area {
            border-color: var(--secondary-gray);
        }


        .upload-area:hover {
            border-color: var(--primary-cyan);
            background: var(--light-gray);
        }

        .upload-area.drag-over {
            border-color: var(--primary-cyan);
            background: #f0fdff;
        }
        body.dark-mode .upload-area.drag-over {
            background: #1c2a41;
        }

        /* Styles pour le Kanban */
        .kanban-board {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5rem;
            width: 100%;
            margin-top: 1rem;
        }
        .kanban-column {
            background-color: var(--light-gray);
            border-radius: 12px;
            padding: 1rem;
        }
        .kanban-column-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 0.5rem 1rem;
            border-bottom: 2px solid #e5e7eb;
            margin-bottom: 1rem;
        }
         body.dark-mode .kanban-column {
            background-color: #111827;
        }
        body.dark-mode .kanban-column-header {
            border-bottom-color: #374151;
        }
        .kanban-column-title {
            font-weight: 700;
            font-size: 1.1rem;
        }
        .kanban-column .add-task-btn {
            background: none;
            border: none;
            color: var(--secondary-gray);
            font-size: 1.5rem;
            cursor: pointer;
            transition: color 0.2s;
        }
        .kanban-column .add-task-btn:hover {
            color: var(--primary-cyan);
        }
        .kanban-tasks {
            min-height: 200px;
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .task-card {
            background: var(--white);
            border-radius: 8px;
            padding: 1rem;
            box-shadow: var(--card-shadow);
            cursor: grab;
            border-left: 4px solid var(--primary-cyan);
        }
        .task-card.dragging {
            opacity: 0.5;
            transform: scale(1.05);
        }
        .task-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 0.5rem;
        }
        .task-card-title {
            font-weight: 600;
            margin-bottom: 0.5rem;
            word-break: break-word;
        }
        .task-card-actions {
            display: flex;
            gap: 0.25rem;
            flex-shrink: 0;
        }
        .task-card-actions button {
            background: none;
            border: none;
            color: var(--secondary-gray);
            cursor: pointer;
            padding: 0.2rem;
            transition: color 0.2s;
        }
        .task-card-actions button:hover {
            color: var(--primary-dark);
        }
        body.dark-mode .task-card-actions button:hover {
            color: var(--white);
        }
        .task-card-footer {
            margin-top: 1rem;
            font-size: 0.875rem;
            color: var(--secondary-gray);
        }
        .task-card-footer .fa-calendar-alt {
            margin-right: 0.5rem;
        }
        /* Fin Styles Kanban */

        /* Styles pour la messagerie */
        .messaging-container {
            display: flex;
            height: 400px;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            overflow: hidden;
        }

        .messaging-conversations {
            width: 300px;
            border-right: 1px solid #e5e7eb;
            background: var(--light-gray);
            overflow-y: auto;
        }

        .conversation-item {
            padding: 1rem;
            border-bottom: 1px solid #e5e7eb;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .conversation-item:hover {
            background: var(--white);
        }

        .conversation-item.active {
            background: var(--primary-cyan);
            color: white;
        }

        .conversation-item.unread {
            font-weight: bold;
            position: relative;
        }

        .conversation-item.unread::after {
            content: '';
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            width: 8px;
            height: 8px;
            background: var(--error);
            border-radius: 50%;
        }

        .messaging-chat {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .chat-header {
            padding: 1rem;
            border-bottom: 1px solid #e5e7eb;
            background: var(--white);
            font-weight: 600;
        }

        .chat-messages {
            flex: 1;
            padding: 1rem;
            overflow-y: auto;
            background: var(--light-gray);
        }

        .message {
            margin-bottom: 1rem;
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
        }

        .message.sent {
            flex-direction: row-reverse;
        }

        .message-content {
            max-width: 70%;
            padding: 0.75rem 1rem;
            border-radius: 12px;
            background: var(--white);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .message.sent .message-content {
            background: var(--primary-cyan);
            color: white;
        }

        .message-time {
            font-size: 0.75rem;
            color: var(--secondary-gray);
            margin-top: 0.25rem;
        }

        .chat-input {
            padding: 1rem;
            border-top: 1px solid #e5e7eb;
            background: var(--white);
        }

        .chat-input-form {
            display: flex;
            gap: 1rem;
        }

        .chat-input textarea {
            flex: 1;
            resize: none;
            min-height: 40px;
            max-height: 120px;
        }

        .client-folder-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }

        .client-folder-tab {
            padding: 0.5rem 1rem;
            background: var(--light-gray);
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.875rem;
        }

        .client-folder-tab.active {
            background: var(--primary-cyan);
            color: white;
            border-color: var(--primary-cyan);
        }

        .client-folder-tab:hover:not(.active) {
            background: var(--white);
        }

        @media (max-width: 1024px) {
            .kanban-board {
                grid-template-columns: 1fr;
            }

            .messaging-container {
                flex-direction: column;
                height: auto;
            }

            .messaging-conversations {
                width: 100%;
                max-height: 200px;
            }
        }

        @media (max-width: 768px) {
            .container {
                padding: 0 10px 10px;
            }

            .header {
                padding: 1.5rem;
                flex-direction: column;
                text-align: center;
            }

            .header h1 {
                font-size: 1.75rem;
                justify-content: center;
            }

            .hamburger-btn {
                display: flex;
            }

            .nav-tabs {
                flex-direction: column;
                display: none;
                margin-bottom: 0;
                border-top: 1px solid rgba(0,0,0,0.08);
                padding-top: 0.5rem;
            }

            .nav-tabs.open {
                display: flex;
                margin-bottom: 1rem;
                background: var(--white);
                box-shadow: 0 4px 8px rgba(0,0,0,0.1);
                padding: 0.5rem;
                border-radius: 0 0 8px 8px;
            }

            .nav-tab {
                width: 100%;
                justify-content: flex-start;
                padding: 0.75rem 1rem;
                border-radius: 8px;
            }

            .modal-content {
                width: 95%;
                padding: 1rem;
            }

            table {
                font-size: 0.875rem;
            }

            th, td {
                padding: 0.5rem;
            }

            #agencyForm .grid-2,
            #clientForm .grid-2,
            #settings .grid-2 {
                grid-template-columns: 1fr;
            }

             #fileManagerModal .modal-content > .grid {
                grid-template-columns: 1fr;
            }

            .file-manager-sidebar {
                margin-bottom: 1.5rem;
            }

            #dashboard .grid-2, #dashboard .grid-3 {
                 grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {
            body.dark-mode #google-auth-container {
                background: #1f2937;
                box-shadow: 0 2px 8px rgba(0,0,0,0.4);
            }
            body.dark-mode .nav-tabs.open {
                background: #1f2937;
                box-shadow: 0 4px 8px rgba(0,0,0,0.4);
            }
        }

                @media print {
            body {
                background: white;
            }

            .no-print {
                display: none !important;
            }

            .content {
                box-shadow: none;
                padding: 0;
            }
        }

        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--light-gray);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--secondary-gray);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }
        body.dark-mode ::-webkit-scrollbar-thumb:hover {
            background: var(--primary-cyan);
        }
        body.dark-mode #financialChart {
        color: var(--primary-dark);
        }

        /* Architecture multipage */
        .section { display: none; }
        .section.active { display: block; }

        .sticky-header-generic,
        .clients-sticky-header,
        .catalog-sticky-header {
            position: relative;
            background-color: var(--white);
            padding: 1rem 0;
            margin-bottom: 1.5rem;
        }
        body.dark-mode .sticky-header-generic,
        body.dark-mode .clients-sticky-header,
        body.dark-mode .catalog-sticky-header {
            background-color: #1f2937;
        }

        /* Modification pour que le contenu des sections prenne l'apparence d'une fiche */
        .section-wrapper {
            background-color: var(--light-gray);
            width: 100%;
            max-width: 1400px;
            min-height: 90vh;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.4);
            padding: 2rem;
            position: relative;
            margin-top: 2rem;
            margin-bottom: 2rem;
        }

        /* Bouton de fermeture des sections */
        .close-section-btn {
            position: absolute;
            top: 1rem;
            right: 1rem;
            background: var(--error);
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 1.2rem;
            cursor: pointer;
            z-index: 2005;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 10px rgba(0,0,0,0.2);
            transition: transform 0.2s;
        }
        .close-section-btn:hover {
            transform: scale(1.1);
            background: #cc0000;
        }

        /* Ajustement pour le dark mode */
        body.dark-mode .section-wrapper {
            background-color: #1f2937;
            border: 1px solid #374151;
        }


         /* Utility Classes */
        .text-center { text-align: center; }
        .text-right { text-align: right; }
        .text-muted { color: var(--secondary-gray); }
        .text-primary { color: var(--primary-cyan); }
        .mt-1 { margin-top: 0.5rem; }
        .mt-2 { margin-top: 1rem; }
        .mt-3 { margin-top: 1.5rem; }
        .mt-4 { margin-top: 2rem; }
        .mb-1 { margin-bottom: 0.5rem; }
        .mb-2 { margin-bottom: 1rem; }
        .mb-3 { margin-bottom: 1.5rem; }
        .mb-4 { margin-bottom: 2rem; }
        .p-1 { padding: 0.5rem; }
        .p-2 { padding: 1rem; }
        .p-3 { padding: 1.5rem; }
        .p-4 { padding: 2rem; }
        .w-100 { width: 100%; }
        .flex { display: flex; }
        .flex-col { flex-direction: column; }
        .items-center { align-items: center; }
        .justify-between { justify-content: space-between; }
        .justify-end { justify-content: flex-end; }
        .justify-center { justify-content: center; }
        .gap-1 { gap: 0.5rem; }
        .gap-2 { gap: 1rem; }
        .gap-3 { gap: 1.5rem; }
        .gap-4 { gap: 2rem; }
        .d-none { display: none !important; }
        .d-block { display: block !important; }
        .d-flex { display: flex !important; }

        .stat-card {
            background: linear-gradient(135deg, var(--primary-cyan), var(--primary-orange));
            color: var(--white);
            padding: 1.5rem;
            border-radius: 12px;
            text-align: center;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        }
        body.dark-mode .stat-card { color: #ffffff; }

        .stat-card h3 {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        .stat-card p {
            opacity: 0.9;
        }

        .timeline {
            position: relative;
            padding-left: 1.5rem;
        }

        #recentInvoices, #recentQuotes {
            max-height: 240px;
            overflow-y: auto;
            padding-right: 10px;
        }

        .timeline::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 2px;
            background: #e5e7eb;
        }
        body.dark-mode .timeline::before {
            background-color: var(--secondary-gray);
        }

        .timeline-item {
            position: relative;
            padding-bottom: 1.5rem;
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: -1.6rem;
            top: 0.5rem;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--primary-cyan);
            border: 3px solid var(--white);
            box-shadow: 0 0 0 2px #e5e7eb;
        }
        body.dark-mode .timeline-item::before {
            border-color: var(--white);
            box-shadow: 0 0 0 2px var(--secondary-gray);
        }

        .file-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1rem;
        }

        .file-grid-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 1rem;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        body.dark-mode .file-grid-item { border-color: var(--secondary-gray); }

        .file-grid-item:hover {
            background: var(--light-gray);
            border-color: var(--primary-cyan);
        }

        .file-grid-item i {
            font-size: 3rem;
            margin-bottom: 0.5rem;
        }

        .file-grid-item-name {
            font-size: 0.875rem;
            text-align: center;
            word-break: break-word;
        }

        .file-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .file-list-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 1rem;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            transition: all 0.3s ease;
        }
        body.dark-mode .file-list-item { border-color: var(--secondary-gray); }

        .file-list-item:hover {
            background: var(--light-gray);
            border-color: var(--primary-cyan);
        }

        #clientFilesListWrapper {
            max-height: 200px;
            overflow-y: auto;
            padding-right: 8px;
        }

        .file-info {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-grow: 1;
            overflow: hidden;
            min-width: 0;
        }

        #detailsModal .file-name,
        #projectDetailsModal .file-name {
            color: var(--primary-dark);
            text-decoration: none;
            display: inline-block;
            vertical-align: middle;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        #detailsModal .file-name:hover,
        #projectDetailsModal .file-name:hover {
            color: var(--primary-cyan);
            text-decoration: underline;
        }

        .file-list-item .file-icon {
            font-size: 1.5rem;
            color: var(--secondary-gray);
        }

        .file-actions {
            display: flex;
            gap: 0.5rem;
        }

        .folder-icon {
            color: #f59e0b;
        }

        .breadcrumb {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 1rem;
            font-size: 0.875rem;
            color: var(--secondary-gray);
            flex-wrap: wrap;
        }

        .breadcrumb-item {
            cursor: pointer;
            transition: color 0.3s ease;
        }

        .breadcrumb-item:hover {
            color: var(--primary-dark);
        }

        .breadcrumb-separator {
            color: #e5e7eb;
        }

        .toast {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            padding: 1rem 1.5rem;
            border-radius: 8px;
            color: var(--white);
            font-weight: 600;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
            animation: slideInRight 0.3s ease;
            z-index: 10000;
        }

        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .toast-success { background: var(--success); }
        .toast-error { background: var(--error); }
        .toast-warning { background: var(--warning); }
        .toast-info { background: var(--info); }

        .empty-state {
            text-align: center;
            padding: 3rem;
            color: var(--secondary-gray);
        }

        .empty-state i {
            font-size: 4rem;
            margin-bottom: 1rem;
            opacity: 0.5;
        }

        .empty-state h3 {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
            color: var(--primary-dark);
        }

        .divider {
            height: 1px;
            background: #e5e7eb;
            margin: 2rem 0;
        }
         body.dark-mode .divider {
            background-color: #374151;
        }

        select.form-control {
            appearance: none;
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
            background-position: right 0.5rem center;
            background-repeat: no-repeat;
            background-size: 1.5em 1.5em;
            padding-right: 2.5rem;
        }
        body.dark-mode select.form-control {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
        }

        #portalGridAi .card, #portalGridManagement .card, #portalGridSocial .card {
            cursor: grab;
            position: relative;
        }
        #portalGridAi .card:active, #portalGridManagement .card:active, #portalGridSocial .card:active {
            cursor: grabbing;
        }
        #portalGridAi .card.dragging, #portalGridManagement .card.dragging, #portalGridSocial .card.dragging {
            opacity: 0.4;
            border: 2px dashed var(--primary-cyan);
        }

        #portalGridAi .no-drag, #portalGridManagement .no-drag, #portalGridSocial .no-drag {
            pointer-events: all !important;
        }

        #projectModal, #taskModal {
            z-index: 1002;
        }
        #projectDetailsModal {
             z-index: 1001;
        }

        .fc-daygrid-day-frame {
            cursor: pointer;
        }

        .admin-only {
            display: block;
        }

        .client-portal .admin-only {
            display: none !important;
        }

        .client-portal .admin-only {
            display: none !important;
        }

        /* --- CORRECTIF COMPLET POUR LE MODAL DEVIS IA --- */
        #aiQuoteGeneratorModal .grid-2 {
            align-items: start;
        }
        #ai-quote-right-panel {
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        #aiQuoteLinesContainer {
            flex-grow: 1;
            min-height: 250px;
        }

        .quote-line-item {
            width: 100%; /* La correction clé pour la largeur */
            display: flex;
            gap: 0.5rem;
            align-items: flex-start; /* Aligne l'icône et le contenu en haut */
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 0.5rem;
            margin-bottom: 1rem;
        }

        .list-group {
            background-color: var(--white);
            border: 1px solid #ccc;
            border-radius: 0 0 8px 8px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        .list-group-item {
            padding: 0.75rem 1.25rem;
            cursor: pointer;
            border-bottom: 1px solid #eee;
        }
        .list-group-item:last-child {
            border-bottom: none;
        }
        .list-group-item:hover {
            background-color: var(--light-gray);
        }

        /* --- AJOUTS ET CORRECTIONS FICHE CLIENT --- */

        /* Rend l'en-tête du modal fixe */
        #detailsModal .modal-header {
            position: sticky;
            top: -2rem;
            background-color: var(--white);
            z-index: 500;
            padding-top: 2rem;
            padding-bottom: 1rem;
            margin-top: -2rem;
            border-bottom: 1px solid #e5e7eb;
        }

        /* CORRECTION MENU : Force le texte en noir et fond blanc */
        .quick-nav-container {
            position: sticky;
            top: 5rem;
            z-index: 499;
            background: #ffffff; /* Fond blanc forcé */
            padding: 0.5rem;
            margin-bottom: 1.5rem;
            border-radius: 8px;
            border: 1px solid #e5e7eb;
        }

        .quick-nav-select {
            width: 100%;
            padding: 0.5rem;
            border-radius: 6px;
            border: 1px solid var(--primary-cyan);
            font-weight: 600;
            color: #000000 !important; /* TEXTE NOIR FORCÉ */
            background-color: #ffffff !important; /* FOND BLANC FORCÉ */
            cursor: pointer;
        }

        /* CORRECTION BOUTON : Z-Index très élevé pour passer devant tout */
        .back-to-top-btn {
            position: fixed;
            bottom: 30px;
            right: 50px; /* Décalé un peu plus à gauche */
            background: var(--primary-cyan);
            color: white !important;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5);
            cursor: pointer;
            border: 2px solid white; /* Bordure blanche pour mieux le voir */
            z-index: 9999 !important; /* FORCE AU PREMIER PLAN */
            transition: transform 0.3s ease;
        }

        .back-to-top-btn:hover {
            transform: scale(1.1);
            background: var(--primary-orange);
        }

        #detailsModal .modal-content {
            scroll-behavior: smooth;
        }

        /* --- CORRECTION DÉCALAGE SCROLL --- */
        /* Ceci empêche le titre de se cacher sous le menu lors du clic */
        #section-general,
        #section-projects,
        #section-agency-docs,
        #section-managed-docs,
        #section-generated-quotes,
        #section-admin-files,
        #section-service-files {
            scroll-margin-top: 200px; /* Ajustez ce chiffre si ça s'arrête trop haut ou trop bas */
        }

        /* INDISPENSABLE : Débloque le scroll */
        .content, .section {
            overflow: visible !important;
        }

        /* 1. Règle le problème de la fiche client en arrière-plan */
        /* On force le z-index à 3000 pour passer DEVANT les onglets */
        .modal {
            z-index: 3000 !important;
        }

        /* --- GESTION DU SCROLL NAVIGATION RAPIDE --- */
        /* Permet d'arrêter le défilement un peu plus haut pour ne pas cacher le titre sous le menu */
        #agency-general,
        #agency-payment,
        #agency-docs,
        #portal-ai,
        #portal-management,
        #portal-social {
            scroll-margin-top: 250px; /* Ajustez cette valeur si ça s'arrête trop haut ou trop bas */
        }

        /* --- FIX: Actions toujours visibles à droite --- */
        #clientManagedDocumentsContainer th:last-child,
        #clientManagedDocumentsContainer td:last-child {
            position: sticky;
            right: 0;
            background-color: var(--white); /* Fond blanc pour cacher le texte qui passe dessous */
            z-index: 5;
            box-shadow: -2px 0 5px rgba(0,0,0,0.1); /* Petite ombre pour délimiter */
            border-left: 1px solid #e5e7eb;
        }
        /* Ajustement pour le mode sombre */
        body.dark-mode #clientManagedDocumentsContainer th:last-child,
        body.dark-mode #clientManagedDocumentsContainer td:last-child {
            background-color: #1f2937;
            border-left-color: #374151;
        }

        /* === PROSPECTION IA STYLES === */
        .prospect-card {
            background: var(--white);
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 1rem;
            box-shadow: var(--card-shadow);
            border-left: 4px solid var(--primary-cyan);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .prospect-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 20px rgba(0, 212, 255, 0.15);
        }
        .prospect-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid var(--light-gray);
        }
        .prospect-company {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--primary-dark);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .prospect-score {
            display: inline-block;
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-weight: 600;
            font-size: 0.9rem;
        }
        .score-high {
            background: linear-gradient(135deg, #10b981, #059669);
            color: white;
        }
        .score-medium {
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: white;
        }
        .score-low {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: white;
        }
        .prospect-meta {
            display: flex;
            gap: 1.5rem;
            flex-wrap: wrap;
            margin-bottom: 1rem;
            font-size: 0.95rem;
        }
        .prospect-meta-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--secondary-gray);
        }
        .prospect-meta-item i {
            color: var(--primary-cyan);
        }
        .prospect-ai-insight {
            background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(255, 107, 0, 0.08));
            padding: 1rem;
            border-radius: 8px;
            margin-bottom: 1rem;
            border-left: 3px solid var(--primary-orange);
        }
        .prospect-ai-insight h4 {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--primary-orange);
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .prospect-ai-insight p {
            font-size: 0.9rem;
            color: var(--primary-dark);
            line-height: 1.5;
        }
        .prospect-actions {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }
        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.4rem 1rem;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 600;
        }
        .status-draft {
            background: #fef3c7;
            color: #92400e;
        }
        .status-ready {
            background: #dbeafe;
            color: #1e40af;
        }
        .status-sent {
            background: #d1fae5;
            color: #065f46;
        }
        .status-replied {
            background: #e0e7ff;
            color: #3730a3;
        }
        .status-unsubscribed {
            background: #fee2e2;
            color: #991b1b;
        }
        .prospect-info-section {
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(0, 212, 255, 0.15);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1rem;
        }
        .prospect-info-section h4 {
            font-size: 0.9rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .prospect-info-section h4 .fa-google { color: #4285F4; }
        .prospect-info-section h4 .fa-share-alt { color: #00d4ff; }
        .prospect-info-section h4 .fa-landmark { color: #ff6b00; }
        .prospect-info-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 0.5rem;
        }
        .prospect-info-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            padding: 0.4rem 0;
        }
        .prospect-info-item i {
            width: 16px;
            text-align: center;
            color: var(--primary-cyan);
            font-size: 0.8rem;
        }
        .prospect-info-item a {
            color: var(--primary-cyan);
            text-decoration: none;
        }
        .prospect-info-item a:hover {
            text-decoration: underline;
        }
        .prospect-info-item .info-label {
            color: var(--medium-gray);
            font-size: 0.8rem;
        }
        .prospect-info-item .info-value {
            color: var(--primary-dark);
            font-weight: 500;
        }
        .prospect-reviews-box {
            background: rgba(255, 255, 255, 0.02);
            border-radius: 6px;
            padding: 0.75rem;
            margin-top: 0.5rem;
            font-size: 0.85rem;
            color: var(--primary-dark);
            line-height: 1.6;
            max-height: 120px;
            overflow-y: auto;
        }
        .email-preview {
            background: var(--white);
            border: 2px solid var(--light-gray);
            border-radius: 8px;
            padding: 1.5rem;
            margin-top: 1rem;
        }
        .email-preview-subject {
            font-weight: 700;
            font-size: 1.1rem;
            margin-bottom: 1rem;
            color: var(--primary-dark);
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--light-gray);
        }
        .email-preview-body {
            line-height: 1.7;
            color: var(--secondary-gray);
            white-space: pre-wrap;
        }
        .search-controls {
            display: flex;
            gap: 1rem;
            margin-bottom: 2rem;
            flex-wrap: wrap;
        }
        .search-controls input,
        .search-controls select {
            flex: 1;
            min-width: 200px;
        }
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }
        .stat-card {
            background: linear-gradient(135deg, var(--primary-cyan), var(--primary-orange));
            color: white;
            padding: 1.5rem;
            border-radius: 12px;
            text-align: center;
        }
        .stat-card h3 {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }
        .stat-card p {
            font-size: 0.9rem;
            opacity: 0.9;
        }

        /* ==================== ONGLET SITE WEB ==================== */
        .nav-badge {
            background: var(--primary-orange);
            color: white;
            font-size: 0.7rem;
            padding: 2px 6px;
            border-radius: 10px;
            margin-left: 8px;
        }

        .siteweb-stats {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .siteweb-stat-card.siteweb-stat-clickable {
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .siteweb-stat-card.siteweb-stat-clickable:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.3);
            border-color: rgba(0, 212, 255, 0.5) !important;
        }
        .siteweb-stat-card {
            background: linear-gradient(135deg, var(--primary-cyan), var(--primary-orange));
            color: white;
            padding: 1.5rem;
            border-radius: 12px;
            text-align: center;
        }

        .siteweb-stat-card .number {
            font-size: 2.5rem;
            font-weight: 700;
            line-height: 1;
        }

        .siteweb-stat-card .label {
            font-size: 0.85rem;
            opacity: 0.9;
            margin-top: 0.5rem;
        }

        .siteweb-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
            border-bottom: 2px solid var(--light-gray);
            padding-bottom: 0.5rem;
        }

        .siteweb-tab {
            padding: 0.75rem 1.5rem;
            background: transparent;
            border: none;
            cursor: pointer;
            font-weight: 600;
            color: var(--secondary-gray);
            border-radius: 8px 8px 0 0;
            transition: all 0.3s ease;
        }

        .siteweb-tab:hover {
            background: var(--light-gray);
        }

        .siteweb-tab.active {
            background: var(--primary-cyan);
            color: white;
        }

        .siteweb-tab .count {
            background: var(--primary-orange);
            color: white;
            font-size: 0.7rem;
            padding: 2px 6px;
            border-radius: 10px;
            margin-left: 6px;
        }

        .articles-table {
            width: 100%;
            border-collapse: collapse;
        }

        .articles-table th {
            text-align: left;
            padding: 1rem;
            background: var(--light-gray);
            font-weight: 600;
            font-size: 0.85rem;
            color: var(--secondary-gray);
            text-transform: uppercase;
        }

        .articles-table td {
            padding: 1rem;
            border-bottom: 1px solid var(--light-gray);
            vertical-align: middle;
        }

        .articles-table tr:hover {
            background: rgba(0, 212, 255, 0.05);
        }

        .article-title-cell {
            max-width: 300px;
        }

        .article-title-cell strong {
            display: block;
            margin-bottom: 0.25rem;
        }

        .article-title-cell small {
            color: var(--secondary-gray);
            font-size: 0.8rem;
        }

        .status-badge-site {
            display: inline-block;
            padding: 0.3rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }

        .status-badge-site.pending {
            background: rgba(245, 158, 11, 0.15);
            color: var(--warning);
        }

        .status-badge-site.published {
            background: rgba(16, 185, 129, 0.15);
            color: var(--success);
        }

        .status-badge-site.rejected {
            background: rgba(239, 68, 68, 0.15);
            color: var(--error);
        }

        .status-badge-site.new {
            background: rgba(59, 130, 246, 0.15);
            color: var(--info);
        }

        .source-badge {
            display: inline-block;
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            font-size: 0.7rem;
            background: var(--light-gray);
            border: 1px solid var(--secondary-gray);
        }

        .source-badge.ai {
            border-color: #8b5cf6;
            color: #8b5cf6;
        }

        .source-badge.n8n {
            border-color: var(--primary-orange);
            color: var(--primary-orange);
        }

        .table-actions {
            display: flex;
            gap: 0.5rem;
        }

        .table-actions .btn {
            padding: 0.4rem 0.75rem;
            font-size: 0.8rem;
        }

        .article-preview-content {
            max-height: 70vh;
            overflow-y: auto;
            padding: 1rem;
            background: var(--light-gray);
            border-radius: 8px;
            margin: 1rem 0;
        }

        .article-preview-content h2 {
            font-size: 1.3rem;
            margin: 1.5rem 0 0.75rem;
            color: var(--primary-dark);
        }

        .article-preview-content h3 {
            font-size: 1.1rem;
            margin: 1rem 0 0.5rem;
            color: var(--primary-cyan);
        }

        .article-preview-content p {
            margin-bottom: 1rem;
            line-height: 1.7;
        }

        .contacts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 1rem;
        }

        .contact-card-site {
            background: var(--white);
            border: 1px solid var(--light-gray);
            border-radius: 12px;
            padding: 1.5rem;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .contact-card-site:hover {
            box-shadow: var(--card-shadow);
            border-color: var(--primary-cyan);
        }

        .contact-card-site.unread {
            border-left: 4px solid var(--primary-orange);
        }

        .contact-card-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            margin-bottom: 1rem;
        }

        .contact-card-header h4 {
            margin: 0;
            font-size: 1.1rem;
        }

        .contact-card-header small {
            color: var(--secondary-gray);
            font-size: 0.8rem;
        }

        .contact-card-meta {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            margin-bottom: 1rem;
            font-size: 0.9rem;
        }

        .contact-card-meta i {
            width: 20px;
            color: var(--primary-cyan);
        }

        .contact-card-message {
            background: var(--light-gray);
            padding: 1rem;
            border-radius: 8px;
            font-size: 0.9rem;
            color: var(--secondary-gray);
            max-height: 100px;
            overflow: hidden;
        }

        .empty-state {
            text-align: center;
            padding: 3rem;
            color: var(--secondary-gray);
        }

        .empty-state i {
            font-size: 3rem;
            margin-bottom: 1rem;
            opacity: 0.5;
        }

        @media (max-width: 768px) {
            .siteweb-stats {
                grid-template-columns: repeat(2, 1fr);
            }
            .contacts-grid {
                grid-template-columns: 1fr;
            }
        }
