/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f59e0b;
    --secondary-color: #3b82f6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-bg: #1f2937;
    --light-bg: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.header-content h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Controls */
.controls {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.select-input,
.date-input {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--light-bg);
}

.select-input:focus,
.date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

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

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Chart Container */
.chart-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    min-height: 500px;
    position: relative;
}

#chart {
    width: 100%;
    min-height: 450px;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 450px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-indicator p {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Error Message */
.error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    color: var(--danger-color);
    font-size: 1.1rem;
}

/* Info Panel */
.info-panel {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
}

.info-panel h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.info-panel p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

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

.info-item {
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.info-item strong {
    color: var(--text-primary);
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    color: var(--text-secondary);
}

/* Chart Styles */
.axis {
    font-size: 12px;
}

.axis path,
.axis line {
    stroke: var(--border-color);
    shape-rendering: crispEdges;
}

.axis text {
    fill: var(--text-secondary);
}

.line {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2.5;
}

.area {
    fill: var(--primary-color);
    opacity: 0.2;
}

.bar {
    fill: var(--primary-color);
    transition: opacity 0.3s ease;
}

.bar:hover {
    opacity: 0.8;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.tooltip.show {
    opacity: 1;
}

.grid line {
    stroke: var(--border-color);
    stroke-opacity: 0.3;
    shape-rendering: crispEdges;
}

.grid path {
    stroke-width: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header-content h1 {
        font-size: 1.8rem;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        width: 100%;
    }

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

    .stat-value {
        font-size: 2rem;
    }

    .chart-container {
        padding: 15px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .controls,
    .info-panel,
    .footer {
        display: none;
    }

    .chart-container {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

/* Made with Bob */


/* ROI Dashboard Section */
.roi-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
}

.section-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 15px;
}

/* ROI Stats Cards */
.roi-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.roi-card {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.roi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.roi-card.highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: var(--primary-color);
}

.roi-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.roi-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.roi-card.highlight .roi-value {
    color: #d97706;
    font-size: 2.5rem;
}

.roi-sublabel {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* ROI Charts */
.roi-charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.roi-chart-wrapper {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.roi-chart-wrapper h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-align: center;
}

.roi-chart {
    min-height: 400px;
    background: white;
    border-radius: 8px;
    padding: 10px;
}

/* FIT Details */
.fit-details {
    background: var(--light-bg);
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
}

.fit-details h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

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

.fit-info-item {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.fit-info-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 5px;
}

.fit-note {
    background: #fef3c7;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.fit-note strong {
    color: var(--primary-color);
}

/* Responsive Design for ROI Section */
@media (max-width: 768px) {
    .roi-stats-container {
        grid-template-columns: 1fr;
    }
    
    .roi-charts-container {
        grid-template-columns: 1fr;
    }
    
    .fit-info-grid {
        grid-template-columns: 1fr;
    }
    
    .roi-value {
        font-size: 1.5rem;
    }
    
    .roi-card.highlight .roi-value {
        font-size: 2rem;
    }
}


/* Tabs Container */
.tabs-container {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin: 20px 0;
    overflow: hidden;
}

.tab-nav {
    display: flex;
    background: var(--light-bg);
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 18px 30px;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    background: white;
    border-bottom-color: var(--primary-color);
}

.tab-content {
    padding: 0;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-pane.active {
    display: block;
}

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

/* Adjust chart container for tabs */
.tab-pane .chart-container {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.tab-pane .roi-section {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}
