body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}
/* 다운로드 버튼 스타일 */
.download-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.download-btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 3px 5px rgba(0,0,0,0.15);
}

.download-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.download-btn i {
    font-size: 11px;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.header {
    background-color: #2c3e50;
    color: white;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 5px;
}
.user-info-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.user-name {
    font-weight: bold;
    font-size: 14px;
}

.logout-btn, .change-pw-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.change-pw-btn {
    background-color: #3498db;
}

.main-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    flex: 1;
    text-align: center;
    text-decoration: none;
}

.unlock-container {
    background-color: #e74c3c;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.unlock-checkbox {
    transform: scale(1.3);
}

.room-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.horizontal-room-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 15px;
}

.vertical-room-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.room-item {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(25% - 15px);
}

.horizontal-room-item {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.vertical-room-item {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 12px;
    width: 100%;
    font-size: 16px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.room-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.room-selected-info {
    margin-top: 5px;
    padding-left: 25px;
    font-size: 14px;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

.room-checkbox {
    transform: scale(1.5);
    margin-right: 5px;
    flex-shrink: 0;
}

.room-number {
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-selected {
    background-color: #d4edff;
}

.room-selected-by-other {
    background-color: #f8f8f8;
    opacity: 0.7;
}

.room-selected-text {
    color: #3498db;
    font-weight: bold;
    margin-left: 8px;
    font-size: 14px;
}

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2ecc71;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    text-align: center;
    max-width: 90%;
    font-size: 14px;
}

.toast.error {
    background-color: #e74c3c;
}

.toast.show {
    opacity: 1;
}

/* Cleaning list details page */
.cleaning-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.cleaning-table th, .cleaning-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cleaning-table th {
    background-color: #2c3e50;
    color: white;
    font-size: 12px;
}

.cleaning-table tr:hover {
    background-color: #f9f9f9;
}

.cleaning-checkbox {
    transform: scale(1.3);
}

.cancel-row {
    font-style: italic;
    color: #e74c3c;
}

.badge {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
    flex-shrink: 0;
}
.badge-complete {
    background-color: #2ecc71; /* Green color for completed badge */
    color: white;
}

.complete-row {
    opacity: 0.6; /* Same opacity as cancel-row */
}

.badge-cancel {
    background-color: #e74c3c;
    color: white;
    font-weight: bold;
}
.badge-jaesil {
    background-color: #f39c12;
    color: white;
}

.badge-completed {
    background-color: #27ae60;
    color: white;
}

.badge-canceled {
    background-color: #e74c3c;
    color: white;
}

.badge-noshow {
    background-color: #9b59b6;
    color: white;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #2ecc71;
    transition: width 0.3s;
}

.inspect-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
/* 아래 스타일 추가 */
.inspect-btn:disabled {
    background-color: #a1c6e7;
    cursor: not-allowed;
    opacity: 0.7;
}

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

.modal-content {
    background-color: white;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 15px;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #7f8c8d;
}

.modal-body {
    margin-bottom: 15px;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.checkbox-item input[type="checkbox"] {
    transform: scale(1.3);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.save-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.cancel-btn {
    background-color: #7f8c8d;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

/* Login page */
.login-container {
    max-width: 320px;
    margin: 60px auto;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.login-btn {
    width: 100%;
    padding: 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 10px;
}

.register-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.register-btn:hover {
    background-color: #27ae60;
}

.success-message {
    background-color: #2ecc71;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

.error-message {
    background-color: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.note {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 15px;
}

.special-note {
    background-color: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 12px;
    color: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .user-info {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }

    .main-buttons {
        flex-direction: row;
    }

    .btn {
        padding: 8px;
        font-size: 13px;
        min-height: 50px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        line-height: 1.3;
    }
    
    /* 가져오기 버튼 내의 텍스트 스타일 */
    .date-fetch-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.3;
        padding: 10px 8px;
        height: auto;
        gap: 4px;
    }
    
    .date-fetch-btn .date-part {
        display: block;
        white-space: nowrap;
        margin: 0;
    }
    
    .date-fetch-btn .action-part {
        display: block;
        margin: 0;
    }

    .cleaning-table {
        font-size: 12px;
    }

    .cleaning-table th, .cleaning-table td {
        padding: 6px 4px;
    }

    .modal-content {
        width: 95%;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 16px;
    }

    .logout-btn, .change-pw-btn {
        font-size: 11px;
        padding: 4px 8px;
    }

    .user-name {
        font-size: 12px;
    }

    .vertical-room-item {
        padding: 10px;
        font-size: 14px;
    }

    .room-checkbox {
        transform: scale(1.3);
    }

    .btn {
        font-size: 12px;
    }

    .toast {
        font-size: 12px;
        padding: 8px 15px;
    }
}
/* 날짜 네비게이션 스타일 */
.date-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    gap: 15px;
}

.date-nav-btn {
    background-color: #3498db;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s;
}

.date-nav-btn:hover {
    background-color: #2980b9;
}

.date-picker-container {
    position: relative;
}

#datePicker {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    min-width: 200px;
}

/* 공지사항 섹션 스타일 */
.notice-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.notice-section h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 18px;
}

.notice-input-container {
    display: flex;
    gap: 10px;
}

#dailyNotice {
    flex-grow: 1;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.daily-notice {
    background-color: #fef9e7;
    border-left: 4px solid #f39c12;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.daily-notice h4 {
    margin-top: 0;
    color: #f39c12;
    font-size: 16px;
}

.notice-content {
    color: #555;
    font-size: 14px;
}

/* 사용자 섹션 스타일 */
.user-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.user-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.user-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.user-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.checkout-badge {
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: normal;
}

.user-progress {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 5px;
}

.progress-text {
    font-size: 14px;
    margin-bottom: 5px;
    color: #555;
}

.rooms-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.room-card {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.room-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.room-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.room-status-badges {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.room-address {
    font-weight: bold;
    color: #2c3e50;
}

.room-type {
    color: #7f8c8d;
    font-size: 14px;
}

.room-actions {
    display: flex;
    gap: 15px;
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #555;
}

.room-progress {
    margin-bottom: 10px;
}

.progress-label {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}

.room-memo {
    background-color: #fff;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
}

.memo-label {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
}

.memo-input-container {
    display: flex;
    gap: 10px;
}

.memo-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.memo-save-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

/* 접근 거부 페이지 스타일 */
.access-denied {
    text-align: center;
    margin: 50px 0;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.access-denied h2 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.access-denied p {
    color: #555;
    font-size: 16px;
}
/* 배정되지 않은 객실 섹션 스타일 */
.unassigned-section {
    background-color: #f8f9fa;
    border-left: 4px solid #95a5a6;
}

.unassigned-section .user-header h3 {
    color: #7f8c8d;
}

.unassigned-section .badge {
    background-color: #95a5a6;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: normal;
    margin-left: 10px;
}

.unassigned-section .room-card {
    background-color: #fff;
    border: 1px dashed #ccc;
}
/* 날짜 제목과 전체 진행률 컨테이너 */
.date-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin: 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.date-title-container h2 {
    margin: 0;
    color: #2c3e50;
}

.overall-progress {
    min-width: 250px;
    max-width: 350px;
}

.overall-progress .progress-text {
    font-size: 14px;
    margin-bottom: 5px;
    text-align: right;
    color: #555;
}

.overall-progress .progress-bar-container {
    height: 10px;
}

@media (max-width: 768px) {
    .date-title-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .overall-progress {
        width: 100%;
        max-width: 100%;
    }
    
    .overall-progress .progress-text {
        text-align: left;
    }
}
.checkout-time {
    font-size: 11px;
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    font-weight: normal;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Tooltip for admin-only info */
[title] {
    position: relative;
    cursor: help;
}

[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    opacity: 0.9;
}

[title]:hover::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    z-index: 100;
}
/* 완료 배지 스타일 */
.badge-complete {
    background-color: #2ecc71;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    margin-left: 5px;
}

/* 완료 시간 스타일 */
.completion-time {
    font-size: 11px;
    color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    font-weight: normal;
    display: inline-block;
    vertical-align: middle;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

/* 모바일 화면에서 배지와 시간 표시 조정 */
@media (max-width: 480px) {
    .room-title {
        flex-wrap: wrap;
    }
    
    .room-address, .room-type {
        margin-bottom: 5px;
    }
    
    .badge, .completion-time {
        margin-bottom: 5px;
    }
}
/* 다이렉트 메시지 스타일 */
.direct-message-container {
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.message-details {
    width: 100%;
}

.message-details summary {
    padding: 10px 15px;
    background-color: #f1f1f1;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.message-details summary:hover {
    background-color: #e4e4e4;
}

.message-form {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-input {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.message-actions {
    display: flex;
    gap: 10px;
}

.send-message-btn, .view-message-history-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.send-message-btn {
    background-color: #3498db;
    color: white;
}

.view-message-history-btn {
    background-color: #95a5a6;
    color: white;
}

/* 메시지 히스토리 모달 스타일 */
.message-history-content {
    max-height: 400px;
    overflow-y: auto;
}

.message-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.message-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.message-sender {
    font-weight: bold;
    color: #2c3e50;
}

.message-time {
    color: #7f8c8d;
    font-size: 12px;
}

.message-body {
    color: #333;
    line-height: 1.5;
}

.no-messages {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

/* 받은 메시지 스타일 (view_cleaning_list.php) */
.received-messages {
    background-color: #f4f9ff;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.received-messages h4 {
    margin-top: 0;
    color: #3498db;
    font-size: 16px;
    margin-bottom: 10px;
}

.received-messages .message-list {
    background-color: white;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.received-messages .message-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.received-messages .message-item:last-child {
    border-bottom: none;
}

.received-messages .message-header {
    margin-bottom: 8px;
}

.received-messages .message-body {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}
/* 메시지 확인 스타일 */
.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
}

.read-time {
    font-size: 12px;
    color: #7f8c8d;
}

.message-status {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
}

.message-status.read {
    background-color: #e8f6e9;
    color: #27ae60;
}

.message-status.unread {
    background-color: #f8f9fa;
    color: #7f8c8d;
}

.checkbox-label input[type="checkbox"] {
    margin-left: 5px;
}
/* 객실 메모 스타일 */
.room-memo-container {
    width: 100%;
}

.memo-details {
    width: 100%;
}

.memo-details summary {
    padding: 8px 12px;
    background-color: #f1f1f1;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    color: #2c3e50;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.memo-details summary:hover {
    background-color: #e4e4e4;
}

.memo-form {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #f9f9f9;
    border-radius: 0 0 4px 4px;
}

.memo-input {
    width: 100%;
    height: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.memo-actions {
    display: flex;
    gap: 8px;
}

.send-memo-btn, .view-memo-history-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.send-memo-btn {
    background-color: #3498db;
    color: white;
}

.view-memo-history-btn {
    background-color: #95a5a6;
    color: white;
}

/* 객실 메모 내역 스타일 */
.room-memo-comments {
    margin-top: 10px;
    width: 100%;
}

.room-memo-comments summary {
    padding: 8px 12px;
    background-color: #f8f9fa;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
    color: #666;
    transition: background-color 0.2s;
}

.room-memo-comments summary:hover {
    background-color: #e9ecef;
}

.memo-comments-container {
    padding: 15px;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    border: 1px solid #eee;
    max-height: 300px;
    overflow-y: auto;
}

/* 메모 컨테이너 내부 스크롤바 스타일 */
.memo-comments-container::-webkit-scrollbar {
    width: 6px;
}

.memo-comments-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.memo-comments-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.memo-comments-container::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.no-comments {
    color: #7f8c8d;
    font-size: 13px;
    text-align: center;
    padding: 15px;
}

.memo-comments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.memo-comment-item {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
    background-color: #f0f7ff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-left: 3px solid #3498db;
}

.memo-comment-item:last-child {
    margin-bottom: 0;
}


.memo-comment-item.read {
    background-color: #f5f5f5;
    border-left-color: #95a5a6;
}

.memo-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
}

.memo-author-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-author {
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
}

.memo-read-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-size: 12px;
    color: #7f8c8d;
}

.checkbox-text {
    font-size: 12px;
    display: inline-block;
    vertical-align: middle;
}

.comment-time {
    color: #7f8c8d;
    font-size: 12px;
    background-color: rgba(52, 152, 219, 0.08);
    padding: 2px 8px;
    border-radius: 12px;
}

.memo-comment-content {
    color: #34495e;
    font-size: 14px;
    line-height: 1.5;
    margin: 10px 0;
    padding: 8px 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.memo-comment-footer {
    display: flex;
    justify-content: flex-end;
    font-size: 12px;
    margin-top: 5px;
}

.memo-history-content {
    max-height: 300px;
    overflow-y: auto;
}
/* 받은 메시지 스타일 (view_cleaning_list.php) */
.received-messages {
    background-color: #f4f9ff;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.received-messages .message-details summary {
    font-weight: bold;
    font-size: 16px;
    color: #3498db;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.received-messages .message-list {
    background-color: white;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 10px;
}

.received-messages .message-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.received-messages .message-item:last-child {
    border-bottom: none;
}

.received-messages .message-item.unread {
    background-color: #f8f8ff;
}

.received-messages .message-header {
    margin-bottom: 8px;
}

.received-messages .message-body {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.unread-badge {
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: normal;
    margin-left: 10px;
}
/* 락 알림 스타일 */
.lock-notice {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.lock-icon {
    font-size: 40px;
    color: #6c757d;
    margin-bottom: 15px;
}

.lock-notice h3 {
    color: #495057;
    margin: 0 0 10px 0;
    font-size: 18px;
}

.lock-notice p {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
}
.badge-noshow {
    background-color: #9b59b6;  /* 보라색 */
    color: white;
    font-weight: bold;
}

.noshow-btn {
    background-color: #9b59b6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    margin-left: 5px;
}
.custom-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-label:has(.custom-checkbox:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}
.custom-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-label:has(.custom-checkbox:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 메모 내역 모달 스타일 */
.memo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.memo-item {
    position: relative;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    background-color: #f0f7ff;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid #3498db;
}

.memo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

.memo-item:last-child {
    margin-bottom: 0;
}

.memo-item:nth-child(odd) {
    background-color: #f0f7ff;
    border-left-color: #3498db;
}

.memo-item:nth-child(even) {
    background-color: #f5f0ff;
    border-left-color: #9b59b6;
}

.memo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
}

.memo-author {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
    background-color: rgba(52, 152, 219, 0.15);
    padding: 5px 10px;
    border-radius: 20px;
}

.memo-time {
    color: #7f8c8d;
    font-size: 12px;
    background-color: rgba(52, 152, 219, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
}

.memo-content {
    color: #34495e;
    font-size: 15px;
    line-height: 1.6;
    margin: 15px 0;
    padding: 12px 15px;
    background-color: #ffffff;
    border-radius: 10px;
    white-space: pre-wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.memo-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

.read-time {
    color: #7f8c8d;
    font-style: italic;
    font-size: 12px;
    background-color: rgba(52, 152, 219, 0.08);
    padding: 2px 8px;
    border-radius: 12px;
}

.memo-history-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.no-messages {
    text-align: center;
    color: #7f8c8d;
    padding: 40px;
    font-size: 15px;
    background-color: #fff;
    border-radius: 10px;
    border: 1px dashed #e1e1e1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 메모 내역 모달 스크롤바 스타일 */
.memo-history-content::-webkit-scrollbar {
    width: 8px;
}

.memo-history-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.memo-history-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.memo-history-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 메모 내역 모달 크기 조정 */
#memoHistoryModal .modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
}

#memoHistoryModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
    padding: 15px 20px;
}

#memoHistoryModal .modal-header h3 {
    color: #2c3e50;
    font-size: 18px;
    margin: 0;
}

#memoHistoryModal .modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e1e1e1;
    padding: 15px 20px;
}
/* 사진 업로드 버튼 스타일 */
.photo-upload-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
}

.photo-upload-btn:hover {
    background-color: #2980b9;
}

/* 업로드 진행률 표시 스타일 */
.upload-progress-container {
    margin-top: 10px;
    width: 100%;
}

.progress-label {
    font-size: 12px;
    margin-bottom: 4px;
}

/* 메모 내 이미지 스타일 */
.memo-images {
    margin-top: 10px;
    width: 100%;
}

.image-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 5px 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.thumbnail-wrapper {
    flex: 0 0 auto;
}

.memo-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.memo-thumbnail:hover {
    transform: scale(1.05);
}

/* 이미지 뷰어 모달 스타일 */
.image-viewer-content {
    width: 95%;
    max-width: 90vw;
    padding: 10px;
    background-color: rgba(0,0,0,0.8);
}

.image-viewer-content .modal-header {
    justify-content: flex-end;
    background: transparent;
    border: none;
}

.image-viewer-content .close-modal {
    color: white;
    font-size: 24px;
}

.image-viewer-content .modal-body {
    text-align: center;
    padding: 0;
}

#fullSizeImage {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

/* Toast 스타일 수정 - 항상 최상단에 표시 */
.toast {
    z-index: 9999; /* 가장 높은 z-index 값 설정 */
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 16px;
    }

    .logout-btn, .change-pw-btn {
        font-size: 11px;
        padding: 4px 8px;
    }

    .user-name {
        font-size: 12px;
    }

    .vertical-room-item {
        padding: 10px;
        font-size: 14px;
    }

    .room-checkbox {
        transform: scale(1.3);
    }

    .btn {
        font-size: 12px;
    }

    .toast {
        font-size: 12px;
        padding: 8px 15px;
    }
    
    /* 모바일에서 사용자 섹션 레이아웃 최적화 */
    .user-header h3 {
        font-size: 16px;
    }
    
    .user-badges-container {
        margin-bottom: 5px;
    }
    
    .checkout-badge, .memo-stats-badge {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .checkout-time {
        font-size: 10px;
    }
    
    .progress-text {
        font-size: 13px;
    }
    
    .direct-message-container {
        margin-top: 10px;
    }
    
    /* 룸 카드 모바일 레이아웃 개선 */
    .room-header {
        flex-direction: row;
        align-items: center;
    }
    
    .room-title {
        margin-bottom: 8px;
        flex-wrap: wrap;
    }
    
    .room-actions {
        width: 100%;
        justify-content: space-between;
    }
}
