/* Progress Monitor - Main Styles */

/* Import Tailwind base styles */
@import url('https://cdn.tailwindcss.com');

/* Custom CSS Variables - Alchimica Brand Colors */
:root {
    --bg-default: #100937;
    --primary: #2c5fe9;
    --secondary: #1fe1d4;
    --accent-1: #5b0abc;
    --accent-2: #c044e6;
    --accent-3: #fcca49;
    --accent-4: #f54071;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
}

/* Font Family */
.font-manrope {
    font-family: 'Manrope', sans-serif;
}

/* Background and Brand Colors */
.bg-brand {
    background-color: var(--bg-default);
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-accent-3 {
    color: var(--accent-3);
}

.border-primary {
    border-color: var(--primary);
}

.bg-primary {
    background-color: var(--primary);
}

/* Gradient Backgrounds */
.primary-gradient {
    background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 100%);
}

.warm-gradient {
    background: linear-gradient(45deg, var(--accent-3) 0%, var(--accent-4) 100%);
}

.violet-gradient {
    background: linear-gradient(60deg, var(--accent-1) 0%, var(--accent-2) 100%);
}

.success-gradient {
    background: linear-gradient(45deg, var(--success) 0%, #10b981 100%);
}

.card-gradient {
    background: linear-gradient(135deg, rgba(44, 95, 233, 0.1) 0%, rgba(31, 225, 212, 0.05) 100%);
    border: 1px solid rgba(44, 95, 233, 0.2);
}

/* Geometric Decorative Shapes */
.geometric-shape {
    position: absolute;
    border-radius: 20px;
    filter: blur(1px);
    z-index: 1;
}

.shape-1 {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    width: 120px;
    height: 80px;
    top: 10%;
    right: 15%;
    transform: rotate(25deg);
}

.shape-2 {
    background: linear-gradient(60deg, var(--accent-1), var(--accent-2));
    width: 60px;
    height: 60px;
    border-radius: 50%;
    top: 60%;
    right: 8%;
}

.shape-3 {
    background: linear-gradient(45deg, var(--accent-3), var(--accent-4));
    width: 80px;
    height: 120px;
    bottom: 15%;
    left: 10%;
    transform: rotate(-15deg);
}

/* Progress Bars */
.progress-bar-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease-in-out;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Status Cards */
.status-card {
    background: rgba(44, 95, 233, 0.1);
    border: 1px solid rgba(44, 95, 233, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.status-card:hover {
    border-color: rgba(44, 95, 233, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(44, 95, 233, 0.2);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 95, 233, 0.3);
    border: none;
    border-radius: 0.75rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 95, 233, 0.4);
}

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

/* Upload Area */
.upload-area {
    border: 2px dashed var(--primary);
    background: rgba(44, 95, 233, 0.05);
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    cursor: pointer;
}

.upload-area:hover {
    background: rgba(44, 95, 233, 0.1);
    border-color: var(--secondary);
}

.upload-area.drag-over {
    background: rgba(31, 225, 212, 0.1) !important;
    border-color: var(--secondary) !important;
    transform: scale(1.02);
}

/* Connection Status Indicator */
.connection-indicator {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    backdrop-filter: blur(10px);
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.connection-dot.connected {
    background-color: var(--success);
}

.connection-dot.connecting {
    background-color: var(--warning);
}

.connection-dot.disconnected {
    background-color: var(--error);
}

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

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.1) 25%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0.1) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    display: block;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Division Breakdown */
.division-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.division-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.division-name {
    color: rgba(255, 255, 255, 0.9);
}

.division-count {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .geometric-shape {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .connection-indicator {
        top: auto;
        bottom: 1rem;
        right: 1rem;
    }
    
    .shape-1,
    .shape-2,
    .shape-3 {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .status-card {
        background: rgba(44, 95, 233, 0.15);
        border-color: rgba(44, 95, 233, 0.25);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .geometric-shape {
        filter: none;
    }
}

/* Focus states */
button:focus,
input:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .geometric-shape,
    .connection-indicator,
    button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}