* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: #bed4cd;
    height: 100vh;
    overflow: hidden;
}

.app-layout {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* SIDEBAR - GREEN */
.sidebar {
    width: 220px;
    background: linear-gradient(145deg, #1e6f3f 0%, #0f532f 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
    z-index: 10;
    transition: all 0.2s;
}

/* NEW HEADER STYLE */
.new-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
    gap: 20px;
    border-radius: 10px;
}

/* LEFT */
.header-left h1 {
    font-size: 20px;
    font-weight: 600;
}

/* CENTER FILTERS */
.header-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* RIGHT */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* FILTER STYLE IMPROVEMENT */
.filter-select,
.filter-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* REFRESH BUTTON */
.ref-badge {
    background: #f3f4f6;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.ref-badge:hover {
    background: #e5e7eb;
}

.logo-area {
    padding: 32px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 24px;
}

.logo-area h2 {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    font-weight: 600;
}

.logo-area p {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 6px;
}

.nav-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

.nav-item {
    padding: 14px 20px;
    border-radius: 16px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.nav-item.active {
    background: white;
    color: #1e6f3f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-footer {
    padding: 20px;
    font-size: 0.7rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0.7;
}

/* MAIN CONTENT - WHITE BACKGROUND */
.main-content {
    flex: 1;
    overflow-y: auto;
    background: #bed4cd;
    padding: 28px 32px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

/* NEW */
.right-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-bar h1 {
    font-size: 1.9rem;
    font-weight: 600;
    color: #1f2937;
}

.date-badge {
    background: #f3f4f6;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.85rem;
    color: #4b5563;
}

.ref-badge {
    background: #f3f4f6;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.85rem;
    color: #4b5563;
    cursor: pointer;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 🔒 FIXED 3 columns */
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #eef2f6;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2.5rem;
    background: #f0fdf4;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 60px;
    color: #1e6f3f;
}

.stat-card.success .card-icon {
    background: #e6f7e6;
}

.stat-card.warning .card-icon {
    background: #fff3e0;
    color: #e67e22;
}

.card-info h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 6px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 15px;
    border: 1px solid #edf2f7;
    overflow: hidden;
    margin-top: 12px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 8px 24px;
}

.section-title h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.badge {
    background: #eef2ff;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.7rem;
    color: #1e6f3f;
}

.responsive-table {
    overflow-x: auto;
}

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

th {
    text-align: left;
    padding: 16px 20px;
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

td {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f2f5;
    color: #1f2937;
}

tr:hover td {
    background-color: #fafcff;
}

.pending-amount {
    color: #e67e22;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.received {
    background: #e0f2e9;
    color: #1e6f3f;
}

.status-badge.pending {
    background: #fee2e2;
    color: #c2410c;
}

.btn-primary {
    background: #1e6f3f;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: #0f5a34;
    transform: scale(0.98);
}

.btn-small {
    background: #eef2ff;
    border: none;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: 0.2s;
}

.btn-small:hover {
    background: #e0e7ff;
}

.filters-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-input,
.filter-select {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: white;
    font-size: 0.9rem;
    min-width: 115px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 32px;
    padding: 28px;
    box-shadow: 0 25px 40px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.2s ease;
}

.close-modal {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #ccc;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.empty-row,
.loading-row {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }

    .sidebar .logo-area h2,
    .sidebar .logo-area p,
    .sidebar-footer,
    .nav-item span:not(.nav-item:first-child) {
        display: none;
    }

    .nav-item {
        justify-content: center;
        font-size: 1.4rem;
        padding: 14px;
    }

    .main-content {
        padding: 20px;
    }
}

.refresh-btn {
    margin-left: 38%;
    background: white;
    padding: 5px;
    border-radius: 24px;
}

.refresh-icon {
    display: inline-block;
}

.rotate {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .new-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-filters {
        width: 100%;
        flex-wrap: wrap;
    }
}