/* Modern 3PL Tracking Analyzer Styles - Inspired by Reference Design */

:root {
    /* Color Palette - Purple Gradient Theme */
    --primary-gradient: linear-gradient(135deg, #5a5afc 0%, #1919c0 50%, #1616bed0 100%);
    --secondary-gradient: linear-gradient(135deg, #5a5afc 0%, #0202eb 50%,#1a1ae2 100%);
    --primary-color: #00008B;
    --primary-light: #1f1fcc;
    --primary-dark: #00008B;
    
    /* Accent Colors */
    --success-color: #10B981;
    --success-light: #34D399;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background: var(--primary-gradient);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
}

/* Main Container */
.main-container {
    min-height: 100vh;
    padding: 2rem 0;
}

/* Header Section */
.header-section {
    text-align: center;
    padding: 2rem 1rem;
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    background: var(--success-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.875rem;
    box-shadow: var(--shadow-lg);
}

.status-indicator i {
    margin-right: 0.5rem;
}

/* Main Card */
.main-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Choice Card */
.choice-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 3rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Results Card */
.results-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Button Styles */
.btn-primary-gradient {
    background: var(--secondary-gradient);
    text-decoration-color: var(--white);
    border: none;
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.btn-primary-gradient:disabled {
    cursor: not-allowed;
    color: var(--white);
    filter: grayscale(70%)
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: var(--white);
}

/* Upload Section */
.upload-section {
    text-align: center;
}

.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: var(--gray-50);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(107, 70, 193, 0.05);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(107, 70, 193, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.upload-description {
    color: var(--gray-600);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-status {
    background: var(--info-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-block;
    margin-top: 1rem;
}

/* Period Input */
.period-input-section {
    margin-bottom: 2rem;
    text-align: left;
}

.modern-input {
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.1);
}

/* Buttons */
.main-action-btn {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
}

.main-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.main-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.secondary-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.secondary-btn {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.secondary-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
}

.secondary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Info Section */
.info-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
    text-align: left;
}

.info-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.info-steps {
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.info-steps li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.requirements-section {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--warning-color);
}

.requirements-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.requirement-item {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-size: 0.875rem;
}

/* Configuration Section */
.config-section {
    margin-top: 2rem;
    border-top: 1px solid var(--gray-200);
    padding-top: 2rem;
}

.config-toggle {
    width: 100%;
    background: var(--gray-100);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-align: left;
}

.config-toggle:hover {
    background: var(--gray-200);
}

.config-content {
    padding: 2rem 0;
}

.config-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: block;
}

.config-textarea {
    width: 100%;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.config-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.config-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.config-btn {
    background: var(--white);
    color: var(--gray-600);
    border: 2px solid var(--gray-300);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.config-btn:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

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

.config-btn.primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Results and Info Cards */
.results-card, .info-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.results-title, .info-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

/* Metric Cards */
.metric-card {
    background: var(--primary-gradient);
    color: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Carrier Metrics */
.carrier-metric {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.carrier-metric:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.carrier-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.carrier-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

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

.stat-value {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Performance Badges */
.performance-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.performance-excellent { background: var(--success-color); color: var(--white); }
.performance-good { background: var(--info-color); color: var(--white); }
.performance-fair { background: var(--warning-color); color: var(--white); }
.performance-needs-improvement { background: var(--danger-color); color: var(--white); }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    color: var(--white);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-text {
    font-size: 1.125rem;
    font-weight: 500;
}

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

/* Toast Notifications */
.modern-toast {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
}

.toast-icon.bi-check-circle-fill { color: var(--success-color); }
.toast-icon.bi-exclamation-triangle-fill { color: var(--warning-color); }
.toast-icon.bi-exclamation-circle-fill { color: var(--danger-color); }
.toast-icon.bi-info-circle-fill { color: var(--info-color); }
/* Toast container layering */
.toast-container { z-index: 11000; }

/* Footer */
.modern-footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer-text {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.footer-address {
    margin: 0;
    opacity: 0.8;
    font-size: 0.875rem;
}

/* File Info Grid */
.file-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-item {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.info-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Exception Items */
.exception-item {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--warning-color);
}

.exception-type {
    font-weight: 600;
    color: var(--gray-800);
}

.exception-count {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .main-subtitle {
        font-size: 1rem;
    }
    
    .main-card, .choice-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .secondary-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .secondary-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .carrier-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .config-actions {
        flex-direction: column;
    }
    
    .config-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

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

/* Smooth Transitions */
* {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

