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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.admin-container {
    margin: 0 auto;
    padding: 40px;
}

.section, .section1 {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section h2, .section1 h2 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Weekly Schedule Styles */
.schedule-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.day-schedule {
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.day-schedule:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
}

.day-schedule.disabled {
    opacity: 0.5;
    background-color: #f8f9fa;
}

.day-header {
    margin-bottom: 15px;
}

.day-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
}

.day-toggle input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.day-name {
    color: #2c3e50;
}

.time-slots {
    margin-bottom: 10px;
}

.time-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.time-slot input[type="time"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.time-slot span {
    font-weight: bold;
    color: #7f8c8d;
}

.add-slot, .add-break {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.add-slot:hover, .add-break:hover {
    background-color: #219a52;
}

.remove-slot, .remove-break {
    background-color: #e74c3c;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-slot:hover, .remove-break:hover {
    background-color: #c0392b;
}

/* Break Times Styles */
.breaks-container {
    margin-bottom: 15px;
}

.break-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #f39c12;
}

.break-day {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 120px;
}

.break-from, .break-to {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.break-label {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

/* Calendar Styles */
.calendar-container {
    max-width: 600px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

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

.calendar-header h3 {
    font-size: 1.5em;
    color: #2c3e50;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

.calendar-grid div {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ecf0f1;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.calendar-day:hover {
    background-color: #bdc3c7;
}

.calendar-day.other-month {
    color: #bdc3c7;
    background-color: #f8f9fa;
}

.calendar-day.today {
    background-color: #3498db;
    color: white;
}

.calendar-day.off-day {
    background-color: #e74c3c;
    color: white;
}

.calendar-day.off-day:hover {
    background-color: #c0392b;
}

.calendar-day.selected {
    background-color: #0073aa;
    color: white;
    border-radius: 4px;
    font-weight: bold;
}

.calendar-header-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 10px;
}

.calendar-header-day {
    padding: 10px;
    text-align: center;
    font-weight: bold;
    background-color: #34495e;
    color: white;
    border-radius: 4px;
}

.calendar-wrapper {
    display: flex;
    gap: 30px;
}

.calendar-container,
.off-days-list {
    flex: 1;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 10px;
}

.off-days-list {
    height: auto;
}

.off-days-list h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

#offDaysList {
    max-height: 400px;
    overflow-y: auto;
}

.off-days-list li {
    padding: 5px 0;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-off-day {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}










#offDaysList tbody {
    display: block;
    max-height: 400px; /* Scroll when height exceeds 300px */
    overflow-y: auto;
    width: 100%;
}

#offDaysList thead,
#offDaysList tbody tr {
    display: table;
    table-layout: fixed;
    width: 100%;
}

/* Scrollbar - subtle grey style */
#offDaysList tbody::-webkit-scrollbar {
    width: 8px;
}

#offDaysList tbody::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

#offDaysList tbody::-webkit-scrollbar-thumb {
    background: #bfbfbf;
    border-radius: 8px;
}

#offDaysList tbody::-webkit-scrollbar-thumb:hover {
    background: #a6a6a6;
}


/* Save Section */
.save-section {
    text-align: center;
    margin-top: 30px;
}

.save-settings, .preview-settings {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 0 10px;
    transition: background-color 0.3s;
}

.save-settings {
    background-color: #2ecc71;
    color: white;
    padding: 15px 30px;
    font-size: 16px;
}

.save-settings:hover {
    background-color: #27ae60;
}

.preview-settings {
    background-color: #2271b1;
    color: #fff;
    border-color: #2271b1;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
}

.preview-settings:hover {
    background-color: #135e96;
    border-color: #135e96;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.preview-day {
    margin-bottom: 15px;
    padding: 15px;
    border-left: 4px solid #3498db;
    background-color: #f8f9fa;
}

.preview-day h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.preview-times {
    margin-bottom: 10px;
}

.preview-breaks {
    color: #e67e22;
    font-style: italic;
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: bold;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-container {
        padding: 10px;
    }
    
    .schedule-container {
        grid-template-columns: 1fr;
    }
    
    .time-slot, .break-item {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .time-slot span {
        text-align: center;
    }
    
    .calendar-grid {
        font-size: 14px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}
