body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #333; /* Dark grey background */
    color: #fff; /* White text */
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    text-align: center;
    color: #fff;
}

.container {
    background-color: #444; /* Slightly lighter grey for container */
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 800px; /* Max width for the main content area */
}

.entry {
    background-color: #555; /* Even lighter grey for entries */
    border: 1px solid #666;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Spacing between elements within an entry */
}

.entry input[type="text"],
.entry input[type="number"],
.entry input[type="date"] {
    background-color: #333;
    color: #fff;
    padding: 10px;
    border: 1px solid #666;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%; /* Make inputs take full width of their container */
}

.entry input[type="date"] {
    color-scheme: dark; /* Helps with date picker theme */
    /* General styles for date inputs in entries, will be overridden by more specific below */
}

/* Styles for the custom date display */
.periodo-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px; /* Gap between 'Desde group' and 'Hasta group' */
    /* flex-wrap: wrap; */ /* Add if they should wrap on smaller screens */
}

.date-field-group {
    display: flex;
    align-items: center;
    gap: 5px; /* Gap between label, icon, and span within the group */
    flex-grow: 1; /* Each group will take up equal space */
    flex-basis: 0; /* Distribute space evenly */
}

.date-field-group label {
    order: 1;
    flex-shrink: 0;
    color: #ccc;
    margin-bottom: 0;
    /* margin-right: 5px; was removed, relying on gap now */
}

.date-field-group input[type="date"] {
    order: 2;
    background-color: transparent;
    border: none;
    padding: 0;
    width: auto;
    min-width: auto;
    flex-grow: 0;
    color: transparent;
    margin-left: 0;
    cursor: pointer;
    /* Ensure color-scheme: dark is inherited or re-applied if needed */
    color-scheme: dark; /* Re-apply for specificity */
}

.date-field-group .date-display-span { /* Scoped to .date-field-group */
    order: 3;
    display: inline-block;
    padding: 10px;
    background-color: #333;
    color: #fff;
    border: 1px solid #666;
    border-radius: 4px;
    min-width: 100px;
    text-align: left;
    flex-grow: 1; /* Span will take remaining space within its group */
    font-size: 1em;
    line-height: normal;
    cursor: default;
}

/* Styling for the calendar picker indicator for Webkit browsers */
/* Keep this selector specific to input[type=date] within the group */
.date-field-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) grayscale(1) brightness(1.5);
    padding: 5px;
    margin: 0;
    cursor: pointer;
}

.entry button,
#add-entry-btn,
#print-receipts-btn {
    padding: 10px 15px;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.entry .prev-month-btn, .entry .next-month-btn {
    background-color: #007bff; /* Blue for date navigation */
}
.entry .prev-month-btn:hover, .entry .next-month-btn:hover {
    background-color: #0056b3;
}

.entry .remove-entry-btn {
    background-color: #dc3545; /* Red for remove */
}
.entry .remove-entry-btn:hover {
    background-color: #c82333;
}

#add-entry-btn {
    background-color: #28a745; /* Green for add */
    margin-right: 10px; /* Space between global buttons */
}
#add-entry-btn:hover {
    background-color: #218838;
}

#print-receipts-btn {
    background-color: #17a2b8; /* Teal for print */
}
#print-receipts-btn:hover {
    background-color: #117a8b;
}

/* Minimalistic adjustments */
input::placeholder {
    color: #aaa;
}

/* Ensure buttons in an entry are well-spaced if they wrap */
.entry .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.entry .button-group button {
    flex-grow: 1; /* Allow buttons to grow and fill space */
}

/* Adjusting button layout within entry for better alignment */
.entry > button { /* Direct child buttons of .entry */
    margin-top: 5px;
}

/* If using the specific classes for targeting from/to spans for different styling (not used here yet) */
/* .from-display-span { } */
/* .to-display-span { } */
