* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    background: #764ba2;
    color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.booking-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.booking-form h2 {
    margin-bottom: 20px;
    color: #333;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: #764ba2;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.bookings-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bookings-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

#lastUpdated {
    font-size: 0.9rem;
    color: #666;
}

#bookingsList {
    overflow-x: auto;
}

.bookings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.bookings-table th,
.bookings-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bookings-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.bookings-table tr:hover {
    background-color: #f5f5f5;
}

.status-reservado-externamente {
    background-color: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-reintentando {
    background-color: #ff4d4d;
    color: #660000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-queued {
    background-color: #ffd633;
    color: #665200;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-completado {
    background-color: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-complete {
    background: #20c997;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-delete {
    background: #e91e63;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transform: translateX(120%);
    transition: transform 0.3s ease-in-out;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #20c997;
}

.notification.error {
    background: #e91e63;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading::after {
    content: '.';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .booking-form,
    .bookings-section {
        padding: 20px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bookings-table {
        font-size: 0.9rem;
    }
    
    .bookings-table th,
    .bookings-table td {
        padding: 8px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

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

.modal.show {
    display: block;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    background: #764ba2;
    color: white;
    padding: 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 10px;
}

.close:hover {
    color: #f0f0f0;
}

.modal-body {
    padding: 20px;
}

.info-content {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #764ba2;
    margin: 10px 0;
}

.info-content pre {
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 3px;
    overflow-x: auto;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.loading-modal {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Info Modal Specific Styles */
.info-content {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
    margin: 15px 0;
}

.info-content h3 {
    color: #764ba2;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.info-content h4 {
    color: #495057;
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

.booked-content {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
    margin: 10px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-table th,
.info-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.info-table th {
    background-color: #e9ecef;
    font-weight: 600;
    color: #495057;
    width: 40%;
}

.info-table td {
    color: #212529;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

.info-table tr:hover {
    background-color: #f8f9fa;
}
