/* ===========================================
   recycle.report - Bauhaus Sustainability Dashboard
   Colors: #FFFDF5, #0A4D4A, #FF6B4A, #1A2A2A, #6B7878, #E8F5F0
   Fonts: Futura (system stack), Inter (Google Fonts)
   =========================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
    color: #6B7878;
    background: #FFFDF5;
    display: flex;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Futura', 'Trebuchet MS', 'Century Gothic', 'Arial', sans-serif;
    font-weight: 700;
    color: #1A2A2A;
    line-height: 1.2;
}

/* --- Sidebar --- */
#sidebar {
    width: 260px;
    min-width: 260px;
    height: 100vh;
    background: #E8F5F0;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    border-right: 2px solid rgba(10, 77, 74, 0.1);
}

#sidebar-header {
    padding: 32px 24px 24px;
    border-bottom: 2px solid rgba(10, 77, 74, 0.08);
}

#logo-mark {
    margin-bottom: 12px;
}

#site-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1A2A2A;
    letter-spacing: -0.02em;
}

#site-title .accent {
    color: #FF6B4A;
}

/* --- Sidebar Navigation --- */
#sidebar-nav {
    padding: 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: 2px solid transparent;
    background: transparent;
    color: #6B7878;
    font-family: 'Futura', 'Trebuchet MS', 'Century Gothic', 'Arial', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.nav-btn:hover {
    background: rgba(10, 77, 74, 0.06);
    color: #0A4D4A;
    border-color: rgba(10, 77, 74, 0.15);
}

.nav-btn.active {
    background: #0A4D4A;
    color: #FFFDF5;
    border-color: #0A4D4A;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

/* --- Sidebar Footer --- */
#sidebar-footer {
    padding: 16px 24px 24px;
    border-top: 2px solid rgba(10, 77, 74, 0.08);
}

.circuit-decoration {
    opacity: 0.6;
    margin-bottom: 8px;
}

.footer-text {
    font-size: 0.75rem;
    color: #6B7878;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --- Main Content --- */
#main-content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    padding: 40px 48px 60px;
}

/* Watercolor background */
#watercolor-bg {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 600px 400px at 80% 20%, rgba(10, 77, 74, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 20% 80%, rgba(255, 107, 74, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 50% 50%, rgba(232, 245, 240, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 700px 400px at 90% 70%, rgba(10, 77, 74, 0.02) 0%, transparent 70%);
    animation: watercolorShift 12s ease-in-out infinite alternate;
}

@keyframes watercolorShift {
    0% {
        background-position: 0% 0%;
        opacity: 1;
    }
    100% {
        background-position: 2% 2%;
        opacity: 0.85;
    }
}

/* Circuit decoration top-right */
#circuit-top-right {
    position: fixed;
    top: 0;
    right: 0;
    pointer-events: none;
    z-index: 1;
}

/* --- Content Sections --- */
.content-section {
    display: none;
    position: relative;
    z-index: 2;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 36px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #1A2A2A;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: #6B7878;
    max-width: 600px;
}

/* --- Metrics Grid (Overview) --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.metric-card {
    background: #FFFDF5;
    border: 2px solid rgba(10, 77, 74, 0.1);
    padding: 28px 24px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 77, 74, 0.08);
}

.metric-card.pulse-metric {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(10, 77, 74, 0.08);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(10, 77, 74, 0.04);
        transform: scale(1.02);
    }
}

.metric-value {
    font-family: 'Futura', 'Trebuchet MS', 'Century Gothic', 'Arial', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #0A4D4A;
    line-height: 1;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.85rem;
    color: #6B7878;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.metric-change {
    font-size: 0.8rem;
    font-weight: 500;
}

.metric-change.positive {
    color: #0A4D4A;
}

/* --- Report Block --- */
.report-block {
    background: #FFFDF5;
    border: 2px solid rgba(10, 77, 74, 0.1);
    padding: 32px;
}

.block-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #1A2A2A;
}

.block-text {
    margin-bottom: 24px;
    color: #6B7878;
    max-width: 800px;
}

/* --- Progress Bars --- */
.progress-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-item {
    display: grid;
    grid-template-columns: 160px 1fr 50px;
    align-items: center;
    gap: 16px;
}

.progress-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1A2A2A;
}

.progress-track {
    height: 10px;
    background: #E8F5F0;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #0A4D4A;
    transition: width 0.8s ease;
}

.progress-fill.coral {
    background: #FF6B4A;
}

.progress-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0A4D4A;
    text-align: right;
}

/* --- Materials Grid --- */
.materials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.material-card {
    background: #FFFDF5;
    border: 2px solid rgba(10, 77, 74, 0.1);
    padding: 28px 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.material-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(10, 77, 74, 0.08);
}

.material-icon {
    margin-bottom: 16px;
}

.material-name {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: #1A2A2A;
}

.material-stat {
    font-family: 'Futura', 'Trebuchet MS', 'Century Gothic', 'Arial', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0A4D4A;
    margin-bottom: 12px;
}

.material-desc {
    font-size: 0.9rem;
    color: #6B7878;
    margin-bottom: 16px;
    line-height: 1.6;
}

.material-rate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(10, 77, 74, 0.1);
}

.rate-label {
    font-size: 0.8rem;
    color: #6B7878;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rate-value {
    font-family: 'Futura', 'Trebuchet MS', 'Century Gothic', 'Arial', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0A4D4A;
}

/* --- Regions --- */
.regions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.region-card {
    background: #FFFDF5;
    border: 2px solid rgba(10, 77, 74, 0.1);
    padding: 24px 28px;
    transition: box-shadow 0.2s ease;
}

.region-card:hover {
    box-shadow: 0 6px 20px rgba(10, 77, 74, 0.06);
}

.region-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.region-name {
    font-size: 1.15rem;
    color: #1A2A2A;
}

.region-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
}

.region-badge.top {
    background: #0A4D4A;
    color: #FFFDF5;
}

.region-badge.new {
    background: #FF6B4A;
    color: #FFFDF5;
}

.region-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 16px;
}

.region-stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: 'Futura', 'Trebuchet MS', 'Century Gothic', 'Arial', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0A4D4A;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.78rem;
    color: #6B7878;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.region-bar {
    height: 6px;
    background: #E8F5F0;
    overflow: hidden;
}

.region-fill {
    height: 100%;
    background: #0A4D4A;
    transition: width 0.8s ease;
}

.region-fill.coral-fill {
    background: #FF6B4A;
}

/* --- Trends Chart --- */
.trends-chart {
    margin-bottom: 40px;
}

.chart-container {
    display: flex;
    align-items: flex-end;
    background: #FFFDF5;
    border: 2px solid rgba(10, 77, 74, 0.1);
    padding: 32px 32px 20px;
    height: 320px;
    position: relative;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex: 1;
    height: 100%;
    padding-left: 48px;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    max-width: 60px;
    background: #0A4D4A;
    position: relative;
    transition: height 0.6s ease;
    min-height: 4px;
}

.chart-bar.active-bar {
    background: linear-gradient(180deg, #0A4D4A 0%, #FF6B4A 100%);
}

.chart-bar.projected {
    background: repeating-linear-gradient(
        -45deg,
        #0A4D4A,
        #0A4D4A 4px,
        rgba(10, 77, 74, 0.3) 4px,
        rgba(10, 77, 74, 0.3) 8px
    );
}

.bar-tooltip {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Futura', 'Trebuchet MS', 'Century Gothic', 'Arial', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #0A4D4A;
    white-space: nowrap;
}

.bar-label {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #6B7878;
    font-weight: 500;
}

.chart-axis-y {
    position: absolute;
    left: 32px;
    top: 32px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #6B7878;
}

.chart-note {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #6B7878;
    font-style: italic;
}

/* --- Trends Insights --- */
.trends-insights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.insight-card {
    background: #FFFDF5;
    border: 2px solid rgba(10, 77, 74, 0.1);
    padding: 24px;
}

.insight-title {
    font-size: 0.8rem;
    color: #6B7878;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.insight-value {
    font-family: 'Futura', 'Trebuchet MS', 'Century Gothic', 'Arial', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0A4D4A;
    margin-bottom: 8px;
}

.insight-value.coral-text {
    color: #FF6B4A;
}

.insight-desc {
    font-size: 0.88rem;
    color: #6B7878;
    line-height: 1.6;
}

/* --- Goals --- */
.goals-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.goal-card {
    display: flex;
    gap: 20px;
    background: #FFFDF5;
    border: 2px solid rgba(10, 77, 74, 0.1);
    padding: 24px;
    transition: box-shadow 0.2s ease;
}

.goal-card:hover {
    box-shadow: 0 6px 20px rgba(10, 77, 74, 0.06);
}

.goal-card.completed {
    border-left: 4px solid #0A4D4A;
}

.goal-card.in-progress {
    border-left: 4px solid #FF6B4A;
}

.goal-card.pending {
    border-left: 4px solid #6B7878;
    opacity: 0.7;
}

.goal-status {
    flex-shrink: 0;
    padding-top: 2px;
}

.goal-content {
    flex: 1;
}

.goal-title {
    font-size: 1.05rem;
    color: #1A2A2A;
    margin-bottom: 6px;
}

.goal-desc {
    font-size: 0.9rem;
    color: #6B7878;
    margin-bottom: 14px;
    line-height: 1.6;
}

.goal-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.goal-track {
    flex: 1;
    height: 8px;
    background: #E8F5F0;
    overflow: hidden;
    max-width: 400px;
}

.goal-fill {
    height: 100%;
    background: #0A4D4A;
    transition: width 0.8s ease;
}

.goal-fill.coral-fill {
    background: #FF6B4A;
}

.goal-fill.gray-fill {
    background: #6B7878;
}

.goal-percent {
    font-family: 'Futura', 'Trebuchet MS', 'Century Gothic', 'Arial', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0A4D4A;
    min-width: 40px;
}

/* --- Scrollbar --- */
#main-content::-webkit-scrollbar {
    width: 6px;
}

#main-content::-webkit-scrollbar-track {
    background: #E8F5F0;
}

#main-content::-webkit-scrollbar-thumb {
    background: rgba(10, 77, 74, 0.2);
}

#main-content::-webkit-scrollbar-thumb:hover {
    background: rgba(10, 77, 74, 0.35);
}

/* --- Responsive --- */
@media (max-width: 1100px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .materials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .trends-insights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    #sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 2px solid rgba(10, 77, 74, 0.1);
    }
    #sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px;
        gap: 6px;
    }
    .nav-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    #sidebar-footer {
        display: none;
    }
    #main-content {
        height: auto;
        overflow-y: auto;
        padding: 24px 20px 40px;
    }
    #watercolor-bg {
        left: 0;
    }
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
    .materials-grid {
        grid-template-columns: 1fr;
    }
    .region-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .progress-item {
        grid-template-columns: 120px 1fr 40px;
    }
}
