/* ===== CALENDAR ===== */
.calendar-box {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.calendar-header {
    background: #6a1b9a;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-header button {
    background: #6a1b9a;
    border: none;
    color: white;
    width: 32px; height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.calendar-header button:hover { background: rgba(255,255,255,0.3); }

#monthYear {
    color: white;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 1px solid #f0ebf8;
}

.day-name {
    text-align: center;
    padding: 10px 4px;
    font-size: 12px;
    font-weight: 700;
    color: #6a1b9a;
    background: #fdf8ff;
    border-bottom: 1px solid #f0ebf8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.day-cell {
    min-height: 90px;
    padding: 6px;
    border-right: 1px solid #f0ebf8;
    border-bottom: 1px solid #f0ebf8;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.day-cell:hover { background: #fdf8ff; }

.day-cell.other-month { background: #fafafa; opacity: 0.5; }

.day-cell.today { background: #f3e5f5; }

.day-number {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    width: 24px; height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 3px;
}

.day-cell.today .day-number {
    background: #6a1b9a;
    color: white;
}

.day-cell.other-month .day-number { color: #ccc; }

.event-chip {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: opacity 0.15s;
}

.event-chip:hover { opacity: 0.8; }

.more-chip {
    font-size: 11px;
    color: #6a1b9a;
    padding: 2px 4px;
    cursor: pointer;
    font-weight: 600;
}

.more-chip:hover { text-decoration: underline; }

/* ===== ROOM STATUS ===== */
.room-status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0ebf8;
    font-size: 14px;
}

.room-status-item:last-child { border-bottom: none; }

.room-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.room-name-text { flex: 1; font-weight: 500; }

.room-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.room-badge.busy { background: #ef4444; }
.room-badge.free { background: #10b981; }

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal.show { display: flex; }

.modal-content {
    background: white;
    border-radius: 16px;
    width: 500px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from { transform: translateY(16px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.close {
    float: right;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.15s;
}

.close:hover { color: #ef4444; }

#modalDate {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 16px;
    padding-right: 30px;
}

.add-btn {
    background: #6a1b9a;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.add-btn:hover { background: #4a148c; }

/* Modal Event Items */
.modal-event-item {
    padding: 12px;
    border-radius: 8px;
    background: #fdf8ff;
    margin-bottom: 10px;
    border-left: 4px solid #6a1b9a;
}

.mev-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 5px;
    color: #1a1a2e;
}

.mev-meta {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.mev-meta i { color: #6a1b9a; margin-right: 2px; }

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

.btn-sm {
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.15s;
}

.btn-sm:hover { opacity: 0.85; }
.btn-edit { background: #e3f2fd; color: #1565c0; }
.btn-del  { background: #fdecea; color: #c62828; }
.btn-cancel-form { background: #f3f4f6; color: #374151; }
.btn-save-form   { background: #6a1b9a; color: white; }

/* Detail block */
.detail-block {
    border-radius: 8px;
    background: #fdf8ff;
    padding: 14px;
    border-left: 4px solid #6a1b9a;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    font-size: 14px;
    border-bottom: 1px solid #f0ebf8;
}

.detail-row:last-child { border-bottom: none; }
.detail-row i { color: #6a1b9a; margin-top: 2px; width: 14px; }

.status-badge-inline {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

/* Booking Form */
.booking-form { margin-top: 12px; }

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

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
}



.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6a1b9a;
}

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

.form-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

/* Toast */
.toast-msg {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1a1a2e;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-msg.show {
    transform: translateY(0);
    opacity: 1;
}