/* --- 기본 설정 --- */
:root {
    --bg-color: #f4f6f8;
    --text-color: #333;
    --card-bg: #ffffff;
    --border-color: #ddd;
    
    /* 포인트 컬러 */
    --color-a: #5D9CEC; /* Blue */
    --color-b: #48CFAD; /* Green */
    --color-c: #AC92EC; /* Purple */
    --color-d: #FFCE54; /* Orange */
    
    --font-stack: 'Segoe UI', 'Noto Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 20px;
}

/* --- 헤더 --- */
header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

header p {
    font-size: 1.1rem;
    color: #666;
}

/* --- 그리드 레이아웃 (반응형) --- */
.room-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 기본: 가로 4개 */
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 태블릿: 2열 x 2행 */
@media (max-width: 1024px) {
    .room-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 모바일: 1열 세로 */
@media (max-width: 600px) {
    .room-container {
        grid-template-columns: 1fr;
    }
}

/* --- 카드 디자인 --- */
.room-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.room-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

/* 회의실별 헤더 색상 */
.room-a .room-header { background-color: var(--color-a); }
.room-b .room-header { background-color: var(--color-b); }
.room-c .room-header { background-color: var(--color-c); }
.room-d .room-header { background-color: var(--color-d); }

.room-header h2 { font-size: 1.25rem; font-weight: 600; }
.badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.room-body {
    padding: 20px;
}

/* --- 폼 요소 --- */
.form-group { margin-bottom: 15px; }

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
}
.form-group label i { margin-right: 6px; width: 16px; text-align: center; }

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

/* 회사 선택 드롭다운 스타일 추가 */
.input-company {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: #fff;
    transition: border-color 0.2s;
}

/* 포커스 효과 */
input:focus, select:focus {
    outline: none;
    border-color: #555;
}

/* 시간 선택 드롭다운 그룹 */
.time-inputs {
    display: flex;
    gap: 5px;
}
.time-inputs select {
    flex: 1;
    padding: 8px 5px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
}

/* 예약 버튼 */
.btn-book {
    width: 100%;
    padding: 12px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 5px;
}
.btn-book:hover { background-color: #555; }

/* --- 예약 목록 --- */
hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.booking-list-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #444;
}

.booking-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

.booking-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.booking-info {
    display: flex;
    flex-direction: column-reverse;
}
.booking-time { font-size: 0.85rem; color: #666; }
.booking-name { font-weight: bold; font-size: 0.85rem; color: #000; }

.btn-cancel {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}
.btn-cancel:hover { color: #a71d2a; }

/* --- 모달 --- */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal.hidden { display: none; }

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-content h3 { margin-bottom: 10px; }
.modal-content input {
    margin: 15px 0;
    text-align: center;
    letter-spacing: 5px;
    font-size: 1.2rem;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-buttons button {
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}
#modal-confirm-btn { background: #333; color: white; }
#modal-cancel-btn { background: #eee; color: #333; }