/* GLOBAL STYLES & RESETS */
:root {
    --primary-color: #2e7d32; /* Deep Green for the main Ecosphere brand */
    --primary-dark: #1b5e20;
    --secondary-color: #4a90e2; /* Accent blue for buttons/links */
    --background-light: #f4f6f9; /* Light background */
    --card-background: #ffffff; /* White card background */
    --text-dark: #2c3e50; /* Primary text color */
    --text-light: #7f8c8d; /* Secondary text color */
    
    /* Feature-specific colors */
    --swap-color: #5cb85c;
    --rescue-color: #f39c12;
    --seed-color: #8e44ad;

    --border-radius-large: 12px;
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* DASHBOARD CONTAINER */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 1. NAVIGATION BAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.logo {
    font-size: 2.8em;
    font-weight: 700;
    color: black;
}

.logo i {
    margin-right: 8px;
}

.navbar nav a {
    text-decoration: none;
    color: var(--text-dark);
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar nav a:hover,
.navbar nav a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.profile-link {
    color: var(--text-light) !important;
    font-weight: 400 !important;
    border-bottom: none !important;
}

/* MAIN CONTENT */
.content-area h1 {
    font-size: 2.2em;
    font-weight: 600;
    margin-bottom: 30px;
    color: black
}

/* 2. METRICS GRID */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    font-size: 1.4em;
    font-weight: 600;
}

.card-header .icon {
    font-size: 2em;
}

/* Card Specific Styling */
.swap-card .icon { color: var(--swap-color); }
.rescue-card .icon { color: var(--rescue-color); }
.seed-card .icon { color: var(--seed-color); }

.stats {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    text-align: center;
}

.stat-item .value {
    display: block;
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}

.stat-item .label {
    display: block;
    font-size: 0.9em;
    color: var(--text-light);
    margin-top: 5px;
}

/* Buttons */
.btn {
    display: block;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-top: auto; /* Pushes the button to the bottom */
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.rescue-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-secondary {
    background-color: #ecf0f1;
    color: var(--text-dark);
    flex-grow: 1;
    padding: 10px;
}

.btn-secondary:hover {
    background-color: #bdc3c7;
}


/* 3. SECONDARY PANELS */
.secondary-panels {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Activity panel wider than progress */
    gap: 30px;
}

.panel {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
}

.panel h2 {
    font-size: 1.4em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Activity Panel */
.activity-panel ul {
    list-style: none;
    padding: 0;
}

.activity-panel ul li {
    padding: 10px 0;
    border-bottom: 1px dotted #f0f0f0;
    font-size: 1em;
}

.activity-panel ul li:last-child {
    border-bottom: none;
}

.activity-panel i {
    margin-right: 10px;
}

.swap-color { color: var(--swap-color); }
.rescue-color { color: var(--rescue-color); }
.seed-color { color: var(--seed-color); }

/* Progress Panel */
.progress-panel {
    text-align: center;
}

.score-display {
    margin: 30px 0 10px;
}

.score-value {
    font-size: 4em;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.score-unit {
    font-size: 1.5em;
    color: var(--text-light);
    font-weight: 500;
}

.score-details {
    color: var(--text-dark);
    font-size: 1.1em;
    margin-bottom: 25px;
    font-style: italic;
}

.progress-bar-container {
    background-color: #e0e0e0;
    border-radius: 5px;
    height: 10px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: width 0.5s ease-in-out;
}

/* MEDIA QUERIES for Responsiveness (Good Practice) */
@media (max-width: 992px) {
    .navbar nav a {
        margin-left: 15px;
    }
    .secondary-panels {
        grid-template-columns: 1fr; /* Stacks panels vertically on smaller screens */
    }
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar nav {
        margin-top: 15px;
    }
    .navbar nav a {
        display: block;
        margin: 5px 0;
    }
    .metrics-grid {
        grid-template-columns: 1fr; /* Stacks cards vertically */
    }
}

/* Footer */

footer {
  background: #f7f9f7;
  color: #000000;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}
