:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --bg-color: #f4f7f6;
    --text-color: #333;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

#menu-toggle {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

h1 {
    font-size: 1.25rem;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background-color: var(--white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    transition: left 0.3s ease;
    z-index: 1000;
    padding: 1rem;
}

.side-menu.open {
    left: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

#close-menu {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

#year-list {
    list-style: none;
}

.year-item {
    padding: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.year-item:hover, .year-item.active {
    background-color: var(--accent-color);
    color: var(--white);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.month-card {
    background: var(--white);
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: bold;
    color: var(--primary-color);
}

.month-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Payment Details */
/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: calc(100vh - 80px);
    padding: 1rem;
}

.login-box {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

#login-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
}

#login-msg {
    margin-top: 1rem;
    text-align: center;
}

.error { color: #e74c3c; }

/* Menu Footer */
.menu-footer {
    position: absolute;
    bottom: 2rem;
    left: 1rem;
    right: 1rem;
}

#logout-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.year-total-card {
    background-color: #2ecc71 !important;
    color: white !important;
}

.grand-footer-row {
    background-color: #f1f8e9;
    border-top: 2px solid var(--accent-color);
}

.grand-footer-row td {
    color: var(--primary-color);
    font-size: 1.1rem;
}

#back-to-months {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 1rem;
}

h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #f8f9fa;
    color: var(--secondary-color);
    font-weight: 600;
}

.summary-row {
    background-color: #e8f4fd !important;
}

.summary-row th {
    background-color: #e8f4fd;
    color: var(--accent-color);
    font-size: 1.1rem;
}

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

@media (max-width: 600px) {
    .month-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}
