@import 'tailwindcss';
@config "../tailwind.config.js";
@plugin "daisyui" {
    themes: light --default;
}
@plugin "daisyui/theme" {
    name: "light";
    default: true; /* set as default */

    --color-dark: #202338;
    /* Primary */
    --color-primary: #284678;
    
    --color-primary-50: #ECF1F9;
    --color-primary-100: #C6D4EC;
    --color-primary-200: #A1B8E0;
    --color-primary-300: #7B9BD3;
    --color-primary-400: #3A65AF;
    --color-primary-500: #284678;
    --color-primary-600: #25406E;
    --color-primary-700: #223B66;
    --color-primary-800: #1F365D;
    --color-primary-900: #111D33;
    --color-primary-950: #080F19;

    /* Secondary */
    --color-secondary: #287774;
    
    
    --color-secondary-50: #ECF9F8;
    --color-secondary-100: #C6ECEB;
    --color-secondary-200: #8ED9D7;
    --color-secondary-300: #55C6C3;
    --color-secondary-400: #3AAFAB;
    --color-secondary-500: #287774;
    --color-secondary-600: #226663;
    --color-secondary-700: #1F5D5B;
    --color-secondary-800: #194C4B;
    --color-secondary-900: #143B3A;
    --color-secondary-950: #0B2221;

    /* Tertiary */
    --color-tertiary-50: #F0ECF9;
    --color-tertiary-100: #D1C6EC;
    --color-tertiary-200: #A38ED9;
    --color-tertiary-300: #8568CD;
    --color-tertiary-400: #6642C0;
    --color-tertiary-500: #39256E;
    --color-tertiary-600: #39256E;
    --color-tertiary-700: #311F5D;
    --color-tertiary-800: #28194C;
    --color-tertiary-900: #1F143B;
    --color-tertiary-950: #120B22;

    /* Success */
    --color-success: #00a45c;

    /* Info */
    --color-info-50: #ECFBF0;
    --color-info-100: #C5F4D3;
    --color-info-200: #8BEAA7;
    --color-info-300: #50DF7B;
    --color-info-400: #2AD85E;
    --color-info-500: #1da144;
    --color-info-600: #1B943F;
    --color-info-700: #177D36;
    --color-info-800: #115B27;
    --color-info-900: #0D441D;
    --color-info-950: #06220F;

    /* Warning */
    --color-warning-50: #FEF5EE;
    --color-warning-100: #FCE0CB;
    --color-warning-200: #F8C196;
    --color-warning-300: #F5A262;
    --color-warning-400: #F38D3F;
    --color-warning-500: #eb700f;
    --color-warning-600: #DA660E;
    --color-warning-700: #C95F0D;
    --color-warning-800: #B9570C;
    --color-warning-900: #753707;
    --color-warning-950: #321803;

    /* Error */
    --color-error-50: #FEEDEB;
    --color-error-100: #F9B9B0;
    --color-error-200: #F69689;
    --color-error-300: #F37362;
    --color-error-400: #EF3E27;
    --color-error-500: #c9260f;
    --color-error-600: #AB1F0D;
    --color-error-700: #8E1A0B;
    --color-error-800: #721509;
    --color-error-900: #641207;
    --color-error-950: #470D05;
}

@theme {
    /* Define custom breakpoints */
    /*--breakpoint-vsm: '(min-height: 640px)';*/
    /*--breakpoint-vmd: '(min-height: 768px)';*/
    /*--breakpoint-vlg: '(min-height: 1024px)';*/
    /*--breakpoint-vxl: '(min-height: 1280px)';*/
    /*--breakpoint-v2xl: '(min-height: 1536px)';*/
    --breakpoint-mud-sm: 960px;

    --color-dark: #202338;
    /* Primary */
    --color-primary-50: #ECF1F9;
    --color-primary-100: #C6D4EC;
    --color-primary-200: #A1B8E0;
    --color-primary-300: #7B9BD3;
    --color-primary-400: #3A65AF;
    --color-primary-500: #284678;
    --color-primary-600: #25406E;
    --color-primary-700: #223B66;
    --color-primary-800: #1F365D;
    --color-primary-900: #111D33;
    --color-primary-950: #080F19;

    /* Secondary */
    --color-secondary-50: #ECF9F8;
    --color-secondary-100: #C6ECEB;
    --color-secondary-200: #8ED9D7;
    --color-secondary-300: #55C6C3;
    --color-secondary-400: #3AAFAB;
    --color-secondary-500: #287774;
    --color-secondary-600: #226663;
    --color-secondary-700: #1F5D5B;
    --color-secondary-800: #194C4B;
    --color-secondary-900: #143B3A;
    --color-secondary-950: #0B2221;

    /* Tertiary */
    --color-tertiary-50: #F0ECF9;
    --color-tertiary-100: #D1C6EC;
    --color-tertiary-200: #A38ED9;
    --color-tertiary-300: #8568CD;
    --color-tertiary-400: #6642C0;
    --color-tertiary-500: #39256E;
    --color-tertiary-600: #39256E;
    --color-tertiary-700: #311F5D;
    --color-tertiary-800: #28194C;
    --color-tertiary-900: #1F143B;
    --color-tertiary-950: #120B22;

    /* Success */
    --color-success: #00a45c;

    /* Info */
    --color-info-50: #ECFBF0;
    --color-info-100: #C5F4D3;
    --color-info-200: #8BEAA7;
    --color-info-300: #50DF7B;
    --color-info-400: #2AD85E;
    --color-info-500: #1da144;
    --color-info-600: #1B943F;
    --color-info-700: #177D36;
    --color-info-800: #115B27;
    --color-info-900: #0D441D;
    --color-info-950: #06220F;

    /* Warning */
    --color-warning-50: #FEF5EE;
    --color-warning-100: #FCE0CB;
    --color-warning-200: #F8C196;
    --color-warning-300: #F5A262;
    --color-warning-400: #F38D3F;
    --color-warning-500: #eb700f;
    --color-warning-600: #DA660E;
    --color-warning-700: #C95F0D;
    --color-warning-800: #B9570C;
    --color-warning-900: #753707;
    --color-warning-950: #321803;

    /* Error */
    --color-error-50: #FEEDEB;
    --color-error-100: #F9B9B0;
    --color-error-200: #F69689;
    --color-error-300: #F37362;
    --color-error-400: #EF3E27;
    --color-error-500: #c9260f;
    --color-error-600: #AB1F0D;
    --color-error-700: #8E1A0B;
    --color-error-800: #721509;
    --color-error-900: #641207;
    --color-error-950: #470D05;
}

@font-face {
    font-family: "SUSE";
    src: url("fonts/SUSE-Thin.ttf") format('truetype');
    font-weight: 100;
}

@font-face {
    font-family: "SUSE";
    src: url("fonts/SUSE-ExtraLight.ttf") format('truetype');
    font-weight: 200;
}

@font-face {
    font-family: "SUSE";
    src: url("fonts/SUSE-Light.ttf") format('truetype');
    font-weight: 300;
}

@font-face {
    font-family: "SUSE";
    src: url("fonts/SUSE-Regular.ttf") format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: "SUSE";
    src: url("fonts/SUSE-Medium.ttf") format('truetype');
    font-weight: 500;
}

@font-face {
    font-family: "SUSE";
    src: url("fonts/SUSE-SemiBold.ttf") format('truetype');
    font-weight: 600;
}

@font-face {
    font-family: "SUSE";
    src: url("fonts/SUSE-Bold.ttf") format('truetype');
    font-weight: 700;
}

@font-face {
    font-family: "SUSE";
    src: url("fonts/SUSE-ExtraBold.ttf") format('truetype');
    font-weight: 800;
}

html, body {
    font-family: "SUSE", sans-serif;
    font-size: 14px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "SUSE", sans-serif;
    /*color: rgba(39,44,52,1);*/
}

/* Default styles */
h1 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
}

h2 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.3;
}

h3 {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
}

h4 {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
}

h5 {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

h6 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

p {
    font-size: 14px;
}

/* Breakpoint: sm (min-width: 640px) */
/*@media (min-width: 640px) {*/
/*    h1 { font-size: 32px; }*/
/*    h2 { font-size: 28px; }*/
/*    h3 { font-size: 24px; }*/
/*    h4 { font-size: 20px; }*/
/*}*/

/*!* Breakpoint: md (min-width: 768px) *!*/
/*@media (min-width: 768px) {*/
/*    h1 { font-size: 34px; }*/
/*    h2 { font-size: 30px; }*/
/*    h3 { font-size: 26px; }*/
/*    h4 { font-size: 22px; }*/
/*}*/

/*!* Breakpoint: lg (min-width: 1024px) *!*/
/*@media (min-width: 1024px) {*/
/*    h1 { font-size: 36px; }*/
/*    h2 { font-size: 32px; }*/
/*    h3 { font-size: 28px; }*/
/*    h4 { font-size: 24px; }*/
/*}*/

/*!* Breakpoint: xl (min-width: 1280px) *!*/
/*@media (min-width: 1280px) {*/
/*    h1 { font-size: 40px; }*/
/*    h2 { font-size: 34px; }*/
/*    h3 { font-size: 30px; }*/
/*    h4 { font-size: 26px; }*/
/*    h5 { font-size: 18px; }*/
/*    h6 { font-size: 16px; }*/
/*}*/

/*!* Breakpoint: 2xl (min-width: 1536px) *!*/
/*@media (min-width: 1536px) {*/
/*    h1 { font-size: 44px; }*/
/*    h2 { font-size: 38px; }*/
/*    h3 { font-size: 32px; }*/
/*    h4 { font-size: 28px; }*/
/*    h5 { font-size: 20px; }*/
/*    h6 { font-size: 18px; }*/
/*}*/


 .widget-container {
     border: 1px solid #fafafa !important;
     border-radius: 10px !important;
     background-color: #fafafa !important;
 }

 .maplibregl-canvas {
     border-radius: 10px !important;
 }
 
 .sd-container-modern__title {
     background-color: #fafafa !important;
     box-shadow: none !important;
 }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.supply-chain-step {
    animation: slideIn 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid.grid-cols-1.xl\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .material-card {
        margin-bottom: 1rem;
    }

    .grid.grid-cols-1.md\\:grid-cols-2,
    .grid.grid-cols-1.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .w-full.max-w-7xl {
        padding: 1rem;
    }

    .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .text-2xl {
        font-size: 1.5rem;
    }
}

/* Enhanced hover effects */
.hover\\:shadow-xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Smooth transitions for all interactive elements */
button, .mud-button, .mud-icon-button {
    transition: all 0.2s ease-in-out;
}

/* Loading states */
.material-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.material-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Focus states for accessibility */
.mud-input-outlined:focus-within {
    box-shadow: 0 0 0 2px rgba(40, 70, 120, 0.2);
}

/* Custom scrollbar for better UX */
.supply-chain-tree::-webkit-scrollbar {
    width: 6px;
}

.supply-chain-tree::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.supply-chain-tree::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.supply-chain-tree::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.product-info-step {
    animation: fadeInUp 0.6s ease-out;
}

.product-info-card {
    animation: slideInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.product-info-card:nth-child(1) { animation-delay: 0.1s; }
.product-info-card:nth-child(2) { animation-delay: 0.2s; }
.product-info-card:nth-child(3) { animation-delay: 0.3s; }
.product-info-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photo-upload-area {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-upload-area:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.spec-card {
    transition: all 0.2s ease-in-out;
}

.spec-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
}

.form-field {
    transition: all 0.2s ease-in-out;
}

.form-field:focus-within {
    transform: translateY(-1px);
}

/* Brand color utilities */
.bg-primary-gradient {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
}

.bg-secondary-gradient {
    background: linear-gradient(135deg, var(--color-secondary-500), var(--color-secondary-600));
}

.bg-tertiary-gradient {
    background: linear-gradient(135deg, var(--color-tertiary-500), var(--color-tertiary-600));
}

/* Responsive improvements */
@media (max-width: 768px) {
    .w-full.max-w-4xl {
        padding: 1rem;
    }

    .grid.grid-cols-2.md\\:grid-cols-3.lg\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .text-2xl {
        font-size: 1.5rem;
    }

    .p-6 {
        padding: 1rem;
    }

    .space-y-8 > * + * {
        margin-top: 1.5rem;
    }
}

.product-hero {
    background: linear-gradient(135deg, var(--color-primary-400) 0%, var(--color-primary-700) 100%);
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.product-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.impact-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.impact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.co2-icon {
    background: linear-gradient(135deg, var(--color-tertiary-400), var(--color-tertiary-600));
}

.energy-icon {
    background: linear-gradient(135deg, var(--color-secondary-400), var(--color-secondary-600));
}

.water-icon {
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
}

.compliance-badge {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
    color: white;
    border-radius: 12px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px;
}

.feature-chip {
    background: linear-gradient(135deg, var(--color-secondary-500), var(--color-secondary-600));
    color: white;
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px;
    transition: all 0.3s ease;
}

.feature-chip:hover {
    transform: scale(1.05);
}

.positive-indicator {
    background: linear-gradient(135deg, var(--color-success), var(--color-info-600));
    color: white;
    border-radius: 12px;
    padding: 12px 20px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 4px;
}

.section-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.section-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}

#instructions h1 {
    font-size: 20px;
    font-weight: 800;
}

#instructions h2 {
    font-size: 18px;
    font-weight: 600;
}

#instructions h3 {
    font-size: 16px;
    font-weight: 600;
}

.functional-unit-badge {
    @apply inline-flex items-center gap-2 px-3 py-1.5 bg-gradient-to-r from-primary-100 to-primary-200 text-primary-800 rounded-full text-sm font-medium border border-primary-300;
    transition: all 0.2s ease-in-out;
}

.functional-unit-badge:hover {
    @apply shadow-md transform scale-105;
}

.functional-unit-badge .mud-icon {
    @apply text-primary-600;
}

/* Analysis Hero Section */
.analysis-hero {
    background: linear-gradient(135deg, var(--color-primary-400) 0%, var(--color-primary-700) 100%);
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.analysis-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

/* View mode specific styling */
.analysis-view-mode {
    animation: fadeInUp 0.6s ease-out;
}

.analysis-view-mode .impact-card {
    animation: slideInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.analysis-view-mode .impact-card:nth-child(1) { animation-delay: 0.1s; }
.analysis-view-mode .impact-card:nth-child(2) { animation-delay: 0.2s; }
.analysis-view-mode .impact-card:nth-child(3) { animation-delay: 0.3s; }

/* Responsive adjustments for view mode */
@media (max-width: 768px) {
    .analysis-hero {
        padding: 1.5rem;
    }

    .analysis-hero h1 {
        font-size: 1.75rem;
    }

    .grid.grid-cols-1.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .section-card {
        padding: 1.5rem;
    }
}

/* Step Analysis Display Styles */
.step-analysis-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.step-analysis-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.step-analysis-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.step-emission-card {
    padding: 1.5rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.step-emission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.step-emission-card.co2-card {
    background: linear-gradient(135deg, var(--color-tertiary-400), var(--color-tertiary-600));
}

.step-emission-card.energy-card {
    background: linear-gradient(135deg, var(--color-secondary-400), var(--color-secondary-600));
}

.step-emission-card.water-card {
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
}

.confidence-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.confidence-high {
    background: rgba(34, 197, 94, 0.2);
    color: rgba(34, 197, 94, 1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.confidence-medium {
    background: rgba(251, 191, 36, 0.2);
    color: rgba(251, 191, 36, 1);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.confidence-low {
    background: rgba(239, 68, 68, 0.2);
    color: rgba(239, 68, 68, 1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.step-notes-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.sources-section {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

/* Animation for step analysis cards */
.step-analysis-card {
    animation: slideInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.step-emission-card {
    animation: fadeInScale 0.3s ease-out;
    animation-fill-mode: both;
}

.step-emission-card:nth-child(1) { animation-delay: 0.1s; }
.step-emission-card:nth-child(2) { animation-delay: 0.2s; }
.step-emission-card:nth-child(3) { animation-delay: 0.3s; }

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

/* Responsive adjustments for step analysis */
@media (max-width: 768px) {
    .step-analysis-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .step-emission-card {
        padding: 1rem;
    }

    .step-analysis-header {
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }

    .step-notes-section {
        padding: 1rem;
    }
}

/* Analysis Dialog Edit Mode Styles */
.edit-mode-hero {
    background: linear-gradient(135deg, var(--color-secondary-400) 0%, var(--color-secondary-700) 100%);
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    padding: 2rem;
    margin-bottom: 2rem;
}

.edit-mode-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="editGrain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23editGrain)"/></svg>');
    opacity: 0.3;
}

.analysis-edit-mode {
    animation: fadeInUp 0.6s ease-out;
}

.material-analysis-section {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
}

.material-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.step-edit-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.step-edit-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.step-edit-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.edit-emission-card {
    padding: 1.5rem;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.edit-emission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.edit-emission-card.co2-edit-card {
    background: linear-gradient(135deg, var(--color-tertiary-400), var(--color-tertiary-600));
}

.edit-emission-card.energy-edit-card {
    background: linear-gradient(135deg, var(--color-secondary-400), var(--color-secondary-600));
}

.edit-emission-card.water-edit-card {
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
}

.edit-field-white .mud-input-root {
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px;
}

.edit-field-white .mud-input-root:hover {
    background: rgba(255, 255, 255, 1) !important;
}

.analysis-summary-field .mud-input-root {
    background: white;
    border-radius: 12px;
}

.step-edit-notes {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    margin-top: 1.5rem;
}

.notes-field .mud-input-root {
    background: #f8fafc;
    border-radius: 8px;
}

.sources-edit-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    margin-top: 1rem;
}

.sources-grid .sources-data-grid {
    border-radius: 8px;
    overflow: hidden;
}

.source-input-field .mud-input-root {
    background: #f8fafc;
    border-radius: 8px;
}

.file-upload-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    margin-top: 1rem;
}

.upload-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 2rem;
    background: #f9fafb;
    transition: all 0.3s ease;
}

.upload-dropzone:hover {
    border-color: var(--color-primary-400);
    background: var(--color-primary-50);
}

.uploaded-files-list .file-item {
    transition: all 0.2s ease;
}

.uploaded-files-list .file-item:hover {
    transform: translateX(4px);
}

.empty-files-state {
    margin-top: 1rem;
}

/* Animation for edit mode elements */
.material-analysis-section {
    animation: slideInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.step-edit-card {
    animation: fadeInScale 0.3s ease-out;
    animation-fill-mode: both;
}

.edit-emission-card {
    animation: slideInUp 0.3s ease-out;
    animation-fill-mode: both;
}

.edit-emission-card:nth-child(1) { animation-delay: 0.1s; }
.edit-emission-card:nth-child(2) { animation-delay: 0.2s; }
.edit-emission-card:nth-child(3) { animation-delay: 0.3s; }

/* Responsive adjustments for edit mode */
@media (max-width: 768px) {
    .edit-mode-hero {
        padding: 1.5rem;
    }

    .edit-mode-hero h1 {
        font-size: 1.75rem;
    }

    .material-analysis-section {
        padding: 1.5rem;
    }

    .step-edit-card {
        padding: 1.5rem;
    }

    .edit-emission-card {
        padding: 1rem;
    }

    .grid.grid-cols-1.lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    animation: gradient-move 6s ease infinite;
}

:focus {
    outline: none;
}
