/**
 * AIC PRO v5.0 - GEMS Ultra Styles
 * Design moderne et attractif pour l'assistant IA
 */

/* ============================================
   GEMS CONTAINER
   ============================================ */

.gems-ultra-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

/* Header */
.gems-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.gems-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gems-title i {
    font-size: 32px;
    animation: pulse 2s infinite;
}

.gems-title h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.badge-ai {
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.gems-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-item i {
    font-size: 24px;
    opacity: 0.9;
}

.stat-item span {
    font-size: 20px;
    font-weight: 700;
}

.stat-item small {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mode Selector */
.gems-mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.mode-btn {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid transparent;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    color: #495057;
}

.mode-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.mode-btn i {
    font-size: 18px;
}

/* Content Area */
.gems-content {
    position: relative;
    min-height: 500px;
}

.gems-mode-panel {
    display: none;
    animation: slideIn 0.3s ease;
}

.gems-mode-panel.active {
    display: block;
}

/* ============================================
   TEXT INPUT MODE
   ============================================ */

.text-input-mode {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.input-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.input-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.gems-textarea {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
}

.gems-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.input-info {
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #6c757d;
}

.separator {
    color: #dee2e6;
}

.input-detection {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #495057;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 20px;
}

.input-detection strong {
    color: #667eea;
}

/* Action Panel */
.action-panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.option-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    color: white;
}

.btn-outline {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* ============================================
   FILE IMPORT MODE
   ============================================ */

.file-import-mode {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drop-zone {
    background: white;
    border: 3px dashed #cbd5e0;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #667eea;
    background: #f7fafc;
    transform: scale(1.02);
}

.drop-zone i {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.drop-zone:hover i {
    color: #667eea;
}

.drop-zone h3 {
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.drop-zone p {
    color: #6c757d;
    margin-bottom: 20px;
}

.file-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.file-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.file-item i {
    font-size: 24px;
    color: #667eea;
}

.file-size {
    color: #6c757d;
    font-size: 13px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    margin-left: auto;
}

/* ============================================
   BATCH MODE
   ============================================ */

.batch-mode {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.batch-header {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.batch-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.batch-actions {
    display: flex;
    gap: 10px;
}

.batch-queue {
    background: white;
    border-radius: 12px;
    padding: 20px;
    min-height: 300px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.batch-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.batch-item:hover {
    background: #e9ecef;
}

.batch-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #667eea;
}

.batch-text {
    flex: 1;
    font-size: 14px;
    color: #495057;
}

.batch-progress {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* ============================================
   HISTORY MODE
   ============================================ */

.history-mode {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-header {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-entry {
    background: white;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.history-entry:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.history-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.history-content {
    flex: 1;
}

.history-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.history-meta {
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================
   RESULTS PANEL
   ============================================ */

.gems-results-panel {
    margin-top: 30px;
    animation: slideUp 0.4s ease;
}

.results-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.results-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
    font-size: 22px;
}

.btn-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: #eb3349;
    color: white;
    transform: rotate(90deg);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.result-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 20px;
}

.result-type {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.result-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-confidence {
    background: #667eea;
    color: white;
}

.badge-success {
    background: #38ef7d;
    color: white;
}

.badge-positif {
    background: #38ef7d;
    color: white;
}

.badge-negatif {
    background: #eb3349;
    color: white;
}

.badge-neutre {
    background: #6c757d;
    color: white;
}

.result-summary {
    color: #495057;
    line-height: 1.6;
    margin: 0;
}

.json-preview {
    background: #2d3748;
    color: #a0aec0;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 300px;
    overflow: auto;
    margin: 0;
}

.quality-metric {
    margin-bottom: 15px;
}

.quality-metric label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.quality-metric .progress-bar {
    margin-bottom: 5px;
}

.missing-fields {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.keyword-tag {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.entities {
    font-size: 13px;
    color: #495057;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.alert-warning {
    border-left: 4px solid #ffc107;
}

.duplicate-item,
.link-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
}

.results-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */

.gems-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.gems-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.gems-notification-success {
    border-left: 4px solid #38ef7d;
}

.gems-notification-error {
    border-left: 4px solid #eb3349;
}

.gems-notification i {
    font-size: 20px;
}

.gems-notification-success i {
    color: #38ef7d;
}

.gems-notification-error i {
    color: #eb3349;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.empty-state small {
    font-size: 14px;
    color: #adb5bd;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .gems-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .gems-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .gems-mode-selector {
        flex-wrap: wrap;
    }
    
    .mode-btn {
        flex: 1 1 calc(50% - 5px);
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .action-panel {
        flex-direction: column;
        gap: 20px;
    }
    
    .action-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .results-actions {
        flex-direction: column;
    }
}

/* ============================================
   INTELLIGENCE DASHBOARD
   ============================================ */

.intelligence-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2c3e50;
    font-size: 28px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border-left: 4px solid var(--card-color);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.metric-icon {
    width: 60px;
    height: 60px;
    background: var(--card-color);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 5px;
}

.metric-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* Dashboard Sections */
.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
    font-size: 20px;
}

/* Quality Overview */
.quality-overview {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: center;
}

.circular-progress {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color) calc(var(--progress) * 1%),
        #e9ecef 0
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.circular-progress::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    background: white;
    border-radius: 50%;
}

.progress-value {
    position: relative;
    z-index: 1;
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
}

.progress-label {
    position: relative;
    z-index: 1;
    font-size: 14px;
    color: #6c757d;
}

.quality-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quality-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
}

.quality-item i {
    font-size: 24px;
}

.quality-excellent {
    background: #d4edda;
    color: #155724;
}

.quality-incomplete {
    background: #fff3cd;
    color: #856404;
}

.quality-item strong {
    font-size: 20px;
    display: block;
}

.quality-item span {
    font-size: 13px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Bar Chart */
.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bar-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-fill {
    height: 8px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.bar-value {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    min-width: 30px;
}

/* Themes List */
.themes-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.theme-rank {
    width: 30px;
    height: 30px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.theme-info {
    flex: 1;
}

.theme-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.theme-count {
    font-size: 12px;
    color: #6c757d;
}

.theme-badge i {
    color: #ffc107;
    font-size: 18px;
}

/* Distribution Chart */
.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.distribution-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.distribution-bar {
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: width 0.5s ease;
}

.distribution-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #495057;
}

/* Performance Metrics */
.performance-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.perf-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.perf-item i {
    font-size: 20px;
    color: #667eea;
}

.perf-item strong {
    display: block;
    font-size: 18px;
    color: #2c3e50;
}

.perf-item span {
    font-size: 12px;
    color: #6c757d;
}

/* Recommendations */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recommendation-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-left: 4px solid var(--priority-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.rec-icon {
    width: 50px;
    height: 50px;
    background: var(--priority-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.rec-content {
    flex: 1;
}

.rec-header {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.rec-priority {
    font-size: 11px;
    font-weight: 700;
    color: var(--priority-color);
}

.rec-type {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
}

.rec-message {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.rec-action {
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-rec-action {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--priority-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-rec-action:hover {
    transform: scale(1.1);
}

/* Activity Timeline */
.activity-timeline {
    padding: 20px 0;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #667eea;
}

.timeline-content {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.timeline-badge {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.timeline-meta {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal */
.gems-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 25px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

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

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.mini-progress {
    width: 100px;
    height: 6px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    display: inline-block;
    margin-right: 10px;
}

.mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.empty-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* ============================================
   AIRTABLE CONFIG
   ============================================ */

.airtable-config-container {
    max-width: 1200px;
    margin: 0 auto;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.config-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2c3e50;
}

.sync-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-online {
    background: #d4edda;
    color: #155724;
}

.status-offline {
    background: #f8d7da;
    color: #721c24;
}

.sync-status i {
    font-size: 8px;
    animation: pulse 2s infinite;
}

.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.status-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-card i {
    font-size: 24px;
    color: #667eea;
}

.status-card.card-success {
    border-left-color: #38ef7d;
}

.status-card.card-success i {
    color: #38ef7d;
}

.status-card.card-warning {
    border-left-color: #ffc107;
}

.status-card.card-warning i {
    color: #ffc107;
}

.status-card.card-danger {
    border-left-color: #eb3349;
}

.status-card.card-danger i {
    color: #eb3349;
}

.status-card strong {
    font-size: 20px;
    color: #2c3e50;
    display: block;
}

.status-card small {
    font-size: 12px;
    color: #6c757d;
}

.config-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.config-section h3 {
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c3e50;
}

.config-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.sync-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.sync-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 30px;
}

.sync-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: #495057;
    font-size: 14px;
}

.info-item i {
    color: #667eea;
}

.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guide-step {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.step-content p,
.step-content ul {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

.step-content ul {
    padding-left: 20px;
    margin-top: 10px;
}

.advanced-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.config-section-wrapper {
    margin-bottom: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.pending-ops-list,
.conflicts-list {
    max-height: 400px;
    overflow-y: auto;
}

.pending-op-item,
.conflict-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.conflict-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

.conflict-version pre {
    background: #2d3748;
    color: #a0aec0;
    padding: 10px;
    border-radius: 6px;
    font-size: 11px;
    max-height: 200px;
    overflow: auto;
}

.conflict-actions {
    display: flex;
    gap: 10px;
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}
