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

body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

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

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #e0e0e0;
}

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

button {
    padding: 10px 15px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #555;
}

#currentMonth {
    font-weight: bold;
}

#calendar {
    background: #2d2d2d;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-scroll-wrapper {
    overflow-x: auto;
    width: 100%;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #666;
    color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.calendar-header div {
    min-width: 120px;
    padding: 15px 8px;
    text-align: center;
    font-weight: bold;
    background-color: #666;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    position: relative;
    gap: 1px;
    width: 100%;
    overflow-x: auto;
}

.calendar-day {
    min-width: 120px;
    min-height: 120px;
    border: 1px solid #404040;
    padding: 8px;
    position: relative;
    background-color: #2d2d2d;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
}

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

.calendar-day.clickable {
    cursor: pointer;
}

.calendar-day .day-number {
    font-weight: bold;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.day-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    max-height: 100px;
}

.event {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.travel-event {
    background: #2d5a2d;
    color: white;
}

.request-event {
    background: #cc6600;
    color: white;
}

.blackout-event {
    background: #5a2d2d;
    color: white;
}

.calendar-day.today {
    border: 2px solid #007bff;
    background-color: #1a2332;
}

.calendar-day.today.clickable {
    cursor: pointer;
}

.calendar-day.today .day-number {
    color: #007bff;
    font-weight: bold;
}

.calendar-day.other-month {
    background-color: #1a1a1a;
    color: #666;
}

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

.travel-span {
    position: absolute;
    background: #2d5016;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.travel-span:hover {
    opacity: 0.8;
}

.blackout-span {
    position: absolute;
    background-color: #8b0000;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: 16px;
    line-height: 16px;
}

.blackout-span:hover {
    opacity: 0.8;
}

.travel-item {
    background-color: #28a745;
    color: white;
    padding: 2px 6px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.travel-item:hover {
    background-color: #218838;
}

.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: #2d2d2d;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    color: #e0e0e0;
}

#adminModal .modal-content {
    width: 800px;
    max-width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}

#employeeList, #customerList {
    max-height: 80px;
    overflow-y: auto;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    background: #404040;
    color: #e0e0e0;
}

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

.close:hover {
    color: black;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

label {
    font-weight: bold;
}

input {
    padding: 8px;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #404040;
    color: #e0e0e0;
}

select {
    padding: 8px;
    border: 1px solid #555;
    border-radius: 4px;
    background-color: #404040;
    color: #e0e0e0;
}

.form-buttons {
    display: flex;
    gap: 10px;
}

#deleteBtn {
    background-color: #dc3545;
}

#deleteBtn:hover {
    background-color: #c82333;
}

.chat-modal-content {
    max-width: 600px;
    width: 90%;
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-modal-content h3 {
    margin: 0 0 15px 0;
    color: #e0e0e0;
    text-align: center;
}

.chat-panel {
    display: none;
    background: #2d2d2d;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    height: 300px;
    flex-direction: column;
    color: #e0e0e0;
}

#chatMessages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 400px;
    border: 1px solid #555;
    border-radius: 4px;
    margin-bottom: 15px;
    background: #1a1a1a;
}

.chat-input {
    display: flex;
    padding: 15px;
    gap: 10px;
    flex-shrink: 0;
}

#chatInput {
    flex: 1;
}

.message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 80%;
}

.user-message {
    background-color: #007bff;
    color: white;
    margin-left: auto;
}

.bot-message {
    background-color: #404040;
    color: #e0e0e0;
}
.admin-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #555;
    border-radius: 5px;
}

.admin-section h4 {
    margin-top: 0;
    color: #e0e0e0;
}

.admin-section input {
    margin: 5px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.admin-section button {
    margin: 5px;
    padding: 8px 15px;
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.admin-section button:hover {
    background: #555;
}

#employeeList, #customerList {
    margin: 10px 0;
    padding: 10px;
    background: #404040;
    border-radius: 4px;
    min-height: 50px;
    color: #e0e0e0;
}

.list-item {
    display: inline-block;
    background: #555;
    padding: 5px 10px;
    margin: 2px;
    border-radius: 15px;
    font-size: 14px;
    position: relative;
    color: #e0e0e0;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: #c82333;
}
.auth-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: #2d2d2d;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    color: #e0e0e0;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #e0e0e0;
}

.auth-container input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #555;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #404040;
    color: #e0e0e0;
}

.auth-container button {
    width: 100%;
    padding: 12px;
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.auth-container button:hover {
    background: #555;
}

.auth-container p {
    text-align: center;
    margin-top: 20px;
}

.auth-container a {
    color: #999;
    text-decoration: none;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    position: relative;
}

.header h1 {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    font-size: 1.5rem;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .menu-container {
        order: -1;
    }
}

.menu-container {
    position: relative;
}

.menu-button {
    background: #666;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 25px;
}

.menu-button:hover {
    background: #555;
}

.menu-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: red;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
}

.request-count {
    color: red;
    font-weight: bold;
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #2d2d2d;
    border: 1px solid #555;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    min-width: 150px;
}

.menu-dropdown.show {
    display: block;
}

.menu-dropdown button {
    display: block;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid #555;
    color: #e0e0e0;
}

.menu-dropdown button:last-child {
    border-bottom: none;
}

.menu-dropdown button:hover {
    background: #404040;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

#userInfo {
    color: #666;
    font-size: 14px;
}
.password-modal-content {
    max-width: 600px;
    width: 90%;
}

.day-events-modal-content {
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
}

.day-events-list {
    max-height: 320px;
    overflow-y: auto;
    min-height: 200px;
}

.day-event-item {
    padding: 12px;
    margin: 8px 0;
    border-radius: 4px;
    border-left: 4px solid;
    cursor: pointer;
}

.day-event-item:hover {
    opacity: 0.8;
}

.day-event-item.travel-event {
    background-color: #2d5016;
    border-left-color: #4a7c59;
}

.day-event-item.request-event {
    background-color: #cc6600;
    border-left-color: #ff8c00;
}

.day-event-item.blackout-event {
    background-color: #8b0000;
    border-left-color: #dc2626;
}

.event-title {
    font-weight: bold;
    margin-bottom: 4px;
}

/* Mobile calendar layout */
@media (max-width: 900px) {
    .calendar-header {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 1px;
        font-size: 10px;
        text-align: center;
        font-weight: bold;
        padding: 0;
        margin: 0;
        background-color: #2d2d2d;
    }
    
    .calendar-header > div {
        padding: 4px 2px;
        background-color: #2d2d2d;
        min-width: 40px; /* Match calendar day width */
    }
    
    .calendar-grid {
        gap: 1px;
    }
    
    .calendar-day {
        min-height: 40px;
        min-width: 40px;
        padding: 2px;
        position: relative;
        font-size: 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .calendar-day .day-number {
        font-size: 12px;
        position: absolute;
        top: 2px;
        left: 2px;
    }
    
    .calendar-day .day-events {
        display: none; /* Hide individual events on mobile */
    }
    
    .calendar-day .event-badge {
        position: static; /* Center in the day cell */
        width: 24px;
        height: 24px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: bold;
        color: white;
        margin-top: 8px;
    }
    
    .event-badge.requests {
        background-color: #cc6600; /* Dark orange for requests */
    }
    
    .event-badge.travel {
        background-color: #2d5016; /* Dark green for travel */
    }
    
    .event-badge.blackout {
        background-color: #8b0000; /* Dark red for blackouts only */
    }
    
    .calendar-header h2 {
        font-size: 18px;
        margin: 10px 0;
    }
    
    .calendar-nav button {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Request modal should appear above day modal */
#requestModal {
    z-index: 1100;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

.account-menu {
    position: relative;
    display: inline-block;
}

.account-button {
    background: #666;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 25px;
}

.account-button:hover {
    background: #555;
}

.account-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 4px;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 1000;
}

.username-display {
    padding: 10px 15px;
    border-bottom: 1px solid #555;
    color: #e0e0e0;
    font-weight: bold;
    font-size: 14px;
}

.account-dropdown button {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #e0e0e0;
    padding: 10px 15px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
}

.account-dropdown button:hover {
    background: #333;
}

@media (max-width: 900px) {
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-direction: row;
    }
    
    .header h1 {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 16px;
        margin: 0;
    }
    
    .menu-button {
        font-size: 20px;
        padding: 8px 10px;
    }
    
    .account-button {
        font-size: 20px;
        padding: 8px 10px;
    }
}

.floating-chat-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: none;
}

.floating-chat-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.floating-add-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    font-size: 32px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.floating-add-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.floating-request-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    font-size: 32px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.floating-request-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.request-span {
    background: #cc6600;
    color: white;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-span:hover {
    background: #b35900;
}
