/* ===================================
   VARIABLES & GLOBAL STYLES
   =================================== */

:root {
    --primary-green: #8BC34A;
    --dark-bg: #1a1a1a;
    --darker-bg: #0f0f0f;
    --gray-bg: #2a2a2a;
    --text-white: #ffffff;
    --text-light: #e0e0e0;
    --text-muted: #999999;
    --accent-green: #9CCC65;
    --border-color: #333333;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   CONTAINER & LAYOUT
   =================================== */

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

/* ===================================
   HEADER
   =================================== */

.header {
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--gray-bg) 100%);
    border-bottom: 3px solid var(--primary-green);
    padding: 30px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    width: 60px;
    height: 60px;
    filter: brightness(1.1);
}

.header-text h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 1px;
}

.header-text p {
    font-size: 14px;
    color: var(--primary-green);
    font-weight: 500;
    margin-top: 4px;
}

.print-btn {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
    color: var(--darker-bg);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(139, 195, 74, 0.3);
    white-space: nowrap;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 195, 74, 0.5);
}

.print-btn:active {
    transform: translateY(0);
}

/* ===================================
   SECTIONS
   =================================== */

.main-content {
    padding: 60px 0;
}

.section {
    margin-bottom: 80px;
    animation: fadeIn 0.6s ease-in-out;
}

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

.section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-white);
    position: relative;
    padding-bottom: 15px;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--accent-green) 100%);
    border-radius: 2px;
}

/* ===================================
   EXECUTIVE SUMMARY
   =================================== */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.summary-card {
    background: linear-gradient(135deg, var(--gray-bg) 0%, rgba(139, 195, 74, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-green);
    padding: 30px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.summary-card:hover {
    transform: translateY(-5px);
    border-left-color: var(--accent-green);
    box-shadow: 0 8px 25px rgba(139, 195, 74, 0.15);
    background: linear-gradient(135deg, var(--gray-bg) 0%, rgba(139, 195, 74, 0.1) 100%);
}

.metric-icon {
    font-size: 40px;
    min-width: 50px;
}

.metric-content h3 {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===================================
   KEY INSIGHTS
   =================================== */

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.insight-card {
    background: linear-gradient(135deg, rgba(139, 195, 74, 0.1) 0%, rgba(139, 195, 74, 0.05) 100%);
    border: 1px solid rgba(139, 195, 74, 0.3);
    padding: 28px;
    border-radius: 8px;
    transition: var(--transition);
}

.insight-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 8px 25px rgba(139, 195, 74, 0.2);
    transform: translateY(-3px);
}

.insight-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 12px;
}

.insight-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===================================
   PERFORMANCE CHARTS
   =================================== */

.chart-container {
    margin-bottom: 50px;
}

.chart-wrapper {
    background: linear-gradient(135deg, var(--gray-bg) 0%, rgba(139, 195, 74, 0.05) 100%);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.chart-wrapper h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 25px;
    text-align: center;
}

.chart-wrapper canvas {
    max-height: 400px;
}

/* ===================================
   MONTHLY STATISTICS TABLE
   =================================== */

.table-wrapper {
    overflow-x: auto;
    background: linear-gradient(135deg, var(--gray-bg) 0%, rgba(139, 195, 74, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.stats-table thead {
    background: rgba(139, 195, 74, 0.15);
    border-bottom: 2px solid var(--primary-green);
}

.stats-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--primary-green);
}

.stats-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-light);
}

.stats-table tbody tr:hover {
    background: rgba(139, 195, 74, 0.08);
}

.stats-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===================================
   RECOMMENDATIONS
   =================================== */

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recommendation-item {
    display: flex;
    gap: 20px;
    background: linear-gradient(135deg, var(--gray-bg) 0%, rgba(139, 195, 74, 0.05) 100%);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 8px;
    transition: var(--transition);
}

.recommendation-item:hover {
    border-color: var(--primary-green);
    box-shadow: 0 8px 25px rgba(139, 195, 74, 0.15);
    transform: translateX(5px);
}

.rec-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
    color: var(--darker-bg);
    font-weight: 700;
    font-size: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rec-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 8px;
}

.rec-content p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===================================
   FOOTER STATS
   =================================== */

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

.metric-box {
    background: linear-gradient(135deg, var(--gray-bg) 0%, rgba(139, 195, 74, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary-green);
    padding: 24px;
    border-radius: 8px;
    transition: var(--transition);
}

.metric-box:hover {
    box-shadow: 0 8px 25px rgba(139, 195, 74, 0.15);
    transform: translateY(-3px);
}

.metric-box h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 16px;
}

.metric-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.metric-detail:last-child {
    border-bottom: none;
}

.metric-detail span {
    color: var(--text-muted);
}

.metric-detail strong {
    color: var(--primary-green);
    font-weight: 600;
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--gray-bg) 100%);
    border-top: 3px solid var(--primary-green);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

.footer p {
    font-size: 14px;
    color: var(--text-light);
    margin: 8px 0;
}

.footer-note {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    body {
        background: white;
        color: black;
    }

    .header {
        background: white;
        border-bottom: 2px solid #8BC34A;
        position: static;
    }

    .print-btn {
        display: none;
    }

    .section,
    .summary-card,
    .insight-card,
    .chart-wrapper,
    .recommendation-item,
    .metric-box {
        background: white !important;
        border-color: #ccc !important;
        color: black !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    .section h2,
    .header-text h1,
    .metric-value,
    .rec-number {
        color: black !important;
    }

    .metric-value,
    .primary-green,
    .rec-number {
        color: #8BC34A !important;
    }

    .text-muted,
    .footer-note {
        color: #666 !important;
    }

    .chart-wrapper {
        margin-bottom: 30px;
    }

    .footer {
        border-top: 2px solid #8BC34A;
    }
}

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

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .print-btn {
        width: 100%;
        text-align: center;
    }

    .section h2 {
        font-size: 24px;
    }

    .summary-grid,
    .insights-grid,
    .metrics-detailed {
        grid-template-columns: 1fr;
    }

    .summary-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .metric-icon {
        font-size: 32px;
    }

    .recommendation-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .rec-number {
        min-width: 45px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .stats-table {
        font-size: 12px;
    }

    .stats-table th,
    .stats-table td {
        padding: 10px 8px;
    }

    .chart-wrapper {
        padding: 20px;
    }

    .chart-wrapper canvas {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 20px;
    }

    .section h2 {
        font-size: 20px;
    }

    .metric-value {
        font-size: 22px;
    }

    .summary-card,
    .insight-card,
    .metric-box {
        padding: 20px;
    }

    .logo {
        width: 50px;
        height: 50px;
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.summary-card {
    animation: slideIn 0.5s ease-out;
}

/* ===================================
   SCROLLBAR STYLING
   =================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-green);
}
