@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-dark: #092c1a;
    --primary: #14532d;
    --primary-light: #16a34a;
    --accent: #22c55e;
    --accent-mint: #dcfce7;
    --bg-page: #f4faf6;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button {
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.25s ease;
}

/* =========================================
   SIDEBAR NAVIGATION
   ========================================= */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #072a19 0%, #0f462a 50%, #14532d 100%);
    color: white;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: white;
    margin-bottom: 25px;
    padding-left: 8px;
    letter-spacing: -0.5px;
}

.logo a {
    color: white;
    text-decoration: none;
}

.logo span {
    color: #86efac;
}

.menu-title {
    color: #86efac;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 15px 10px 8px;
    opacity: 0.85;
}

.menu-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: transparent;
    color: #d1fae5;
    padding: 10px 14px;
    margin-bottom: 2px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu-item span {
    font-size: 16px;
    width: 22px;
    text-align: center;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transform: translateX(4px);
}

.menu-item.active {
    background: #16a34a;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

.menu-item.logout {
    margin-top: auto;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
    font-weight: 600;
}

.menu-item.logout:hover {
    background: #dc2626;
    color: white;
}

/* =========================================
   MAIN CONTENT & TOPBAR
   ========================================= */
.main {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 75px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 35px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.topbar p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.mobile-btn {
    display: none;
    background: transparent;
    font-size: 24px;
    color: var(--primary);
    padding: 5px;
}

.profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9fafb;
    padding: 6px 14px 6px 6px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.profile:hover {
    border-color: #86efac;
    background: #f0fdf4;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile b {
    display: block;
    font-size: 13.5px;
    color: var(--text-main);
    line-height: 1.2;
}

.profile small {
    font-size: 11.5px;
    color: var(--text-muted);
}

/* =========================================
   PAGES & CONTAINERS
   ========================================= */
.page {
    display: none;
    padding: 30px 35px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

.page h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-head button {
    background: var(--primary-light);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
}

.page-head button:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* =========================================
   STATS GRID
   ========================================= */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat {
    background: white;
    padding: 22px 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #86efac;
}

.stat > span {
    width: 52px;
    height: 52px;
    background: var(--accent-mint);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.stat h3 {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin: 0;
}

.stat p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 3px;
}

/* =========================================
   CARDS & GRIDS
   ========================================= */
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 30px 0 15px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #86efac;
}

.card .icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    background: #f0fdf4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.card h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.card p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 18px;
    flex-grow: 1;
}

.card button {
    background: #f0fdf4;
    color: var(--primary-light);
    border: 1px solid #bbf7d0;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
}

.card button:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

/* =========================================
   TABLES & BOXES
   ========================================= */
.table-box {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 30px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px 20px;
    text-align: left;
    font-size: 13.5px;
}

th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

td {
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f9fbf9;
}

.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.active,
.status.approved {
    background: #dcfce7;
    color: #15803d;
}

.status.pending {
    background: #fef3c7;
    color: #92400e;
}

.status.rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.status.completed {
    background: #e0f2fe;
    color: #0369a1;
}

/* =========================================
   PROJECT GRID
   ========================================= */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.project {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.project:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #86efac;
}

.project-image {
    height: 120px;
    background: linear-gradient(135deg, #14532d, #16a34a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.project-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-body h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.project-body p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 10px 0 16px;
    flex-grow: 1;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-bar div {
    height: 100%;
    background: var(--primary-light);
    border-radius: 10px;
}

/* =========================================
   CAMPAIGNS
   ========================================= */
.campaigns {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.campaign {
    background: white;
    padding: 20px 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.campaign:hover {
    border-color: #86efac;
    box-shadow: var(--shadow-md);
}

.date {
    width: 65px;
    height: 65px;
    background: var(--accent-mint);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #bbf7d0;
}

.date b {
    font-size: 20px;
    color: var(--primary);
    line-height: 1;
}

.date span {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-light);
    text-transform: uppercase;
}

.campaign-info {
    flex-grow: 1;
}

.campaign-info h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.campaign-info p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin: 2px 0;
}

.campaign button {
    background: var(--primary-light);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.campaign button:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* =========================================
   REPORTS
   ========================================= */
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.report {
    background: white;
    padding: 30px 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-align: center;
}

.report span {
    font-size: 38px;
    display: block;
    margin-bottom: 10px;
}

.report h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.report p {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    margin-top: auto;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 20px 35px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .mobile-btn {
        display: block;
    }

    .topbar {
        padding: 0 20px;
    }

    .page {
        padding: 20px;
    }

    .campaign {
        flex-direction: column;
        align-items: flex-start;
    }
}