/* ReservaSalas - Falcare Engineering */
:root {
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --primary: #007bff;
    --primary-wine: #8B1538;
    --primary-dark: #6B0E28;
    --text-color: #333;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --success: #28a745;
    --danger: #dc3545;
    --accent: #FFA500;

    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3 {
    font-weight: 700;
    color: #1a1a1a;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #8B1538 0%, #B01E47 100%);
}

.auth-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-wine);
    border-color: var(--primary-wine);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-danger {
    color: white;
    background-color: var(--danger);
}

/* Form Controls */
input.form-control, textarea.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 8px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    margin-bottom: 1rem;
}

input.form-control:focus, textarea.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: var(--primary-wine);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(139, 21, 56, 0.25);
}

/* Navbar */
.navbar {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-wine);
}

.container {
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

/* Main Layout with Sidebar */
.main-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

/* Room Sidebar (Vertical Cards) */
.room-sidebar {
    flex-shrink: 0;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.room-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
    box-shadow: var(--shadow);
}

.room-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-hover);
}

.room-card.active {
    border-color: var(--primary-wine);
    box-shadow: 0 4px 12px rgba(139, 21, 56, 0.25);
}

/* Calendar Area */
.calendar-area {
    flex: 1;
    min-width: 0;
}

.room-image {
    width: 100%;
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #f0f0f0;
}

.room-info {
    padding: 1rem;
}

.room-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.room-loc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Calendar Controls */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    background: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Calendar Grid - Compactado */
.calendar-grid {
    display: grid;
    grid-template-columns: 80px repeat(5, 1fr);
    gap: 0;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cal-header {
    background-color: var(--primary-wine);
    color: white;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.cal-time {
    background-color: #fafafa;
    padding: 0.4rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-muted);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid #f0f0f0;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-cell {
    background-color: white;
    cursor: pointer;
    transition: background 0.1s;
    height: 32px;
    position: relative;
    border-right: 1px solid #f5f5f5;
    border-bottom: 1px solid #f5f5f5;
}

.cal-cell:hover {
    background-color: #f8f9fa;
}

.event-block {
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background-color: var(--primary-wine);
    color: white;
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    z-index: 10;
    opacity: 0.95;
    font-weight: 600;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-block.mine {
    background-color: var(--success);
}

.event-user {
    font-style: italic;
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close {
    cursor: pointer;
    font-size: 1.5rem;
}

.user-badge {
    display: inline-block;
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-right: 10px;
}

/* Checkbox Styles */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    color: #333;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
    
    .room-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }
    
    .room-card {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .room-sidebar {
        flex-direction: column;
    }
    
    .room-card {
        min-width: 0;
    }
    
    .calendar-grid {
        grid-template-columns: 60px repeat(5, 1fr);
    }
}
