* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.salas-panel, .reservas-panel, .reservas-list-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.salas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.sala-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.sala-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.sala-card h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.sala-card p {
    font-size: 0.9em;
    opacity: 0.9;
    margin: 5px 0;
}

.sala-card.ocupada {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    opacity: 0.7;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-controls {
    display: flex;
    gap: 10px;
}

.filter-controls input,
.filter-controls select {
    width: auto;
    min-width: 150px;
}

.reservas-grid {
    display: grid;
    gap: 15px;
}

.reserva-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #667eea;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    transition: transform 0.3s;
}

.reserva-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.historial-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #667eea;
}

.historial-card.cancelada {
    background: #fff5f5;
    border-left-color: #f5576c;
    opacity: 0.8;
}

.historial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.estado-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.estado-badge.activa {
    background: #4caf50;
    color: white;
}

.estado-badge.cancelada {
    background: #f5576c;
    color: white;
}

.historial-info h3 {
    color: #667eea;
    margin: 0;
}

.historial-card.cancelada .historial-info h3 {
    color: #f5576c;
}

.historial-info p {
    color: #666;
    margin: 5px 0;
    font-size: 0.95em;
}

.historial-info strong {
    color: #333;
}

.fecha-registro {
    font-size: 0.85em;
    color: #999;
    margin-top: 10px;
}

.cancelacion-info {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #f5576c;
}

.fecha-cancelacion, .cancelado-por, .motivo-cancelacion {
    font-size: 0.9em;
    color: #d63447;
    margin: 5px 0;
}

.motivo-cancelacion {
    font-style: italic;
    background: #fff0f0;
    padding: 10px;
    border-radius: 5px;
    margin-top: 8px;
}

.reserva-info h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.reserva-info p {
    color: #666;
    margin: 5px 0;
    font-size: 0.95em;
}

.reserva-info strong {
    color: #333;
}

.reserva-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-cancel {
    padding: 10px 20px;
    background: #f5576c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-cancel:hover {
    background: #d63447;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px 30px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #4caf50;
}

.notification.error {
    background: #f44336;
}

.notification.warning {
    background: #ff9800;
}

.btn-db {
    padding: 12px 20px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-db:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-controls {
        width: 100%;
        flex-direction: column;
    }
    
    .filter-controls input,
    .filter-controls select {
        width: 100%;
    }
}
