/* Module 2 - Smart Reorder Engine Specific Styles */

/* Purple Header Theme */
.header-purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

/* Module Navigation */
.module-nav {
    background: var(--color-gray-100);
    padding: 1rem 2rem;
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--color-gray-200);
}

.module-nav a {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--color-gray-700);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.module-nav a:hover {
    background: white;
    color: var(--color-purple);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.module-nav a.active {
    background: var(--color-purple);
    color: white;
}

/* Badge Link */
.badge-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.badge-link:hover {
    background: white;
    color: var(--color-purple);
}

.badge-purple {
    background: var(--color-purple);
    color: white;
}

/* User Roles */
.user-roles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.role-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

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

.role-secondary {
    border-color: var(--color-gray-300);
}

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

.role-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.role-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
}

.role-card p {
    color: var(--color-gray-600);
    font-size: 0.95rem;
}

/* User Goals */
.user-goals {
    padding: 3rem 2rem;
    background: var(--color-gray-50);
}

.goals-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 0;
}

@media (max-width: 1200px) {
    .goals-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .goals-container {
        grid-template-columns: 1fr;
    }
}

.goal-card {
    background: white;
    padding: 1.75rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.goal-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.goal-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.goal-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
}

.goal-card p {
    font-size: 0.9rem;
    color: var(--color-gray-600);
    line-height: 1.5;
    margin: 0;
}

/* Stage Colors for Module 2 */
:root {
    --color-teal: #14B8A6;
    --color-indigo: #6366F1;
}

.stage-purple {
    border-left-color: var(--color-purple);
}

.stage-purple::before {
    background: var(--color-purple);
}

.stage-purple .stage-number {
    background: linear-gradient(135deg, var(--color-purple) 0%, #7C3AED 100%);
}

.stage-teal {
    border-left-color: var(--color-teal);
}

.stage-teal::before {
    background: var(--color-teal);
}

.stage-teal .stage-number {
    background: linear-gradient(135deg, var(--color-teal) 0%, #0D9488 100%);
}

.stage-orange {
    border-left-color: var(--color-orange);
}

.stage-orange::before {
    background: var(--color-orange);
}

.stage-orange .stage-number {
    background: linear-gradient(135deg, var(--color-orange) 0%, #EA580C 100%);
}

.stage-indigo {
    border-left-color: var(--color-indigo);
}

.stage-indigo::before {
    background: var(--color-indigo);
}

.stage-indigo .stage-number {
    background: linear-gradient(135deg, var(--color-indigo) 0%, #4F46E5 100%);
}

/* Stage Steps Detailed */
.stage-steps-detailed {
    color: var(--color-gray-700);
    font-size: 0.95rem;
    line-height: 1.6;
}

.stage-steps-detailed p {
    margin: 0.75rem 0;
}

.stage-steps-detailed strong {
    color: var(--color-gray-900);
    font-weight: 600;
}

.stage-steps-detailed ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.stage-steps-detailed li {
    padding: 0.25rem 0;
}

.stage-steps-detailed em {
    color: var(--color-gray-600);
    font-size: 0.9rem;
}

/* Logic Detailed Section */
.logic-detailed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.logic-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.logic-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 1.5rem;
}

.logic-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.logic-section li {
    padding: 0.75rem 1rem;
    background: var(--color-gray-50);
    border-radius: 8px;
    padding-left: 2.5rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--color-gray-700);
    line-height: 1.6;
}

.logic-section li::before {
    content: '✓';
    position: absolute;
    left: 1rem;
    color: var(--color-green);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Formula Section */
.formula-section {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 2px solid #BAE6FD;
}

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

.formula-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.formula-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 1rem;
}

.formula-card code {
    display: block;
    background: var(--color-gray-900);
    color: #10B981;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
}

/* Data Dependencies */
.data-dependencies {
    padding: 3rem 2rem;
    background: var(--color-gray-50);
}

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

.dependency-card {
    background: white;
    padding: 1.75rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.dependency-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 1rem;
}

.dependency-card ul {
    list-style: none;
    margin: 0;
}

.dependency-card li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.875rem;
    color: var(--color-gray-700);
    line-height: 1.5;
}

.dependency-card li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-purple);
    font-weight: 700;
}

/* UI Elements Section */
.ui-elements {
    padding: 3rem 2rem;
}

.ui-showcase {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.ui-category {
    background: white;
    padding: 1.75rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.ui-category h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 1.5rem;
}

.ui-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ui-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-gray-50);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.ui-item:hover {
    background: var(--color-gray-100);
    transform: translateX(8px);
}

.ui-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.ui-item strong {
    display: block;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0.25rem;
}

.ui-item p {
    font-size: 0.9rem;
    color: var(--color-gray-600);
    line-height: 1.6;
}

/* Alert Examples */
.alert-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.alert-item span {
    font-size: 1.5rem;
}

.alert-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border: 2px solid #F59E0B;
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 2px solid #EF4444;
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border: 2px solid #3B82F6;
}

.alert-review {
    background: #F3E8FF;
    color: #6B21A8;
    border: 2px solid #8B5CF6;
}

/* Color States */
.color-states {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.state-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--color-gray-50);
    border-radius: 12px;
}

.state-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.state-green .state-indicator {
    background: var(--color-green);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.state-amber .state-indicator {
    background: var(--color-yellow);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
}

.state-red .state-indicator {
    background: var(--color-red);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.state-item strong {
    display: block;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0.25rem;
}

.state-item p {
    font-size: 0.9rem;
    color: var(--color-gray-600);
}

/* Footer Preview */
.footer-preview {
    background: var(--color-gray-50);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px dashed var(--color-gray-300);
}

.summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-item strong {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-gray-900);
}

.summary-item span {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    font-weight: 600;
}

.summary-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.btn-primary:hover {
    background: #7C3AED;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: var(--color-gray-200);
    color: var(--color-gray-700);
}

.btn-secondary:hover {
    background: var(--color-gray-300);
    transform: translateY(-2px);
}

/* UX Notes */
.ux-notes {
    padding: 3rem 2rem;
    background: var(--color-gray-50);
}

.ux-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1200px) {
    .ux-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ux-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--color-purple);
    transition: all 0.3s ease;
}

.ux-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    border-left-width: 6px;
}

.ux-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 0.5rem;
}

.ux-card p {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    line-height: 1.5;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .module-nav {
        flex-direction: column;
    }

    .user-roles,
    .formula-grid,
    .dependencies-grid,
    .alert-examples,
    .ux-grid {
        grid-template-columns: 1fr;
    }

    .summary-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .summary-actions {
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        flex: 1;
    }
    
    .stage-header h3 {
        font-size: 1rem;
    }
}
