/* NetSuite Reporting Center Styles */

/* NetSuite page specific styles */
#netsuite-reporting {
    animation: pageSlideIn 0.8s ease-out;
}

#netsuite-reporting .page-header {
    animation: headerGlow 3s ease-in-out infinite;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    margin-bottom: 2rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

#netsuite-reporting .page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: buttonShimmer 3s infinite;
}

#netsuite-reporting .page-title {
    animation: statsCounter 1s ease-out 0.3s both;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

#netsuite-reporting .page-subtitle {
    animation: statsCounter 1s ease-out 0.5s both;
    color: rgba(255, 255, 255, 0.8);
}

/* Connection Status Styles */
.connection-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #10b981;
}

.status-dot.connecting {
    background: #f59e0b;
}

.connection-details {
    margin-left: auto;
    text-align: right;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.connection-details p {
    margin: 0.25rem 0;
}

/* Financial Summary Grid */
.financial-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    animation: statsCounter 1s ease-out both;
}

.summary-card:nth-child(1) { animation-delay: 0.1s; }
.summary-card:nth-child(2) { animation-delay: 0.2s; }
.summary-card:nth-child(3) { animation-delay: 0.3s; }
.summary-card:nth-child(4) { animation-delay: 0.4s; }

.summary-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
}

.summary-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.summary-content {
    flex: 1;
}

.summary-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
}

.summary-change {
    font-size: 0.75rem;
    color: #10b981;
    margin: 0;
    font-weight: 500;
}

.summary-change.negative {
    color: #ef4444;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-controls .form-select {
    min-width: 150px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.filter-controls .form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-controls .form-select option {
    background: #1a1a24;
    color: #ffffff;
}

/* NetSuite Table Styles */
#netsuite-revenue-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
}

#netsuite-revenue-table th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #ffffff;
    font-weight: 600;
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#netsuite-revenue-table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

#netsuite-revenue-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

#netsuite-revenue-table tr:last-child td {
    border-bottom: none;
}

/* NetSuite specific animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes statsCounter {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .financial-summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .summary-card {
        padding: 1rem;
    }
    
    .summary-icon {
        width: 40px;
        height: 40px;
    }
    
    .summary-value {
        font-size: 1.25rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls .form-select {
        min-width: auto;
    }
    
    #netsuite-revenue-table {
        font-size: 0.75rem;
    }
    
    #netsuite-revenue-table th,
    #netsuite-revenue-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* NetSuite Loading States */
.netsuite-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.netsuite-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

/* NetSuite Error States */
.netsuite-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 1rem;
    color: #ef4444;
    text-align: center;
}

.netsuite-error .error-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.netsuite-error .error-message {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.netsuite-error .error-details {
    font-size: 0.875rem;
    opacity: 0.8;
}
