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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    color: #1a202c;
}

.header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 1rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

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

.logo {
    height: 40px;
    width: auto;
}

.brand-text {
    color: white;
}

.brand-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-text p {
    font-size: 0.875rem;
    color: #cbd5e1;
    margin-top: 0.25rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.welcome-section p {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

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

.module-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
}

.module-card.production::before { --accent-color: #3b82f6; }
.module-card.inventory::before { --accent-color: #10b981; }
.module-card.haul::before { --accent-color: #f59e0b; }
.module-card.quality::before { --accent-color: #ef4444; }
.module-card.fab::before { --accent-color: #8b5cf6; }
.module-card.design::before { --accent-color: #06b6d4; }

.module-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
}

.module-card.production .module-icon { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
.module-card.inventory .module-icon { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.module-card.haul .module-icon { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.module-card.quality .module-icon { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.module-card.fab .module-icon { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }
.module-card.design .module-icon { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); }

.module-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.module-description {
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.module-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-development {
    background: #fef3c7;
    color: #92400e;
}

.status-planning {
    background: #e0e7ff;
    color: #3730a3;
}

.integration-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

.integration-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.integration-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.integration-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
}

.integration-text {
    flex: 1;
}

.integration-text h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.integration-text p {
    font-size: 0.75rem;
    color: #64748b;
}

.footer {
    background: #1e293b;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.footer-section p,
.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover {
    color: #f1f5f9;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .welcome-section h2 {
        font-size: 1.75rem;
    }

    .integration-grid {
        grid-template-columns: 1fr;
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #059669;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}

.notification.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Auth Processing Overlay */
.auth-processing {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-processing.active {
    opacity: 1;
    visibility: visible;
}

.auth-processing-content {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 400px;
}

.auth-processing-content h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.auth-processing-content p {
    color: #64748b;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.loading {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* Hide main content during auth */
.auth-loading .header,
.auth-loading .main-container,
.auth-loading .footer {
    opacity: 0.3;
    pointer-events: none;
}

.auth-status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    z-index: 1000;
    display: none;
}

.auth-status.show {
    display: block;
}