body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f6;
}

/* UI Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.btn {
    padding: 10px 18px;
    margin: 5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: white;
    transition: all 0.2s ease;
}

/* Category Colors */
.uk { background-color: #3788d8; }
.abroad { background-color: #28a745; }
.holiday { background-color: #dc3545; }
.unpaid { background-color: #ffc107; color: #333; }
.share { background-color: #6c757d; }
.setup-trigger { background-color: #444; }

/* The Halo Effect */
.active-mode {
    outline: 3px solid;
    outline-offset: 3px;
    transform: scale(1.05);
}

/* Modal / Overlay */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    min-width: 300px;
}

.range-controls input {
    display: block;
    width: 100%;
    margin: 10px 0 20px 0;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#calendar {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.setup-btn {
    background-color: #007bff !important; /* Force a nice Blue */
    color: white !important;
    opacity: 1 !important;
    cursor: pointer;
}

.setup-btn:hover {
    background-color: #0056b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* This makes the main layout a horizontal row */
.app-layout {
    display: flex;
    align-items: flex-start; /* Keeps sidebar at the top */
    gap: 20px;
}

/* This makes the calendar area expand to fill the remaining space */
.calendar-section {
    flex-grow: 1; 
    min-width: 0; /* Prevents calendar from pushing off-screen */
}

/* Optional: Make the button group wrap on small screens */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.app-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.sidebar {
    flex: 1; /* Takes up 1 part of space */
    max-width: 250px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
}

.stat-card {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.stat-card .value {
    font-weight: bold;
    font-size: 1.2em;
}

/* Progress Bar */
.progress-bar-bg {
    background: #e9ecef;
    border-radius: 10px;
    height: 12px;
    width: 100%;
    margin: 10px 0;
    overflow: hidden;
}

.progress-bar-fill {
    background: #28a745;
    height: 100%;
    width: 0%; /* We update this with JS */
    transition: width 0.3s ease;
}

.flying { background-color: #9b59b6; }

/* Let's make sure the sidebar progress bar looks like it's out of 90 */
#progress-text { font-weight: bold; }

/* Styling for the List View rows */
.fc-list-event-title {
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-list-day-cushion {
    background-color: #f8f9fa !important; /* Light grey header for each day */
}

.merged-list-container {
    width: 100%;
}


.merged-title {
    font-weight: bold;
    font-size: 1.1em;
}

#custom-list-view {
    /* ... your previous styles ... */
    margin-top: 10px;
    clear: both; /* Ensures no floating buttons overlap it */
}

.merged-item {
    border-left: 8px solid; /* Color is set by JS */
    background: #ffffff !important;
    color: #333 !important; /* Force text to be visible */
    margin-bottom: 15px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 8px;
    transition: transform 0.2s;
}

.merged-item:hover {
    transform: translateX(5px); /* Nice little interactive touch */
}

.merged-dates {
    font-weight: 500;
    color: #666;
}

@media print {
    .sidebar, .button-group, #viewSelector, .setup-trigger {
        display: none !important;
    }
    #mainApp {
        width: 100%;
        margin: 0;
    }
    #custom-list-view {
        display: block !important;
        border: none !important;
    }
}

#projectTitle {
    border: none;
    background: transparent;
    font-size: 1.75rem; /* Matches the '2026' font size */
    font-weight: 700;
    color: #2c3e50;
    outline: none;
    padding: 0;
    margin: 0;
    width: auto;
    min-width: 200px;
    font-family: inherit;
    transition: color 0.2s;
}

#projectTitle:hover {
    color: #3788d8; /* Subtle hint that it's editable */
}

#projectTitle::placeholder {
    color: #ccc;
    font-weight: 400;
}

#versionDisplay {
    background: #e9ecef;
    color: #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    align-self: center;
}

/* Ensure the controls row is nice and tidy */
.view-group {
    margin-bottom: 10px;
}