/* Base Styles */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1100px; 
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 2px solid var(--border-color);
}

header h1 {
    color: var(--primary-color);
    margin: 0;
}

/* Sticky Navigation */
.sticky-nav {
    position: sticky;
    top: 0;
    background: white;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    flex-wrap: wrap;
}

.sticky-nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.sticky-nav a:hover {
    background: #eff6ff;
}


/* Content Sections */
section {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px !important;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers title and table within the card */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    height: 100%;
}
main {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 Column */
    gap: 25px;
    padding: 20px 0;
}
section h2 {
    border-left: none !important;
    padding-left: 0 !important;
    text-align: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--primary-color);
}

/* Tables */
.table-wrapper {
    width: 100%;
    display: flex;
    justify-content: center; /* Centers table within wrapper */
    overflow-x: auto;
}
table {
    width: 100%;
    max-width: 450px; /* Ensures tables look consistent in the 2-col grid */
    font-size: 0.9rem;
}

th, td {
    padding: 8px 10px !important; /* Tighter padding */
}

th {
    background-color: var(--primary-color);
    color: white;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

tbody tr:nth-child(even) {
    background-color: #f1f5f9;
}

tbody tr:hover {
    background-color: #e0f2fe;
}

/* Summary Section */
.summary-table {
    max-width: 400px;
    margin: 20px 0;
}

.grand-total-row {
    background-color: #fef3c7 !important;
    font-size: 1.1rem;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: #64748b;
    font-size: 0.9rem;
}
.sticky-nav {
    top: 64px; /* Matches the height of your indigo navbar */
    background: rgba(255, 255, 255, 0.98);
}


/* Responsive */
@media (max-width: 600px) {
    .sticky-nav {
        gap: 5px;
    }
    
    .sticky-nav a {
        font-size: 0.8rem;
    }
}

@media (min-width: 1024px) {
    main {
        grid-template-columns: repeat(2, 1fr); /* Desktop: 2 Columns (2x3 Grid) */
    }

    /* Make the Summary section span both columns at the bottom */
    #summary {
        grid-column: 1 / span 2; 
        margin-top: 40px;
        justify-self: center; /* Centers the summary section itself */
        width: 100%;
        max-width: 600px; /* Optional: keeps summary table from getting too wide */
    }
}