/* The Factory - Dashboard Styles */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --border: #e5e7eb;
    --bg: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --success: #16a34a;
    --warning: #f59e0b;
    --error: #dc2626;
    --radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.dashboard-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.header-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.btn-text:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

/* Main Content */
.dashboard-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 32px;
}

.welcome-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--text-light);
    font-size: 16px;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.status-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.status-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

.status-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.status-label {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.status-detail {
    font-size: 12px;
    color: var(--text-lighter);
}

.status-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.status-link:hover {
    color: var(--primary-hover);
}

/* Onboarding Stages */
.onboarding-stages {
    margin-bottom: 40px;
}

.onboarding-stages h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 24px;
}

.stages-container {
    display: grid;
    gap: 16px;
}

.stage-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.stage-card:hover {
    box-shadow: var(--shadow);
}

.stage-card.completed {
    background: #f0fdf4;
    border-color: var(--success);
}

.stage-header {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.stage-checkbox {
    width: 24px;
    height: 24px;
    cursor: default;
}

.stage-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.stage-reward {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.stage-btn {
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.stage-btn:hover {
    background: var(--primary-hover);
}

.stage-btn:disabled {
    background: var(--border);
    color: var(--text-light);
    cursor: not-allowed;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 40px;
}

.quick-actions h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.action-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    display: block;
}

.action-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.action-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.action-card p {
    font-size: 14px;
    color: var(--text-light);
}

/* Announcements */
.announcements {
    margin-bottom: 40px;
}

.announcements h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.announcement-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    border-left: 4px solid var(--primary);
}

.announcement-date {
    font-size: 12px;
    color: var(--text-lighter);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.announcement-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.announcement-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 80px 20px;
}

.error-state p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 16px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

/* Footer */
.dashboard-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 12px 16px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .dashboard-main {
        padding: 24px 16px;
    }
    
    .welcome-section h2 {
        font-size: 24px;
    }
    
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text: #f9fafb;
        --text-light: #9ca3af;
        --text-lighter: #6b7280;
        --border: #374151;
        --bg: #1f2937;
        --bg-secondary: #111827;
        --bg-tertiary: #1f2937;
    }
}
