/* === ENTERPRISE NETSUITE BI PLATFORM STYLES === */

:root {
    --primary-blue: #1e3c72;
    --secondary-blue: #2a5298;
    --accent-purple: #667eea;
    --product-blue: #3498db;
    --treasury-green: #27ae60;
    --success-green: #27ae60;
    --warning-orange: #f39c12;
    --danger-red: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --background-light: #f8f9fa;
    --border-light: #e1e8ed;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding-top: 80px;
    line-height: 1.6;
}

/* === FIXED HEADER NAVIGATION === */
.header-nav {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.platform-status {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    background: rgba(255,255,255,0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
}

/* === MAIN CONTAINER === */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* === PLATFORM OVERVIEW === */
.platform-overview {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin: 2rem 0;
    padding: 2rem;
    border-left: 5px solid var(--accent-purple);
}

.overview-header {
    text-align: center;
    margin-bottom: 2rem;
}

.overview-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.overview-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.overview-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.overview-metric {
    text-align: center;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-purple);
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.platform-modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.module-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.module-card.product-intelligence {
    border-left: 5px solid var(--product-blue);
}

.module-card.treasury-management {
    border-left: 5px solid var(--treasury-green);
}

.module-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.module-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
}

.module-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
}

.module-badge.product {
    background: var(--product-blue);
}

.module-badge.treasury {
    background: var(--treasury-green);
}

.module-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin: 0;
}

.module-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.module-features {
    list-style: none;
    padding: 0;
}

.module-features li {
    padding: 0.25rem 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
}

.module-features li::before {
    content: '✓';
    color: var(--success-green);
    font-weight: bold;
    margin-right: 0.5rem;
}

.module-stats {
    background: var(--background-light);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid var(--border-light);
}

.module-stats-title {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-purple);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
}
.metric-value { font-variant-numeric: tabular-nums; }

/* === PHASE SECTIONS === */
.phase-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin: 2rem 0;
    padding: 2rem;
    display: none;
}

.phase-section.active {
    display: block;
}

.phase-section.product-intelligence {
    border-left: 5px solid var(--product-blue);
}

.phase-section.treasury-management {
    border-left: 5px solid var(--treasury-green);
}

.phase-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.phase-badge {
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    margin-right: 1rem;
}

.phase-badge.product {
    background: linear-gradient(135deg, var(--product-blue) 0%, #2980b9 100%);
}

.phase-badge.treasury {
    background: linear-gradient(135deg, var(--treasury-green) 0%, #2ecc71 100%);
}

.phase-title {
    font-size: 2rem;
    color: var(--text-dark);
    margin: 0;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: var(--background-light);
    transform: translateX(-2px);
}

/* === UPLOAD SECTIONS === */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.upload-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
}

.upload-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--secondary-blue);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.upload-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.upload-description {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.file-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    background: var(--background-light);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: var(--secondary-blue);
    background: #e3f2fd;
}

.status-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger-red);
    transition: background-color 0.3s;
}

.status-indicator.loaded {
    background: var(--success-green);
}

/* === RESULTS PANELS === */
.results-panel {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin: 2rem 0;
    border-left: 5px solid var(--success-green);
    animation: slideInFromLeft 0.5s ease;
}

.results-content {
    background: var(--background-light);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.result-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.result-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.result-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.result-value.positive {
    color: var(--success-green);
}

.result-value.negative {
    color: var(--danger-red);
}

.result-value.neutral {
    color: var(--accent-purple);
}

.result-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

.result-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.result-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-list li:last-child {
    border-bottom: none;
}

.result-item-name {
    font-weight: 500;
    color: var(--text-dark);
}

.result-item-value {
    font-weight: bold;
}

.result-item-value.profit {
    color: var(--success-green);
}

.result-item-value.loss {
    color: var(--danger-red);
}

.recommendations-list {
    background: #e8f4fd;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid var(--accent-purple);
}

.recommendations-list h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.recommendations-list ul {
    list-style: none;
    padding: 0;
}

.recommendations-list li {
    padding: 0.25rem 0;
    color: var(--text-dark);
    display: flex;
    align-items: flex-start;
}

.recommendations-list li::before {
    content: '💡';
    margin-right: 0.5rem;
    margin-top: 0.1rem;
}

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

/* === STATUS PANEL === */
.status-panel {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    margin: 2rem 0;
    border-left: 5px solid var(--warning-orange);
}

.status-messages {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
    background: var(--background-light);
}

.status-message {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    font-size: 0.95rem;
    animation: slideIn 0.3s ease;
}

.status-message.ready { background: #d5f4e6; border-left: 4px solid var(--success-green); }
.status-message.processing { background: #fff3cd; border-left: 4px solid var(--warning-orange); }
.status-message.success { background: #d1ecf1; border-left: 4px solid #17a2b8; }
.status-message.error { background: #fadbd8; border-left: 4px solid var(--danger-red); }
.status-message.insight { background: #e8f4fd; border-left: 4px solid var(--accent-purple); }

.status-icon {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.status-text {
    flex: 1;
    color: var(--text-dark);
}

.status-time {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-left: 1rem;
}

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

/* === DASHBOARD GRID === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-left: 5px solid var(--accent-purple);
    min-height: 400px;
    position: relative;
}

.chart-container canvas {
    max-width: 100% !important;
    max-height: 350px !important;
    width: 100% !important;
    height: 300px !important;
}

.chart-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.chart-icon {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

/* === ACTION BUTTONS === */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 180px;
    justify-content: center;
}

.btn-primary { background: linear-gradient(135deg, var(--accent-purple) 0%, #764ba2 100%); color: white; }
.btn-secondary { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; }
.btn-success { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: white; }
.btn-warning { 
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); 
    color: white; 
    border-left: 4px solid #e67e22;
}

/* === NEW EXPORT BUTTON STYLES === */
.btn-danger { 
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); 
    color: white; 
    border-left: 4px solid #c0392b;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-info { 
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); 
    color: white; 
    border-left: 4px solid #2980b9;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f618d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* === QUICK EXPORT SECTION ENHANCEMENTS === */
.quick-export-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 2px solid #e1e8ed;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.quick-export-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-export-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.quick-export-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.quick-export-description {
    color: #6c757d;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* === MOBILE-FIRST RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    body {
        padding-top: 120px; /* More space for mobile header */
    }
    
    .nav-container { 
        flex-direction: column; 
        gap: 1rem; 
        padding: 1rem;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .nav-links { 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 0.5rem;
        width: 100%;
    }
    
    .nav-links a {
        padding: 0.75rem 1rem; /* Larger touch targets */
        min-width: 120px;
        text-align: center;
    }
    
    .container { 
        padding: 1rem; 
    }
    
    /* Mobile Overview */
    .overview-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .overview-subtitle {
        font-size: 1rem;
    }
    
    .overview-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .platform-modules { 
        grid-template-columns: 1fr; 
        gap: 1.5rem;
    }
    
    .module-card {
        padding: 1.5rem;
    }
    
    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .module-icon {
        font-size: 2rem;
        margin: 0;
    }
    
    /* Mobile Charts */
    .dashboard-grid { 
        grid-template-columns: 1fr; 
        gap: 1.5rem;
    }
    
    .chart-container {
        padding: 1rem;
        min-height: 300px;
    }
    
    .chart-container canvas {
        max-height: 250px !important;
        height: 250px !important;
    }
    
    /* Mobile Upload Cards */
    .upload-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .upload-card {
        padding: 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .file-input {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    /* Mobile Results */
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .result-card {
        padding: 1rem;
    }
    
    .result-value {
        font-size: 1.8rem;
    }
    
    /* Mobile Phase Headers */
    .phase-header { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 1rem; 
        text-align: left;
    }
    
    .phase-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    /* Mobile Action Buttons */
    .action-buttons { 
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .btn {
        min-width: auto;
        width: 100%;
        padding: 1rem 1.5rem; /* Larger touch targets */
        font-size: 1rem;
    }
    
    .btn-danger, .btn-info, .btn-warning {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    /* Mobile Status Panel */
    .status-panel {
        padding: 1rem;
    }
    
    .status-messages {
        max-height: 200px;
        padding: 0.75rem;
    }
    
    .status-message {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    /* Mobile Back Button */
    .back-button {
        padding: 0.75rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Mobile Results List */
    .result-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.75rem 0;
    }
    
    .result-item-name, .result-item-value {
        font-size: 0.9rem;
    }
    
    /* Mobile Recommendations */
    .recommendations-list {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .recommendations-list li {
        padding: 0.5rem 0;
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Mobile Quick Export */
    .quick-export-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .quick-export-item {
        padding: 0.75rem;
    }
}

/* === TABLET RESPONSIVE (768px - 1024px) === */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .platform-modules {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 2rem auto;
    }
    
    .upload-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .overview-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === TOUCH IMPROVEMENTS === */
@media (hover: none) and (pointer: coarse) {
    /* Touch-specific styles */
    .btn:hover {
        transform: none; /* Disable hover animations on touch */
    }
    
    .btn:active {
        transform: scale(0.98);
        background: rgba(0,0,0,0.1);
    }
    
    .upload-card:hover {
        transform: none;
    }
    
    .upload-card:active {
        transform: scale(0.98);
    }
    
    .module-card:hover {
        transform: none;
    }
    
    .module-card:active {
        transform: scale(0.98);
    }
    
    /* Larger touch targets */
    .nav-links a {
        min-height: 44px;
    }
    
    .file-input {
        min-height: 44px;
    }
}

/* === MOBILE NAVIGATION IMPROVEMENTS === */
@media (max-width: 480px) {
    .header-nav {
        padding: 0.5rem 0;
    }
    
    .nav-container {
        padding: 0.5rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .platform-status {
        font-size: 0.8rem;
        padding: 0.2rem 0.5rem;
    }
    
    .nav-links {
        gap: 0.25rem;
    }
    
    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .overview-title {
        font-size: 1.5rem;
    }
    
    .overview-metrics {
        grid-template-columns: 1fr;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .chart-title {
        font-size: 1.1rem;
    }
    
    .phase-title {
        font-size: 1.3rem;
    }
}
/* ==== Mitch BI: data tables & panels ==== */

.panel { margin: 2rem 0; }

.table-wrap {
  overflow: auto;
  border: 1px solid #e6e8eb;
  border-radius: 12px;
  background: #fff;
}

/* compact table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.table th, .table td {
  padding: .5rem .75rem;
  border-bottom: 1px solid #eef1f4;
  vertical-align: middle;
}
.table thead th {
  position: sticky;
  top: 0;
  background: #fafbfc;
  z-index: 1;
  font-weight: 600;
  color: #344054;
  text-transform: none;
}
.table tbody tr:nth-child(even) { background: #fbfcfe; }
.table tbody tr:hover { background: #f4f7fb; }

.metric-value { font-variant-numeric: tabular-nums; }

.btn {
  border-radius: 10px;
  padding: .5rem .75rem;
  border: 1px solid #d0d7de;
  background: #fff;
  cursor: pointer;
}
.btn:hover { background: #f6f8fa; }
.btn-primary {
  background: #2a5298;
  border-color: #294e90;
  color: #fff;
}
.btn-primary:hover { filter: brightness(0.95); }
.btn-secondary { background: #f3f4f6; }
.btn-secondary:hover { background: #e9ecef; }

.controls select, .controls input[type="number"] {
  padding: .35rem .5rem;
  border: 1px solid #d0d7de;
  border-radius: 8px;
}

.badge {
  display: inline-block;
  font-size: .75rem;
  padding: .15rem .4rem;
  border-radius: .4rem;
  border: 1px solid #e5e7eb;
  color: #374151;
  background: #fafafa;
}

/* === LOADING SPINNER === */
.loading-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* KPI shimmer */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
.metric-value.shimmer {
  color: transparent !important;
  border-radius: 8px;
  min-width: 6ch;
  display: inline-block;
  height: 1.4em;
  background: linear-gradient(90deg, #f2f4f7 0px, #e9eef5 40px, #f2f4f7 80px);
  background-size: 200px 100%;
  animation: shimmer 1.2s infinite linear;
}