/* Frontend Styles for JA Graph Chart */

.jagc-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;
}

/* Header Styles */
.jagc-header {
    background: linear-gradient(135deg, #0f2c59 0%, #1a3a6e 100%);
    color: white;
    padding: 30px 35px;
    text-align: center;
}

.jagc-main-title {
    font-size: 1.8rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.jagc-subtitle {
    font-size: 1rem;
    margin: 0;
    opacity: 0.92;
}

/* Grid Layout */
.jagc-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 35px;
    background: #f8fafc;
}

/* Left Column */
.jagc-left-col {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.jagc-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f2c59;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #0f2c59;
    display: inline-block;
}

/* Chart Wrapper */
.jagc-chart-wrapper {
    position: relative;
    height: 380px;
    margin: 20px 0 25px;
}

/* Data Table */
.jagc-table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.jagc-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.jagc-data-table thead th {
    background: #0f2c59;
    color: white;
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
}

.jagc-data-table tbody td {
    padding: 10px 15px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.jagc-data-table tbody tr:hover {
    background: #f8fafc;
}

/* Total Badge */
.jagc-total-badge {
    background: #eef2ff;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    margin-top: 20px;
}

.jagc-total-badge .icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

/* Right Column */
.jagc-right-col {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.jagc-sidebar-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.jagc-sidebar-box.red-theme {
    border-top: 4px solid #d62027;
}

.jagc-sidebar-box.blue-theme {
    border-top: 4px solid #1d70b8;
}

.jagc-box-header {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1e293b;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.jagc-box-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.jagc-total-row {
    margin-top: 15px;
    padding-top: 12px;
    font-weight: 700;
    color: #d62027;
    text-align: right;
    border-top: 2px solid #e2e8f0;
}

.jagc-huge-stat {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1d70b8;
    text-align: center;
    margin: 20px 0 10px;
    line-height: 1;
}

.jagc-stat-label {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 20px;
}

.jagc-thankyou {
    text-align: center;
    font-style: italic;
    color: #0f2c59;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Footer */
.jagc-footer {
    background: #0f2c59;
    color: white;
    padding: 16px 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* Error & Warning */
.jagc-error,
.jagc-warning {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px;
}

.jagc-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.jagc-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* Dark Theme */
.jagc-theme-dark {
    background: #1e1e2a;
}

.jagc-theme-dark .jagc-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.jagc-theme-dark .jagc-grid {
    background: #0f0f1a;
}

.jagc-theme-dark .jagc-left-col,
.jagc-theme-dark .jagc-sidebar-box {
    background: #1a1a2e;
}

.jagc-theme-dark .jagc-card-title {
    color: #60a5fa;
}

.jagc-theme-dark .jagc-data-table tbody td {
    color: #cbd5e1;
    border-bottom-color: #334155;
}

.jagc-theme-dark .jagc-total-badge {
    background: #1e293b;
    color: #e2e8f0;
}

/* Responsive */
@media (max-width: 768px) {
    .jagc-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .jagc-main-title {
        font-size: 1.3rem;
    }
    
    .jagc-chart-wrapper {
        height: 280px;
    }
    
    .jagc-huge-stat {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .jagc-chart-wrapper {
        height: 220px;
    }
    
    .jagc-huge-stat {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .jagc-container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .jagc-chart-wrapper {
        break-inside: avoid;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jagc-container {
    animation: fadeInUp 0.5s ease-out;
}