/* Dashboard Styles */
.dashboard-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #4f46e5;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #ec4899);
}

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

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    flex: 1;
}

.card-icon {
    font-size: 1.5rem;
    opacity: 0.7;
}

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.card-metric {
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric-positive {
    color: #16a34a;
}

.metric-negative {
    color: #dc2626;
}

.metric-neutral {
    color: #64748b;
}

/* Stats Cards */
.stats-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

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

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

.stats-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin: 0;
}

.stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.stats-description {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Exchange Rates Section */
.exchange-rates-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.exchange-rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.exchange-rate-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

.exchange-rate-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.currency-pair {
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 0.5rem;
}

.exchange-rate {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 0.25rem;
}

.rate-updated {
    font-size: 0.75rem;
    color: #64748b;
}

/* Status Lists */
.status-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--status-color, #64748b);
    transition: all 0.2s ease;
}

.status-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.status-name {
    font-weight: 500;
    color: #1e293b;
}

.status-count {
    font-weight: 600;
    color: var(--status-color, #64748b);
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

/* Status Colors */
.status-confirmed { --status-color: #16a34a; }
.status-pending { --status-color: #f59e0b; }
.status-cancelled { --status-color: #dc2626; }
.status-completed { --status-color: #059669; }
.status-processing { --status-color: #3b82f6; }
.status-draft { --status-color: #64748b; }

/* Compagnies Grid */
.compagnies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.compagnie-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
}

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

.compagnie-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    margin: 0 auto 0.75rem;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.compagnie-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compagnie-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.transport-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4f46e5;
}

.transport-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* Charts Section */
.charts-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.chart-container {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    text-align: center;
}

.chart-placeholder {
    height: 300px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.1rem;
    text-align: center;
}

/* Alert for Today's Travels */
.today-travels-alert {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.5rem;
    color: #d97706;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.alert-message {
    color: #a16207;
    font-size: 0.9rem;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.loading-value {
    height: 2rem;
    width: 60%;
    margin-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .charts-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .exchange-rates-grid {
        grid-template-columns: 1fr;
    }
    
    .compagnies-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .card-value {
        font-size: 2rem;
    }
    
    .stats-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card-value {
        font-size: 1.75rem;
    }
    
    .exchange-rate {
        font-size: 1.25rem;
    }
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.btn-pagination {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-pagination:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-pagination:disabled {
    background: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.page-info {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Inverse Rate Styles */
.exchange-rate-card.inverse-rate {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px dashed #cbd5e1;
}

.inverse-badge {
    background: #f59e0b;
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    font-weight: 500;
}

/* Period Selector */
.charts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.charts-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.period-selector {
    display: flex;
    gap: 0.5rem;
    background: #f8fafc;
    padding: 0.25rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.btn-period {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-period:hover {
    background: #e2e8f0;
    color: #374151;
}

.btn-period.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* Responsive adjustments for new elements */
@media (max-width: 768px) {
    .charts-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .period-selector {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .btn-period {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .btn-pagination {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}
