:root {
    --bg-color: #f8f9fa;
    --sidebar-bg: #ffffff;
    --main-bg: #f0f2f5;
    --primary-color: #a8dadc;
    --secondary-color: #457b9d;
    --accent-color: #e63946;
    --text-color: #2b2d42;
    --light-text-color: #f1faee;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --seat-bg: #83c5be;
    --seat-occupied-bg: #ffb4a2;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100%;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    padding: 30px;
    box-shadow: 2px 0 15px var(--shadow-color);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 20px;
}

.date-display {
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
    color: var(--secondary-color);
    background-color: #eaf4f4;
    padding: 10px;
    border-radius: 8px;
}

.controls h3, .todo-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.controls button {
    display: block;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: linear-gradient(145deg, #e6e6e6, #ffffff);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-color);
    text-align: left;
    transition: all 0.2s ease-in-out;
    box-shadow: 3px 3px 5px #cbced1, -3px -3px 5px #ffffff;
}

.controls button:hover {
    box-shadow: inset 2px 2px 4px #cbced1, inset -2px -2px 4px #ffffff;
}

.controls button i {
    margin-right: 10px;
    color: var(--secondary-color);
}

#delete-all-seats-btn i { color: var(--accent-color); }


/* --- Todo Section --- */
.todo-section {
    margin-top: auto;
}
.todo-input-group {
    display: flex;
    margin-bottom: 15px;
}

#todo-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px 0 0 8px;
    background-color: #f0f2f5;
}

#add-todo-btn {
    padding: 10px 15px;
    border: none;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border-radius: 0 8px 8px 0;
    cursor: pointer;
}

#todo-list {
    list-style: none;
    padding: 0;
    max-height: 150px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 5px;
}
.todo-item.completed { text-decoration: line-through; color: #999; }


/* --- Main Content --- */
.main-content {
    flex: 1;
    background-color: var(--main-bg);
    padding: 20px;
}

.seat-map-container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background-color: #e0e5ec;
    box-shadow: inset 5px 5px 10px #a3b1c6, inset -5px -5px 10px #ffffff;
    overflow: hidden;
}

/* --- Seat --- */
.seat {
    width: 120px;
    height: 120px;
    position: absolute;
    cursor: pointer;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    touch-action: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, var(--seat-bg), #6aa8a1);
    box-shadow: 7px 7px 15px #a3b1c6, -7px -7px 15px #ffffff;
    color: var(--light-text-color);
}

.seat.occupied {
    background: linear-gradient(145deg, var(--seat-occupied-bg), #e6a89a);
}

.seat .seat-number {
    font-weight: 600;
    font-size: 22px;
}

.seat .seat-info {
    font-size: 14px;
    margin-top: 5px;
}

.seat.alarm-ringing {
    animation: alarm-ringing 0.8s infinite alternate;
    box-shadow: 0 0 20px 5px var(--accent-color);
}

@keyframes alarm-ringing {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #e0e5ec;
    margin: 15% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 10px 10px 20px #a3b1c6, -10px -10px 20px #ffffff;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-color);
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    color: var(--secondary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background-color: #e0e5ec;
    box-shadow: inset 4px 4px 8px #a3b1c6, inset -4px -4px 8px #ffffff;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.modal-actions button {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#save-seat-info-btn {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    box-shadow: 3px 3px 5px #a3b1c6, -3px -3px 5px #ffffff;
}

#delete-seat-btn {
    background-color: #e0e5ec;
    color: var(--accent-color);
    box-shadow: 3px 3px 5px #a3b1c6, -3px -3px 5px #ffffff;
}

#save-seat-info-btn:hover, #delete-seat-btn:hover {
     box-shadow: inset 2px 2px 4px #a3b1c6, inset -2px -2px 4px #ffffff;
}
