﻿/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* === GLOBAL MODERN STYLES === */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background-color: #2F4050;
    color: #2F4050;
    line-height: 1.6;
}

/* === MODERN CARD STYLING === */
.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease-in-out;
    overflow: hidden;
}

    .card:hover {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

.card-header {
    background: #fafbfc;
    border-bottom: 1px solid #f1f5f9;
    padding: 20px 24px 16px 24px;
    font-weight: 600;
    color: #1f2937;
}

.card-body {
    padding: 24px;
}

/* === MODERN BUTTON STYLING === */




/* === FORM CONTROLS MODERN STYLING === */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        outline: none;
    }

/* === ALERT STYLING === */
.alert {
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.alert-danger {
    background: #fef2f2;
    color: #7f1d1d;
    border-left: 4px solid #ef4444;
}

/* === CHART CONTAINER STYLES === */
.chart-container, .map-container {
    background: #263a4a;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255,255,255,0.2);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease-in-out;
}

.chart-container:hover, .map-container:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.chart-header, .map-header {
    padding: 20px 24px 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #445362;
}

.chart-title-section, .map-title-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.chart-title-content, .map-title-content {
    flex: 1;
    min-width: 0;
}

.chart-title, .map-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    line-height: 1.3;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.chart-subtitle, .map-subtitle {
    font-size: 14px;
    color: #fff;
    margin: 0;
    line-height: 1.4;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.chart-refresh-btn, .map-refresh-btn {
    font-size:12px;
    margin-left: auto;
}

.chart-body, .map-body {
    flex: 1;
    position: relative;
    padding: 16px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.chart-canvas, .map-canvas {
    flex: 1;
    min-height: 300px;
    position: relative;
}

/* === LOADING STATES === */
.chart-loading-overlay, .map-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #263a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f1f5f9;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 14px;
    color: #6b7280;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.chart-error-overlay .map-error-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 90%;
}

.error-content {
    background: #374151;
    border: 1px solid #6b7280;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.error-icon {
    font-size: 24px;
    color: #f87171;
}

.error-message {
    font-size: 14px;
    color: #e5e7eb;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.retry-btn {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

    .retry-btn:hover {
        background: #2563eb;
    }

/* === DASHBOARD LAYOUT === */
.modern-dashboard {
    padding: 0;
}
    .modern-dashboard > .row:not(:last-child) {
        margin-bottom: 10px;
    }

/* === TIMELINE MODERN STYLING === */
.timeline {
    position: relative;
    padding-left: 30px;
}

    .timeline::before {
        content: '';
        position: absolute;
        left: 15px;
        top: 0;
        bottom: 0;
        width: 2px;
        background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    }

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    background: #3b82f6;
    box-shadow: 0 0 0 2px #3b82f6;
}

.timeline-content {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

    .timeline-content:hover {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }

.timeline-title {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.timeline-text {
    margin-bottom: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* === ANIMATION CLASSES === */
.chart-fade-in {
    animation: chartFadeIn 0.4s ease-in-out;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* === KEYFRAMES === */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === MODERN SCROLLBAR STYLING === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

/* === ENHANCED TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: #1f2937;
}

p {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    color: #6b7280;
    line-height: 1.6;
}

/* === MODERN UTILITY CLASSES === */
.text-muted {
    color: #6b7280 !important;
}

.bg-light {
    background-color: #f8fafc !important;
}

.border {
    border: 1px solid #e5e7eb !important;
}

.rounded {
    border-radius: 8px !important;
}

.shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
}









/*Data Panel widgets */

/* === DATA PANEL WIDGET STYLES === */
.dashboard-metric-widget {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255,255,255,0.2);
    overflow: hidden;
    height: 100%;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.data-panel-content {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.data-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.data-panel-refresh {
    font-size: 12px;
    margin-left: auto
}

.data-panel-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 8px;
}

.metric-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    margin-bottom: 16px;
    line-height: 1.3;
}

.metric-change-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

    .metric-change i {
        font-size: 11px;
    }

.metric-change-positive {
    background: #f0fdf4;
    color: #166534;
}

.metric-change-negative {
    background: #fef2f2;
    color: #dc2626;
}

.metric-change-neutral {
    background: #f8fafc;
    color: #64748b;
}

.metric-no-comparison {
    font-size: 13px;
    color: #6b7280;
}

.metric-period {
    font-size: 12px;
    color: #9ca3af;
}

/* === DASHBOARD METRICS CONTAINER === */
.metrics-container {
    display: flex;
    width: 100%;
    background: #263a4a;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255,255,255,0.2);
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

    .metrics-container:hover {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

.metric-item {
    flex: 1;
    min-height: 160px;
    position: relative;
}

/* === JOINED METRICS STYLING === */
/* ADD THIS NEW SECTION AFTER THE ABOVE */

/* Remove individual widget shadows and borders for joined look */
.metrics-container .dashboard-metric-widget {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    height: 100%;
}

/* Add separators between metrics */
.metric-item:not(:last-child)::after,
.data-panel-loading:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20px;
    bottom: 20px;
    width: 1px;
    background: rgba(255,255,255,0.2);
    z-index: 1;
}

/* Adjust padding for joined layout */
.metrics-container .data-panel-content {
    padding: 24px 20px;
}

/* First and last items get slightly more padding */
.metric-item:first-child .data-panel-content {
    padding-left: 24px;
}

.metric-item:last-child .data-panel-content {
    padding-right: 24px;
}

/* === DATA PANEL STATES === */
.data-panel-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #263a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
}

.data-panel-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background: #374151;
    border: 1px solid #6b7280;
    border-radius: 8px;
    padding: 16px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

    .data-panel-error i {
        font-size: 18px;
        color: #f87171;
    }

    .data-panel-error span {
        font-size: 12px;
        color: #e5e7eb;
    }

.retry-btn-small {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .retry-btn-small:hover {
        background: #2563eb;
    }

/* Add a class to allow hiding the bootstrap icon */
.form-control.no-validation-icon {
    background-image: none !important;
    padding-right: 12px !important;
}






