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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
}

section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

h3 {
    color: #34495e;
    margin-bottom: 10px;
}

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

.stat-card {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #3498db;
    margin-top: 10px;
}

.category-breakdown {
    margin-top: 30px;
}

#categoryChart {
    margin-top: 15px;
}

.category-bar {
    margin-bottom: 15px;
}

.category-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.category-bar-fill {
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.category-bar-inner {
    background-color: #3498db;
    height: 20px;
    transition: width 0.3s ease;
}

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filters input {
    flex: 1;
    min-width: 200px;
}

.filters select {
    min-width: 150px;
}

.filters button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.filters button:hover {
    background-color: #2980b9;
}

/* Menus */
#menusList {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.menu-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.menu-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.closed-notice {
    background-color: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.category-section {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.category-title {
    color: #2c3e50;
    font-size: 1.1em;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.category-section .menu-item {
    margin-bottom: 10px;
}

.category-section .menu-item:last-child {
    margin-bottom: 0;
}

.menu-item {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.menu-item h4,
.menu-item h5 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1em;
}

.menu-item .description {
    color: #7f8c8d;
    font-size: 0.85em;
    margin-bottom: 8px;
    line-height: 1.4;
}

.menu-item .price {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.1em;
    margin-top: 8px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.pagination button {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.pagination span {
    color: #7f8c8d;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
}

.error {
    background-color: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Navigation */
.page-nav {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.page-nav a {
    color: #3498db;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.page-nav a:hover {
    background-color: #ecf0f1;
}

.page-nav a.active {
    background-color: #3498db;
    color: white;
}

/* Meal Statistics Page */
.meal-filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-row input[type="text"],
.filter-row input[type="date"],
.filter-row select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
    min-width: 150px;
}

.filter-row button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.filter-row button:hover {
    background-color: #2980b9;
}

.filter-row button.secondary {
    background-color: #95a5a6;
}

.filter-row button.secondary:hover {
    background-color: #7f8c8d;
}

.stat-value-small {
    font-size: 1.2em;
    font-weight: bold;
    color: #3498db;
    margin-top: 10px;
}

/* Meals Table */
.meals-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.meals-table thead {
    background-color: #34495e;
    color: white;
}

.meals-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.meals-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.meals-table tbody tr:hover {
    background-color: #f8f9fa;
}

.meals-table td {
    padding: 12px;
}

.meals-table .meal-name {
    font-weight: 500;
    color: #2c3e50;
}

.meals-table .center {
    text-align: center;
}

.meals-table .price,
.meals-table .price-range {
    color: #27ae60;
    font-weight: 500;
}

.meals-table .date {
    color: #7f8c8d;
}

.category-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.category-badge.cat-1 {
    background-color: #e8f4f8;
    color: #2980b9;
}

.category-badge.cat-2 {
    background-color: #fef5e7;
    color: #d68910;
}

.category-badge.cat-4 {
    background-color: #eafaf1;
    color: #27ae60;
}

.view-details-btn {
    padding: 6px 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.view-details-btn:hover {
    background-color: #2980b9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.close {
    color: #95a5a6;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #2c3e50;
}

.dates-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.dates-table thead {
    background-color: #ecf0f1;
}

.dates-table th {
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
}

.dates-table td {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
}

.dates-table .description {
    color: #7f8c8d;
    font-size: 0.9em;
}
