/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Aluminum Industry Color Palette - Match index.html exactly */
    --primary-color: #7d7d7d; /* Silver/Gray - from index.html */
    --primary-light: #a8a8a8;
    --primary-dark: #565656;
    --secondary-color: #8b4513; /* Bauxite Brown - from index.html */
    --text-color: #2c3e50;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    
    /* Additional colors for Scope 2 */
    --accent-blue: #4682B4;
    --accent-green: #4CAF50;
    --accent-red: #E74C3C;
    --accent-orange: #FF9800;
    
    --text-dark: #333333;
    --text-light: #666666;
    --text-white: #FFFFFF;
    
    --bg-light: #F5F7FA;
    --bg-gray: #E8ECEF;
    
    --border-light: #E0E0E0;
    --border-medium: #CCCCCC;
    
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-heavy: 0 8px 16px rgba(0,0,0,0.15);
    
    --border-radius: 8px;
    --border-radius-sm: 4px;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Styles - Match index.html exactly */
/* Navigation Styles - Match index.html exactly */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding: 0;
    margin: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

.nav-logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    flex: 1;
    justify-content: center;
    margin: 0 20px;
}

.nav-item {
    margin: 0;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: var(--transition);
    white-space: nowrap;
}

.user-profile:hover {
    background-color: rgba(125, 125, 125, 0.1);
}

.user-profile i:first-child {
    margin-right: 8px;
    font-size: 1.5rem;
}

.user-profile span {
    margin: 0 8px;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.logout-btn:hover {
    background-color: rgba(125, 125, 125, 0.1);
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    flex-shrink: 0;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section - Match index.html exactly */
/* Hero Section - Background Color Correction */
.hero {
    background: var(--light-bg); /* Changed to match background color */
    color: var(--text-color); /* Added for proper text contrast */
    padding: 60px 0;
}

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

/* Hero Section - Font Color Correction */
/* Hero Section - Full Width */
.hero {
    background: var(--light-bg);
    color: var(--text-color);
    padding: 60px 0;
    width: 100%; /* Ensure full width */
    margin: 0; /* Remove any margins */
}

/* Remove the container from hero section */
.hero .container {
    max-width: none; /* Remove max-width constraint */
    margin: 0; /* Remove auto centering */
    padding: 0; /* Remove padding */
    width: 100%; /* Full width */
}

.hero-content {
    max-width: 1200px; /* Constrain content width */
    margin: 0 auto; /* Center content */
    padding: 0 20px; /* Add padding only to content */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Ensure it takes full available width */
}

/* Hero Section - Font Color Correction */
.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    max-width: 600px;
    opacity: 0.9;
    color: var(--text-color);
}

.page-actions {
    display: flex;
    gap: 15px;
}

/* Rest of your existing hero styles remain the same */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.hero-visual {
    flex: 0 0 300px;
}

.aluminum-visual {
    position: relative;
    height: 200px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* ... rest of your aluminum visual styles ... */

.aluminum-ingot, .aluminum-extrusion, .aluminum-oxide {
    position: absolute;
    border-radius: 4px;
}

.aluminum-ingot {
    width: 80px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    top: 50px;
    left: 50px;
    box-shadow: var(--shadow-medium);
}

.aluminum-extrusion {
    width: 120px;
    height: 20px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
    top: 80px;
    left: 100px;
    transform: rotate(15deg);
    box-shadow: var(--shadow-light);
}

.aluminum-oxide {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), #A0522D);
    top: 30px;
    right: 50px;
    border-radius: 50%;
    box-shadow: var(--shadow-medium);
}

/* Scope 2 Layout */
.scope2-main {
    padding: 40px 0;
}

.scope2-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

/* Sidebar Styles */
.scope2-sidebar {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--primary-bauxite);
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
}

.category-nav {
    list-style: none;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.category-item:hover {
    background-color: var(--bg-gray);
}

.category-item.active {
    background-color: rgba(132, 135, 137, 0.1);
    border-left-color: var(--primary-aluminum);
    color: var(--primary-bauxite);
    font-weight: 500;
}

.category-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: var(--primary-aluminum);
}

.category-item.active i {
    color: var(--primary-bauxite);
}

.category-item span:first-of-type {
    flex: 1;
}

.emission-badge {
    background-color: var(--bg-gray);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.category-item.active .emission-badge {
    background-color: var(--primary-aluminum);
    color: var(--text-white);
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 15px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.action-btn:hover {
    background-color: var(--primary-silver);
    color: var(--text-white);
}

.action-btn i {
    margin-right: 8px;
}

.total-emissions {
    text-align: center;
    padding: 20px;
    background: #f8f9fa; /* Grey background */
    border-radius: var(--border-radius);
    color: var(--text-dark); /* Changed to dark text for contrast */
    border: 1px solid #e9ecef; /* Optional: add border for definition */
}

.total-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.total-label {
    font-size: 1rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.total-change {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.total-change.positive {
    color: var(--accent-green);
}

.total-change.negative {
    color: var(--accent-red);
}

.total-change i {
    margin-right: 5px;
}

.renewable-mix {
    display: flex;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: var(--border-radius);
}

/* Main Content Styles */
.scope2-content {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.energy-category {
    display: none;
    padding: 30px;
}

.energy-category.active {
    display: block;
}

.category-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.category-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary-bauxite);
    display: flex;
    align-items: center;
}

.category-header h2 i {
    margin-right: 10px;
    color: var(--primary-aluminum);
}

.category-header p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.category-stats {
    display: flex;
    gap: 30px;
}

.stat {
    text-align: center;
    padding: 15px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-bauxite);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.form-section {
    margin-bottom: 40px;
}

.form-section h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--primary-aluminum);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-medium);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-aluminum);
    box-shadow: 0 0 0 3px rgba(132, 135, 137, 0.2);
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Table Styles */
.facilities-table {
    overflow-x: auto;
}

.facilities-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.facilities-table th, .facilities-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.facilities-table th {
    background-color: var(--bg-light);
    font-weight: 600;
    color: var(--primary-bauxite);
}

.facilities-table tr:hover {
    background-color: rgba(192, 192, 192, 0.1);
}

.facilities-table .form-control {
    padding: 8px 10px;
    font-size: 0.9rem;
}

.remove-facility {
    color: var(--accent-red);
}

/* Project Styles */
.efficiency-projects {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-item {
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
}

.project-item:hover {
    box-shadow: var(--shadow-light);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-header h4 {
    color: var(--primary-bauxite);
    font-size: 1.2rem;
}

.project-savings {
    background-color: var(--accent-green);
    color: var(--text-white);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.project-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-light);
}

.detail-label {
    font-weight: 500;
    color: var(--text-light);
}

.detail-value {
    color: var(--primary-bauxite);
    font-weight: 500;
}

/* Save Actions */
.save-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 30px;
    border-top: 1px solid var(--border-light);
    background-color: var(--bg-light);
}

/* Footer Styles - Match index.html exactly */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4, .footer-section h5 {
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-section p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-silver);
    transform: translateY(-3px);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    opacity: 1;
    padding-left: 5px;
}

.footer-section ul li i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-white);
    text-decoration: none;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    color: var(--text-white);
    font-weight: 500;
    z-index: 10000;
    box-shadow: var(--shadow-heavy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 500px;
    animation: slideInRight 0.3s ease;
}

.notification-info {
    background-color: var(--accent-blue);
}

.notification-success {
    background-color: var(--accent-green);
}

.notification-warning {
    background-color: var(--accent-orange);
}

.notification-error {
    background-color: var(--accent-red);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 15px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Loading state for buttons */
.btn-primary.loading, .btn-secondary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after, .btn-secondary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--text-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

.btn-secondary.loading::after {
    border-top: 2px solid var(--primary-aluminum);
}

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

/* Ensure proper sidebar behavior */
.scope2-sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Improve category item alignment */
.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emission-badge {
    margin-left: auto;
}

/* Form validation styles */
.form-control:invalid {
    border-color: var(--accent-red);
}

.form-control:valid {
    border-color: var(--accent-green);
}

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
}

.container, .nav-container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Responsive Design */
@media (max-width: 992px) {
    .scope2-layout {
        grid-template-columns: 1fr;
    }
    
    .scope2-sidebar {
        position: static;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-visual {
        margin-top: 30px;
    }
    
    .category-stats {
        flex-wrap: wrap;
    }
    
    .stat {
        flex: 1 1 calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-heavy);
        padding: 20px 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 10px 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .user-controls .user-profile span {
        display: none;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .save-actions {
        flex-direction: column;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .category-stats {
        flex-direction: column;
    }
    
    .stat {
        flex: 1 1 100%;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .project-details {
        grid-template-columns: 1fr;
    }
}