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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
}

.login-container h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: #fafafa;
    color: #484948;
    transition: all 0.3s;
}

.login-container input:focus {
    outline: none;
    border-color: #DAC182;
    background: white;
}

.login-container button {
    width: 100%;
    padding: 12px;
    background: #DAC182;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.login-container button:hover {
    background: #C5AC6E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 193, 130, 0.3);
}

.main-container {
    display: none;
    max-width: 1400px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.header {
    background: #ffffff;
    color: #333;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.logout-btn {
    padding: 10px 20px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #555;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.logout-btn:hover {
    background: #e8e8e8;
    border-color: #ccc;
    transform: translateY(-2px);
}

.content {
    padding: 30px;
    background: #fafafa;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    padding: 0 20px;
    border-radius: 8px 8px 0 0;
}

.tab {
    padding: 15px 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #777;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-weight: 500;
}

.tab.active {
    color: #333;
    border-bottom-color: #DAC182;
    font-weight: 600;
}

.tab:hover {
    color: #555;
    background: #fafafa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.staff-section {
.staff-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.staff-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    border: 1px solid #e8e8e8;
    transition: all 0.3s;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: #ddd;
}

.staff-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    font-weight: bold;
    border: 2px solid #f0f0f0;
    overflow: hidden;
    position: relative;
}

.staff-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-upload-container {
    text-align: center;
    margin-bottom: 15px;
}

.image-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    font-weight: bold;
    border: 3px solid #f0f0f0;
    overflow: hidden;
    background: #e0e0e0;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin-top: 10px;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: inline-block;
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: all 0.3s;
    font-weight: 500;
}

.file-input-label:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

.remove-image-btn {
    display: inline-block;
    margin-left: 10px;
    padding: 8px 16px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.remove-image-btn:hover {
    background: #ff5252;
}

.staff-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.delete-staff {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 10px;
    transition: all 0.3s;
    font-weight: 500;
    margin-left: 5px;
}

.delete-staff:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

.edit-staff {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 10px;
    transition: all 0.3s;
    font-weight: 500;
}

.edit-staff:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.staff-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.modal-header h2 {
    color: #333;
    font-weight: 600;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cancel {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: #e8e8e8;
}

.btn-save {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-save:hover {
    background: #45a049;
}

.add-staff-form, .add-vacation-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e8e8e8;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    transition: all 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #DAC182;
    background: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-primary {
    background: #DAC182;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #C5AC6E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 193, 130, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.vacation-list {
    background: transparent;
}

.vacation-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-left: 4px solid;
    background: white;
    margin-bottom: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    position: relative;
    border-top: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

.vacation-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.vacation-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    font-weight: bold;
    margin-right: 20px;
    border: 2px solid #f0f0f0;
    overflow: hidden;
}

.vacation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vacation-info {
    flex: 1;
}

.vacation-name {
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 5px;
    color: #333;
}

.vacation-dates {
    color: #888;
    font-size: 14px;
}

.delete-vacation {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 13px;
}

.delete-vacation:hover {
    background: #ff5252;
    transform: translateY(-1px);
}

.calendar-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
}

.filter-container {
    padding: 15px 20px;
    background: #fafafa;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.filter-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    border-color: #DAC182;
    background: #fafafa;
}

.filter-btn.active {
    background: #DAC182;
    border-color: #DAC182;
    color: white;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fafafa;
    border-radius: 11px 11px 0 0;
    border-bottom: 1px solid #e8e8e8;
}

.calendar-header h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    padding: 8px 16px;
    background: white;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.calendar-nav button:hover {
    background: #f5f5f5;
    border-color: #ccc;
    transform: translateY(-1px);
}

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

.calendar-day-header {
    background: #f5f5f5;
    color: #555;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    background: white;
    min-height: 100px;
    padding: 10px;
    position: relative;
    overflow: visible;
}

.calendar-day.other-month {
    background: #fafafa;
    color: #ccc;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.calendar-vacation {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 3px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    position: relative;
    display: block;
    font-weight: 500;
    background: linear-gradient(90deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 100%);
}

.calendar-vacation:hover {
    z-index: 10;
    filter: brightness(1.1);
}

.vacation-tooltip {
    display: none;
    position: fixed;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 10000;
    min-width: 120px;
    text-align: center;
}

#globalTooltip {
    display: none;
}

#globalTooltip.show {
    display: block;
}

.tooltip-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 8px;
    display: block;
    border: 2px solid #f0f0f0;
}

.tooltip-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    font-weight: bold;
    margin: 0 auto 8px;
    border: 2px solid #f0f0f0;
}

.tooltip-name {
    text-align: center;
    color: #333;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.tooltip-dates {
    text-align: center;
    color: #666;
    font-size: 12px;
    font-weight: 500;
}

/* Rotation prompt for mobile portrait */
.rotation-prompt {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #DAC182 0%, #C5AC6E 100%);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 40px;
    text-align: center;
}

/* Room bookings styles */
.room-date-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
}

.room-date-nav button {
    padding: 10px 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.room-date-nav button:hover {
    border-color: #DAC182;
    background: #fafafa;
}

.room-date-nav .current-date {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    min-width: 150px;
    text-align: center;
}

.room-grid-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    padding: 20px;
}

/* Table-based room grid with rowspan */
.room-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px;
    table-layout: fixed; /* Equal column widths! */
}

.room-table th:first-child,
.room-table td:first-child {
    width: 80px; /* Fixed width for time column */
}

.room-table thead tr {
    background: #fafafa;
}

.room-table-header {
    background: #fafafa;
    padding: 15px 10px;
    font-weight: 600;
    text-align: center;
    color: #555;
    font-size: 14px;
    border: 1px solid #e8e8e8;
}

.room-table-time {
    background: #fafafa;
    padding: 10px;
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: 500;
    border: 1px solid #e8e8e8;
}

.room-table-cell {
    background: white;
    min-height: 4px;
    height: 4px;
    position: relative;
    padding: 0;
    border: 1px solid #e8e8e8;
    vertical-align: top;
}

.room-booking {
    background: linear-gradient(90deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 100%);
    border-radius: 0;
    padding: 8px;
    cursor: pointer;
    color: white;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 500;
    transition: all 0.3s;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.room-booking:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.room-booking-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.room-booking-role {
    font-size: 10px;
    opacity: 0.9;
}

.room-booking-time {
    font-size: 10px;
    margin-top: 4px;
    opacity: 0.95;
}

.add-room-booking-form {
    background: #fafafa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e8e8e8;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.time-input-group {
    display: flex;
    gap: 5px;
    align-items: center;
}

.time-input-group input {
    width: 60px;
    padding: 10px 5px;
    text-align: center;
}

.time-input-group span {
    font-weight: 600;
    color: #666;
}

.repeat-options {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.repeat-option {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.repeat-option input[type="radio"] {
    width: auto;
    margin: 0;
}

.repeat-option label {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.repeat-option input[type="number"] {
    width: 70px;
    padding: 5px;
    margin: 0 5px;
}

.rotation-icon {
    font-size: 80px;
    margin-bottom: 30px;
    animation: rotate-phone 2s ease-in-out infinite;
}

@keyframes rotate-phone {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.rotation-prompt h2 {
    color: white;
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: 600;
}

.rotation-prompt p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
}

/* Show rotation prompt only on mobile in portrait mode */
@media screen and (max-width: 768px) and (orientation: portrait) {
    .rotation-prompt {
        display: flex;
    }
}

.error {
    color: #e74c3c;
    margin-top: 10px;
    text-align: center;
}

.success {
    color: #27ae60;
    margin-top: 10px;
    text-align: center;
}

.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.success-notification.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

.success-icon {
    width: 24px;
    height: 24px;
    background: white;
    color: #4CAF50;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.color-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-option {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #f0f0f0;
    transition: all 0.3s;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: #ddd;
}

.color-option.selected {
    border-color: #DAC182;
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #484948;
}

.spinner {
    border: 3px solid #F7F3F2;
    border-top: 3px solid #DAC182;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Compact header with logout icon */
.header-compact {
    background: #ffffff;
    border-bottom: 2px solid #f0f0f0;
    padding: 15px 20px;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logout-link {
    color: #666;
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 6px;
}

.logout-link:hover {
    color: #DAC182;
    background: #f5f5f5;
}

/* Week navigation */
.room-week-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    background: #fafafa;
    border-radius: 8px;
}

.current-weekday {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.current-week {
    font-size: 12px;
    color: #888;
}

.room-day-nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 10px 0;
}

.room-day-nav button {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.room-day-nav button:hover {
    background: #DAC182;
    border-color: #DAC182;
    color: white;
}

/* Mobile adjustments for compact header */
@media (max-width: 768px) {
    .header-compact {
padding: 10px;
    }
    
    .header-content {
flex-direction: column;
gap: 10px;
    }
    
    .logout-link {
font-size: 18px;
    }
    
    .room-week-info {
width: 100%;
    }
}