/* ==========================================
   NEW FILE: docs/css/awde-main.css
   Main Dashboard and Shared System Styles
   ========================================== */

/* ==========================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ========================================== */

:root {
    /* Primary Colors */
    --awde-primary: #3b82f6;
    --awde-primary-light: #60a5fa;
    --awde-primary-dark: #2563eb;
    
    /* Secondary Colors */
    --awde-secondary: #1e293b;
    --awde-secondary-light: #334155;
    --awde-secondary-dark: #0f172a;
    
    /* Accent Colors */
    --awde-success: #10b981;
    --awde-warning: #f59e0b;
    --awde-error: #ef4444;
    --awde-info: #06b6d4;
    
    /* Gray Scale */
    --awde-gray-50: #f8fafc;
    --awde-gray-100: #f1f5f9;
    --awde-gray-200: #e2e8f0;
    --awde-gray-300: #cbd5e1;
    --awde-gray-400: #94a3b8;
    --awde-gray-500: #64748b;
    --awde-gray-600: #475569;
    --awde-gray-700: #334155;
    --awde-gray-800: #1e293b;
    --awde-gray-900: #0f172a;
    
    /* Typography */
    --awde-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --awde-font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    
    /* Font Sizes */
    --awde-text-xs: 0.75rem;
    --awde-text-sm: 0.875rem;
    --awde-text-base: 1rem;
    --awde-text-lg: 1.125rem;
    --awde-text-xl: 1.25rem;
    --awde-text-2xl: 1.5rem;
    --awde-text-3xl: 1.875rem;
    --awde-text-4xl: 2.25rem;
    
    /* Spacing */
    --awde-space-1: 0.25rem;
    --awde-space-2: 0.5rem;
    --awde-space-3: 0.75rem;
    --awde-space-4: 1rem;
    --awde-space-5: 1.25rem;
    --awde-space-6: 1.5rem;
    --awde-space-8: 2rem;
    --awde-space-10: 2.5rem;
    --awde-space-12: 3rem;
    
    /* Shadows */
    --awde-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --awde-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --awde-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ==========================================
   GLOBAL RESET AND BASE STYLES
   ========================================== */

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

html {
    font-size: 16px;
    line-height: 1.5;
    scroll-behavior: smooth;
}

body {
    font-family: var(--awde-font-family);
    font-size: var(--awde-text-base);
    color: var(--awde-gray-900);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ==========================================
   MAIN DASHBOARD LAYOUT
   ========================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px 0;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--awde-shadow-lg);
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6, #2563eb);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback for browsers that don't support background-clip */
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.header p {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================
   DASHBOARD SECTIONS
   ========================================== */

.phase-section,
.tool-section {
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.phase-section h2,
.tool-section h2 {
    color: #f1f5f9;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* ==========================================
   DASHBOARD PHASE GRID
   ========================================== */

.phase-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.phase-item {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    color: white;
    text-decoration: none;
}

.phase-item.completed {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.phase-item.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    animation: pulse-active 2s infinite;
}

.phase-item.pending {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border-color: #6b7280;
}

.phase-item:hover {
    transform: translateY(-2px);
}

@keyframes pulse-active {
    0%, 100% { box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 4px 20px rgba(59, 130, 246, 0.6); }
}

/* ==========================================
   PHASE INFO GRID
   ========================================== */

.phase-info {
    margin-top: 20px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.phase-info h4 {
    color: #f1f5f9;
    margin-bottom: 15px;
    font-size: 1rem;
}

.phase-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.phase-info-grid div {
    color: #cbd5e1;
    font-size: 0.9rem;
}

.phase-info-grid strong {
    color: #f1f5f9;
}

#currentOutputDir {
    color: #60a5fa;
    font-weight: 500;
}

/* ==========================================
   TOOL CARDS
   ========================================== */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.tool-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.tool-card:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

.tool-card h3 {
    color: #f1f5f9;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.tool-card p {
    color: #94a3b8;
    margin-bottom: 15px;
    line-height: 1.5;
}

.tool-card .tool-meta {
    font-size: 0.85rem;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==========================================
   QUICK ACTIONS
   ========================================== */

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

.quick-action {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: #3b82f6;
    font-weight: 500;
}

.quick-action:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    transform: translateY(-1px);
}

/* ==========================================
   FOOTER STYLES
   ========================================== */

.footer {
    margin-top: 50px;
    padding: 30px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    text-align: center;
}

.footer p {
    color: #cbd5e1;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.version-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.version-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.version-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.version-text {
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .phase-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .tool-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .version-info {
        grid-template-columns: 1fr;
    }
    
    .phase-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .phase-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .phase-item {
        font-size: 0.8rem;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .phase-section,
    .tool-section {
        padding: 20px;
    }
    
    .footer {
        padding: 20px;
    }
}