body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f0f0f0;
}

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

h1 {
    text-align: center;
    color: #333;
    cursor: pointer;
}

.btn {
    padding: 8px 12px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    box-sizing: border-box;
}

.btn:hover {
    opacity: 0.9;
}

.btn.primary {
    background-color: #007bff;
    color: white;
}

.btn.primary:hover {
    background-color: #0056b3;
}

.btn.clear-month {
    background-color: #dc3545;
    color: white;
}

.btn.clear-month:hover {
    background-color: #b02a37;
}

.btn.print {
    background-color: #28a745;
    color: white;
}

.btn.print:hover {
    background-color: #218838;
}

.btn.up {
    background-color: #17a2b8;
    color: white;
    width: 100%;
    padding: 6px;
}

.btn.up:hover {
    background-color: #138496;
}

.btn.remove {
    background-color: #dc3545;
    color: white;
    width: 100%;
    padding: 6px;
}

.btn.remove:hover {
    background-color: #b02a37;
}

.btn.update-month {
    width: 100%;
    padding: 6px;
    font-size: 12px;
    background-color: #ffc107;
    color: black;
}

.btn.update-month:hover {
    background-color: #e0a800;
}

#saveScheduleBtn {
    width: 70px;
    padding: 10px 20px;
    font-size: 16px;
    text-align: center;
}

.save-button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 15px;
    min-width: 100%;
}

.staff-management {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.staff-management.hidden {
    display: none;
}

.staff-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.test-date-input {
    display: none;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.test-date-input.visible {
    display: flex;
}

#newStaffName, #testDateInput {
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#newStaffName {
    flex-grow: 1;
}

.message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

#noStaffMessage {
    display: none;
    color: #721c24;
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.scheduling-modal {
    width: 100%;
    overflow-x: auto;
}

.scheduling-modal table {
    min-width: 700px;
}

.scheduling-modal th:nth-child(1), .scheduling-modal td:nth-child(1) {
    border: 2px solid #ccc;
    text-align: center;
    width: 60px;
}

.scheduling-modal th:nth-child(1)::after {
    content: "Schedule for today";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #007bff;
    color: white;
    padding: 2px 5px;
    font-size: 12px;
    border-radius: 3px;
    white-space: nowrap;
    display: none;
}

.scheduling-modal th:nth-child(1):hover::after {
    display: block;
}

.scheduling-modal th:nth-child(2), .scheduling-modal td:nth-child(2) {
    width: 150px;
}

.scheduling-modal th:nth-child(n+3):not(:last-child), .scheduling-modal td:nth-child(n+3):not(:last-child) {
    text-align: center;
    width: 50px;
}

.scheduling-modal th:last-child, .scheduling-modal td:last-child {
    text-align: center;
    width: 80px;
}

.scheduling-modal input[type="checkbox"] {
    margin: 0 auto;
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 95%;
    max-height: 95%;
    overflow-y: auto;
    position: relative;
    box-sizing: border-box;
}

.shift-stats-modal .modal-content {
    width: 80vw;
    max-width: 80vw;
    min-width: 600px;
    max-height: 95%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.shift-stats-modal h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.shift-stats-modal select {
    padding: 8px;
    font-size: 16px;
    margin-bottom: 20px;
    width: 200px;
    border-radius: 4px;
}

.shift-stats-modal table {
    width: 100%;
    margin: 0 auto 20px;
}

.shift-stats-modal th, .shift-stats-modal td {
    padding: 15px;
    font-size: 16px;
}

.shift-stats-modal th:nth-child(1), .shift-stats-modal td:nth-child(1) {
    background-color: #e3f2fd;
    font-weight: bold;
    text-align: left;
}

.shift-stats-modal #staffShiftList {
    margin-bottom: 20px;
    flex-grow: 0;
}

.shift-stats-modal #shiftChart {
    max-height: 500px;
    width: 100%;
    flex-grow: 1;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

#modalDate {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.month-container {
    margin-bottom: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.month-header h2 {
    margin: 0;
    font-size: 18px;
}

.minimize-button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

.month-content.hidden {
    display: none;
}

.month-actions {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 15px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #ddd;
    padding: 1px;
}

.day-header {
    background-color: #f8f9fa;
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ddd;
}

.day-cell {
    background-color: white;
    padding: 10px;
    min-height: 100px;
    border: 1px solid #ddd;
    cursor: pointer;
}

.day-cell:hover {
    background-color: #f1f1f1;
}

.other-month-day {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: default;
}

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.scheduled-staff {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.scheduled-staff li {
    margin: 2px 0;
}

.print-only .month-actions, .print-only .minimize-button {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }
    .print-only, .print-only * {
        visibility: visible;
    }
    .print-only {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }
}