/* Login page styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.login-header i {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 15px;
}

.login-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 24px;
    font-weight: bold;
}

.login-header p {
    margin: 10px 0 0;
    color: #6c757d;
    font-size: 16px;
}

.login-body {
    padding: 30px;
}

.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #2c3e50;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.google-login-btn i {
    margin-right: 10px;
    font-size: 20px;
    color: #4285f4;
}

.google-login-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
    transform: translateY(-1px);
}

.login-info {
    margin-top: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.login-info p {
    margin: 0;
    line-height: 1.5;
}

/* Reset and base styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f1c40f;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.2s ease;
    --gradient-start: #2c3e50;
    --gradient-end: #3498db;
    --gradient-bg: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 4rem 0 0; /* Ajustement pour le menu fixe */
    background: var(--gradient-bg);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
}

/* Navigation */
.main-nav {
    background: var(--secondary-color);
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
}

.nav-brand i {
    font-size: 1.5rem;
}

.nav-brand span {
    font-size: 1.25rem;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-menu li a i {
    font-size: 1rem;
}

.nav-menu li a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu li.active a {
    color: white;
    background: var(--primary-color);
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .main-nav {
        padding: 1rem;
    }

    .nav-brand span {
        font-size: 1.1rem;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .nav-menu li a {
        padding: 0.5rem 0.75rem;
    }
}

/* Navigation styles */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.nav-wrapper.nav-hidden {
    transform: translateY(-100%);
}

/* Stats styles */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.stat-icon {
    background: var(--light-bg);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.stat-info h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.stat-info p {
    margin: 0.25rem 0 0;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Content styles */
.content-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--secondary-color);
}

.table-responsive {
    overflow-x: auto;
}

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

.data-table th {
    background: var(--light-bg);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--secondary-color);
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.sender-info {
    display: flex;
    align-items: center;
}

.email-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.email-tag {
    background: var(--light-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.progress-container {
    width: 100%;
    max-width: 200px;
}

.progress-bar {
    height: 8px;
    background: var(--light-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: #666;
}

.last-email {
    max-width: 300px;
}

.email-subject {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-date {
    font-size: 0.85rem;
    color: #666;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-button {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background: var(--light-bg);
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-button:hover {
    background: var(--primary-color);
    color: white;
}

.action-button i {
    font-size: 1rem;
}

.view-btn:hover {
    background: var(--primary-color);
}

.delete-btn:hover {
    background: var(--danger-color);
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .email-list {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* Progress bar styles */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background-color: var(--light-bg);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar .progress {
    height: 100%;
    background-color: var(--danger-color);
    border-radius: 3px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-bar .progress.complete {
    background-color: var(--success-color);
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: nowrap;
}

.no-data {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-container {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .progress-bar {
        width: 100%;
    }
}

/* Common Components */
.container {
    width: 95%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1600px) {
    .container {
        max-width: 1280px;
    }
}

@media (max-width: 1366px) {
    .container {
        max-width: 1140px;
    }
}

@media (max-width: 1024px) {
    .container {
        width: 98%;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.btn,
.action-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.btn i,
.action-button i {
    margin-right: 0.5rem;
}

.btn-primary,
.action-button.primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-secondary,
.action-button.secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-danger,
.action-button.danger {
    background: var(--danger-color);
    color: var(--white);
}

.action-button.info {
    background: var(--gray-100);
    color: var(--gray-800);
    border: 1px solid var(--gray-300);
}

.action-button.info:hover {
    background: var(--gray-200);
}

/* Tasks Page */
.tasks-container {
    padding: 2rem;
}

.tasks-header {
    margin-bottom: 2rem;
}

.tasks-header h1 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tasks-header i {
    color: var(--primary-color);
}

.tasks-subtitle {
    color: var(--gray-600);
    margin: 0.5rem 0 0;
    font-size: 1.1rem;
}

.company-section {
    margin-bottom: 2rem;
}

.company-header {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.company-header h3 {
    margin: 0;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conversation-section {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

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

.task-card {
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    /*color: var(--white);*/
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-header h5 {
    color: var(--white);
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.task-meta {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.task-status select {
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    cursor: pointer;
}

.task-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.details-grid {
    display: grid;
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.detail-value {
    color: var(--white);
}

.full-width {
    grid-column: 1 / -1;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.close-button:hover {
    color: var(--gray-800);
}

/* Utilities */
.hidden {
    display: none !important;
}

tr.hidden {
    display: none !important;
}

tr:not(.hidden) {
    display: table-row;
}

.mt-4 {
    margin-top: 2rem;
}

.dashboard-section h2 {
    color: #2c3e50;
    font-size: 1.25rem;
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-section h2 i {
    color: #3498db;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-card.highlight {
    background: #e3f2fd;
}

.stat-card.wide {
    grid-column: 1 / -1;
}

.stat-icon {
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.25rem;
    color: #3498db;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    color: #2c3e50;
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
}

.stat-number {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.detail-item i {
    font-size: 0.8rem;
    color: #3498db;
}

/* Compose Email styles */
.compose-container {
    padding: 2rem;
}

.compose-header {
    margin-bottom: 2rem;
}

.compose-header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compose-header i {
    color: #3498db;
}

.compose-subtitle {
    color: #6c757d;
    margin: 0.5rem 0 0;
    font-size: 1.1rem;
}

.compose-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group label i {
    color: #3498db;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    color: #2c3e50;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #95a5a6;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border: 2px dashed #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.file-upload-label:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.file-upload-info {
    font-size: 0.9rem;
    color: #95a5a6;
    font-weight: normal;
}

.file-upload-input {
    display: none;
}

.file-list {
    margin-top: 1rem;
}

.file-list .file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.file-list .file-item i {
    color: #3498db;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

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

.primary-btn {
    background: #3498db;
    color: white;
}

.primary-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.secondary-btn {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
}

.secondary-btn:hover {
    background: #e9ecef;
    border-color: #3498db;
}

.save-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.95rem;
    display: none;
}

.save-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.save-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Settings styles */
.settings-container {
    padding: 2rem;
}

.settings-header {
    margin-bottom: 2rem;
}

.settings-header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-header i {
    color: #3498db;
}

.settings-subtitle {
    color: #6c757d;
    margin: 0.5rem 0 0;
    font-size: 1.1rem;
}

.settings-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.settings-card h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-card h2 i {
    color: #3498db;
}

.company-form {
    display: grid;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    color: #2c3e50;
    background: white;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    color: #2c3e50;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.settings-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.settings-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 500;
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.settings-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.company-name,
.company-email,
.company-phone,
.company-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-name i,
.company-email i,
.company-phone i,
.company-type i {
    color: #3498db;
    font-size: 0.9rem;
}

.contact-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.contact-details {
    background: #f8f9fa;
}

.contacts-section {
    padding: 1.5rem;
}

.contacts-section h3 {
    color: #2c3e50;
    font-size: 1.25rem;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contacts-section h3 i {
    color: #3498db;
}

.contact-list {
    display: grid;
    gap: 1rem;
}

.contact-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.contact-info {
    margin-bottom: 1rem;
}

.contact-name,
.contact-email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-name i,
.contact-email i {
    color: #3498db;
    font-size: 0.9rem;
}

.contact-form {
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.no-contacts {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

.assign-contact-form {
    display: grid;
    gap: 1.5rem;
    max-width: 800px;
}

.mt-4 {
    margin-top: 2rem;
}

/* This container definition has been moved to the top of the file with responsive breakpoints */

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f5f5f5;
}

.sent-email {
    background-color: #e0f7fa;
}

.received-email {
    background-color: #fff3e0;
}

.conversation-row:hover {
    cursor: pointer;
    background-color: #f1f1f1;
}

.email {
    margin: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.attachments {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.attachment-icon {
    margin-right: 5px;
    color: #6c757d;
}

.attachment-link {
    display: inline-block;
    margin: 5px 10px;
    color: #007bff;
    text-decoration: none;
}

.attachment-link:hover {
    text-decoration: underline;
}

.calendar-event {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
}

.event-details {
    margin: 10px 0;
    line-height: 1.5;
}

.calendar-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.rsvp-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.rsvp-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s;
}

.rsvp-btn i {
    font-size: 12px;
}

.rsvp-btn.accept {
    background-color: #34a853;
    color: white;
}

.rsvp-btn.accept:hover {
    background-color: #2d9147;
}

.rsvp-btn.maybe {
    background-color: #fbbc05;
    color: white;
}

.rsvp-btn.maybe:hover {
    background-color: #e5ac04;
}

.rsvp-btn.decline {
    background-color: #ea4335;
    color: white;
}

.rsvp-btn.decline:hover {
    background-color: #d33828;
}

.rsvp-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.google-calendar-link {
    color: #4285f4;
    text-decoration: none;
}

.google-calendar-link:hover {
    text-decoration: underline;
}

.attachment-item {
    margin: 10px 0;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

.unread-email {
    font-weight: bold;
}

.read-email {
    font-weight: normal;
}

.unread-conversation {
    font-weight: bold;
}

/* Task status styles */
.filter-button {
    padding: 8px 16px;
    border-radius: 4px;
    margin-right: 8px;
    text-decoration: none;
    color: var(--gray-600);
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.status-count {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.85em;
    min-width: 20px;
    text-align: center;
    transition: var(--transition);
}

.filter-button:hover .status-count {
    background: var(--gray-300);
}

.filter-button.active .status-count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
}

.filter-button:hover {
    background-color: var(--gray-200);
    border-color: var(--gray-300);
    color: var(--gray-700);
}

.filter-button.active {
    color: var(--white);
}

/* Status-specific colors */
.filter-button[href*="status=pending"].active {
    background-color: var(--gray-600);
    border-color: var(--gray-600);
}

.filter-button[href*="status=in_progress"].active {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.filter-button[href*="status=assigned"].active {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.filter-button[href*="status=under_review"].active {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: var(--gray-900);
}

.filter-button[href*="status=completed"].active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Status select styles */
.status-select {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid var(--gray-300);
    background-color: var(--white);
    color: var(--gray-700);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.status-select:hover {
    border-color: var(--primary-color);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.25);
}

/* Task removal animations */
.conversation-section,
.company-section {
    transition: all 0.3s ease-in-out;
}

/* Client section styles */
.company-section {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.company-section h3 {
    margin-bottom: 10px;
    font-size: 1.8rem;
    color: #2c3e50;
}

/* Conversation section styles */
.conversation-section {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-left: 4px solid #3498db;
    border-radius: 5px;
}

.conversation-section h4 {
    margin-bottom: 5px;
    font-size: 1.5rem;
    color: #34495e;
}

.icon-button {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 10px;
    transition: color 0.3s ease;
}

.icon-button:hover {
    color: #2980b9;
}

/* Task section styles */
.task-summary {
    margin-top: 10px;
    padding: 10px;
    background-color: #ecf0f1;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.task-summary:hover {
    background-color: #e0e0e0;
}

.task-details {
    margin-top: 5px;
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.status-select {
    margin-left: 10px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    height: 28px;
    font-size: 0.875rem;
    background-color: var(--white);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    border-radius: 8px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.hidden {
    display: none;
}

/* Task action buttons */
.task-buttons {
    display: flex;
    gap: 5px;
    margin-right: 10px;
}

.action-button.compact {
    padding: 4px 8px;
    font-size: 0.875rem;
    height: 28px;
    min-width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-button.compact i {
    margin: 0;
}

/* Dashboard styles */
.dashboard-container {
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 800px;
    border-radius: 8px;
}

.dashboard-indicators {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    flex-wrap: wrap;
}

.indicator {
    background-color: #3498db;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 30%;
    margin: 10px;
}

.indicator h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

/* Task styles */
.tasks-container {
    padding: 2rem;
}

.tasks-header {
    margin-bottom: 2rem;
}

.tasks-header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tasks-header i {
    color: #3498db;
}

.tasks-subtitle {
    color: #6c757d;
    margin: 0.5rem 0 0;
    font-size: 1.1rem;
}

.company-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.company-header {
    margin-bottom: 1.5rem;
}

.company-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-header i {
    color: #3498db;
}

.conversation-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1.25rem;
}

.conversation-header h4 {
    color: var(--gray-800);
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-weight: 600;
}

.conversation-header i {
    color: #3498db;
}

.conversation-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-button.primary {
    background: var(--gray-700);
    color: var(--gray-100);
}

.action-button.primary:hover {
    background: #2980b9;
}

.action-button.info {
    background: var(--gray-700);
    color: var(--gray-100);
}

.action-button.info:hover {
    background: #2980b9;
}

.task-card {
    background: var(--gray-50);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.task-card .action-button.compact {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #e9ecef;
}

.task-card .action-button.compact:hover {
    background: #e9ecef;
    color: #212529;
    border-color: #dee2e6;
}

.task-card:hover {
    background: white;
    border-color: var(--gray-300);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.task-card:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--gray-300), var(--gray-500));
}

.task-card:hover .task-title {
    color: var(--gray-800);
}

.task-card:hover .task-meta {
    color: var(--gray-700);
}

.task-card:hover .task-meta i {
    color: var(--gray-600);
    transform: translateY(-1px);
}

.task-card .task-meta i {
    transition: all 0.2s ease;
}

.task-card:hover .action-button {
    opacity: 1;
    transform: translateY(0);
}

.task-card .action-button {
    opacity: 0.9;
    transform: translateY(1px);
    transition: all 0.2s ease;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.task-title {
    flex: 1;
    margin-right: 1rem;
    font-size: 0.95rem;
    color: var(--gray-800);
    font-weight: 500;
}

.task-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.task-header h5 {
    color: var(--gray-800);
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* Draft button styles */
.draft-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 12px;
    margin-left: 12px;
    color: #1976d2;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.draft-button:hover {
    background-color: #bbdefb;
    border-color: #90caf9;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.draft-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.draft-button i {
    font-size: 0.9rem;
    color: #1976d2;
}

.draft-button .draft-date {
    font-size: 0.8rem;
    color: #1976d2;
    opacity: 0.9;
    font-weight: 500;
}

/* Styles pour les modals d'emails */
.info-modal[data-content*="Email Draft"],
.info-modal[data-content*="Original Email"] {
    max-width: 800px;
    white-space: pre-wrap;
    line-height: 1.6;
    font-family: var(--font-family);
    padding: 20px;
}

.info-modal[data-content*="Email Draft"] strong,
.info-modal[data-content*="Original Email"] strong {
    color: var(--gray-700);
    display: inline-block;
    min-width: 100px;
    font-weight: 600;
}

.info-modal[data-content*="Email Draft"] strong + br,
.info-modal[data-content*="Original Email"] strong + br {
    display: none;
}

.info-modal[data-content*="Content:"] {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-200);
}

.draft-indicator i {
    transition: color 0.2s ease;
}

.draft-indicator:hover i {
    color: var(--secondary-color);
}

.task-status select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--gray-700);
    background: white;
    cursor: pointer;
    height: 28px;
    transition: all 0.2s ease;
}

.task-status select:hover {
    border-color: var(--gray-400);
}

.task-status select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.task-meta {
    display: flex;
    gap: 1.25rem;
    color: var(--gray-600);
    font-size: 0.85rem;
    margin: 0.75rem 0;
    align-items: center;
    padding: 0 0.25rem;
}

.task-meta i {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-right: 0.35rem;
    width: 14px;
    text-align: center;
}

.details-grid {
    margin-top: 0.75rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    color: var(--gray-600);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-label i {
    color: var(--gray-500);
    width: 16px;
    text-align: center;
}

.detail-value {
    color: var(--gray-800);
    font-size: 0.925rem;
    line-height: 1.5;
    flex: 1;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close-button {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover {
    color: #2c3e50;
}

.hidden {
    display: none;
}

.indicator p {
    font-size: 2rem;
    margin: 0;
}

.indicator.pending {
    background-color: #e67e22; /* Orange for pending/in_progress tasks */
}

/* Tag styles */
.tag {
    display: inline-block;
    background-color: #3498db;
    color: white;
    border-radius: 12px;
    padding: 5px 10px;
    margin-top: 5px;
    font-size: 0.9rem;
    text-align: center;
}

.toggle-details {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin: 10px;
}

.toggle-details:hover {
    background-color: #2980b9;
}

/* Sender Details Page */
.back-link {
    color: var(--secondary-color);
    text-decoration: none;
    margin-right: 1rem;
}

.back-link:hover {
    color: var(--primary-color);
}

.sender-emails {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.link-url {
    max-width: 500px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-url a {
    color: var(--primary-color);
    text-decoration: none;
}

.link-url a:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.pending {
    background: var(--warning-color);
    color: var(--secondary-color);
}

.status-badge.clicked {
    background: var(--success-color);
    color: white;
}

.status-badge.failed {
    background: var(--danger-color);
    color: white;
}

.status-badge.active {
    background: var(--success-color);
    color: white;
}

.status-badge.deleted {
    background: var(--danger-color);
    color: white;
}

.status-badge.unsubscribed {
    background: var(--primary-color);
    color: white;
}

.gmail-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #EA4335;
    text-decoration: none;
    font-weight: 500;
}

.gmail-link:hover {
    text-decoration: underline;
}

.action-button.danger {
    background: var(--danger-color);
    color: white;
}

.action-button.danger:hover {
    background: #c0392b;
}

.action-button.view-btn {
    background: var(--light-bg);
    color: var(--secondary-color);
}

.action-button.view-btn:hover {
    background: var(--primary-color);
    color: white;
}

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

.action-button.mark-btn:hover {
    background: #27ae60;
}

/* Responsive adjustments for sender details */
@media (max-width: 768px) {
    .sender-emails {
        flex-direction: column;
        align-items: center;
    }

    .link-url {
        max-width: 250px;
    }

    .action-buttons {
        flex-direction: row;
    }
}

.link-url {
    max-width: 500px;
}

.link-url .action-button.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.link-url .action-button.link-btn:hover {
    background: var(--primary-color);
    color: white;
}

.link-url .link-text {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-url .link-text:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .link-url {
        max-width: 250px;
    }
}
