/* Module 7 - Reporting & Insights Specific Styles */

/* Emerald Header Theme */
.header-emerald {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

:root {
    --module7-primary: #10B981;
    --module7-primary-dark: #059669;
    --module7-primary-light: #6EE7B7;
    
    /* Stage Colors */
    --stage-emerald: #10B981;
    --stage-blue: #3B82F6;
    --stage-purple: #8B5CF6;
    --stage-orange: #F97316;
    --stage-indigo: #6366F1;
    
    /* Metric Colors */
    --metric-gp: #10B981;
    --metric-cogs: #F97316;
    --metric-waste: #EF4444;
    --metric-dishes: #F59E0B;
}

/* Badge Styles */
.badge-emerald {
    background: rgba(16, 185, 129, 0.2);
    color: #059669;
    font-weight: 700;
}

.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(--module7-primary);
}

/* ===================================
   USER GOALS
   =================================== */

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

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

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

.goal-card {
    background: white;
    border-radius: 12px;
    padding: 1.75rem !important;
    border-left: 4px solid var(--module7-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.goal-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

.goal-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.goal-card h4 {
    color: #1F2937;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.5;
}

.goal-card p {
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* ===================================
   USER ROLES
   =================================== */

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

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

@media (max-width: 640px) {
    .roles-grid {
        grid-template-columns: 1fr;
    }
}

.role-item {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid var(--module7-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.role-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.role-badge.primary {
    background: #D1FAE5;
    color: #059669;
}

.role-badge.secondary {
    background: #FEF3C7;
    color: #92400E;
}

.role-item h4 {
    color: #1F2937;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.role-item p {
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* ===================================
   KEY METRICS
   =================================== */

.key-metrics {
    margin: 3rem 0;
}

.section-description {
    color: #6B7280;
    font-size: 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.metrics-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

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

@media (max-width: 640px) {
    .metrics-display {
        grid-template-columns: 1fr;
    }
}

.metric-box {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.metric-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.metric-gp {
    border-left-color: var(--metric-gp);
}

.metric-cogs {
    border-left-color: var(--metric-cogs);
}

.metric-waste {
    border-left-color: var(--metric-waste);
}

.metric-dishes {
    border-left-color: var(--metric-dishes);
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    margin-bottom: 0.75rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.metric-gp .metric-value {
    color: var(--metric-gp);
}

.metric-cogs .metric-value {
    color: var(--metric-cogs);
}

.metric-waste .metric-value {
    color: var(--metric-waste);
}

.metric-dishes .metric-value {
    color: var(--metric-dishes);
}

.metric-trend {
    font-size: 0.875rem;
    font-weight: 600;
}

.metric-trend.positive {
    color: #10B981;
}

.metric-trend.negative {
    color: #EF4444;
}

.metric-trend.neutral {
    color: #6B7280;
}

/* ===================================
   WORKFLOW STAGES - STAGE COLORS
   =================================== */

.stage-emerald {
    border-left-color: var(--stage-emerald) !important;
}

.stage-emerald .stage-number {
    background: var(--stage-emerald) !important;
}

.stage-emerald .stage-header h3 {
    color: var(--stage-emerald) !important;
}

.stage-blue {
    border-left-color: var(--stage-blue) !important;
}

.stage-blue .stage-number {
    background: var(--stage-blue) !important;
}

.stage-blue .stage-header h3 {
    color: var(--stage-blue) !important;
}

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

.stage-purple .stage-number {
    background: var(--stage-purple) !important;
}

.stage-purple .stage-header h3 {
    color: var(--stage-purple) !important;
}

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

.stage-orange .stage-number {
    background: var(--stage-orange) !important;
}

.stage-orange .stage-header h3 {
    color: var(--stage-orange) !important;
}

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

.stage-indigo .stage-number {
    background: var(--stage-indigo) !important;
}

.stage-indigo .stage-header h3 {
    color: var(--stage-indigo) !important;
}

/* ===================================
   DASHBOARD VIEWS
   =================================== */

.dashboard-views-section {
    margin: 3rem 0;
}

.views-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 968px) {
    .views-layout {
        grid-template-columns: 1fr;
    }
}

.view-box {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--module7-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.view-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.view-header h3 {
    color: #1F2937;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.view-badge {
    display: inline-block;
    background: var(--module7-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.view-purpose {
    color: #374151;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.view-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.view-features li {
    color: #6B7280;
    font-size: 0.875rem;
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.view-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--module7-primary);
    font-weight: 700;
}

/* ===================================
   SYSTEM LOGIC
   =================================== */

.logic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 968px) {
    .logic-grid {
        grid-template-columns: 1fr;
    }
}

.logic-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--module7-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.logic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

.logic-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.logic-card h4 {
    color: #1F2937;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.logic-card code {
    display: block;
    background: #F3F4F6;
    color: #374151;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    margin-bottom: 1rem;
    font-weight: 600;
}

.logic-example {
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.logic-example strong {
    color: #1F2937;
}

/* ===================================
   DATA DEPENDENCIES
   =================================== */

.dependencies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

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

@media (max-width: 640px) {
    .dependencies-grid {
        grid-template-columns: 1fr;
    }
}

.dependency-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    border-left: 4px solid var(--module7-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.dependency-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

.dependency-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.dependency-card h4 {
    color: #1F2937;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dependency-card p {
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* ===================================
   UI ELEMENTS
   =================================== */

.ui-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

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

@media (max-width: 640px) {
    .ui-grid {
        grid-template-columns: 1fr;
    }
}

.ui-item {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    border-left: 4px solid var(--module7-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.ui-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.12);
}

.ui-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.ui-item h4 {
    color: #1F2937;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.ui-item p {
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* ===================================
   UX DESIGN GUIDELINES
   =================================== */

.ux-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

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

@media (max-width: 640px) {
    .ux-cards-grid {
        grid-template-columns: 1fr;
    }
}

.ux-card {
    background: white;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    border-left: 4px solid var(--module7-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.ux-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

.ux-card h4 {
    color: var(--module7-primary);
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.5;
}

.ux-card p {
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   PROCESS FLOW
   =================================== */

.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

@media (max-width: 968px) {
    .flow-diagram {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
}

.flow-step {
    flex: 1;
    min-width: 150px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--module7-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.flow-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--module7-primary);
    color: white;
    font-weight: 700;
    line-height: 32px;
    margin-bottom: 0.75rem;
}

.flow-step h4 {
    color: var(--module7-primary);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.flow-step p {
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.flow-arrow {
    color: var(--module7-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

/* ===================================
   INTERACTIVE DASHBOARD DEMO
   =================================== */

.interactive-dashboard {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--module7-primary);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-title {
    color: var(--module7-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--module7-primary);
    background: white;
    color: var(--module7-primary);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.toggle-btn:hover:not(.active) {
    background: #D1FAE5;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

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

@media (max-width: 640px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.mini-metric {
    background: #F9FAFB;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.mini-metric-label {
    font-size: 0.75rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.mini-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1F2937;
}

/* ===================================
   EXPORT OPTIONS
   =================================== */

.export-section {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.export-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.export-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.export-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.export-btn.primary:hover {
    background: var(--module7-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.export-btn.secondary {
    background: white;
    color: #374151;
    border: 2px solid #E5E7EB;
}

.export-btn.secondary:hover {
    background: #F3F4F6;
    border-color: var(--module7-primary);
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.metric-card,
.view-card,
.formula-card {
    animation: fadeInScale 0.5s ease-out;
}

/* ===================================
   RESPONSIVE ADJUSTMENTS
   =================================== */

@media (max-width: 768px) {
    .key-metrics-showcase,
    .dashboard-views,
    .formula-breakdown {
        padding: 2rem 1.5rem;
    }
    
    .metric-card,
    .view-card {
        padding: 1.5rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .export-section {
        flex-direction: column;
        align-items: flex-start;
    }
}
