/* Reset e Variáveis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #22c55e;
    --secondary-color: #3b82f6;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.header nav {
    display: flex;
    gap: 20px;
}

.header nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.3s;
    font-weight: 500;
}

.header nav a:hover,
.header nav a.active {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
main {
    padding: 40px 20px;
}

.booking-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.booking-section h2 {
    margin-bottom: 30px;
    color: var(--dark-color);
    font-size: 1.75rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Calendar Styles */
.calendar-container {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-size: 1.25rem;
    color: var(--dark-color);
    font-weight: 600;
}

.calendar-nav-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.calendar-nav-btn:hover {
    background: #16a34a;
    transform: scale(1.1);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
    text-align: center;
}

.calendar-weekdays div {
    padding: 10px 0;
    font-size: 0.9rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    background: white;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: var(--light-color);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.calendar-day.today {
    border-color: var(--secondary-color);
    border-width: 3px;
    font-weight: 700;
}

.calendar-day.disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

/* Indicadores de Reserva */
.calendar-day-indicator {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    border-radius: 2px;
}

.calendar-day-indicator.confirmed {
    background: var(--primary-color);
}

.calendar-day-indicator.pending {
    background: var(--warning-color);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 1rem;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    width: 100%;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-primary:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #2563eb;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: var(--dark-color);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: bottom 0.4s;
    z-index: 1000;
    max-width: 400px;
}

.toast.show {
    bottom: 20px;
}

.toast.success {
    background: var(--primary-color);
}

.toast.error {
    background: var(--danger-color);
}

.toast.warning {
    background: var(--warning-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .calendar-weekdays div {
        font-size: 0.8rem;
        padding: 5px 0;
    }

    .calendar-day {
        font-size: 0.9rem;
    }

    .booking-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .calendar-container {
        padding: 10px;
    }

    .calendar-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .calendar-header h3 {
        font-size: 1rem;
    }
}

/* Booking Cards (Minhas Reservas) */
.booking-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--border-color);
    transition: all 0.3s;
}

.booking-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.booking-card.status-pendente {
    border-left-color: var(--warning-color);
}

.booking-card.status-aprovado {
    border-left-color: var(--primary-color);
}

.booking-card.status-recusado {
    border-left-color: var(--danger-color);
}

.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.booking-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.booking-status i {
    font-size: 1.5rem;
}

.status-pendente .booking-status {
    color: var(--warning-color);
}

.status-aprovado .booking-status {
    color: var(--primary-color);
}

.status-recusado .booking-status {
    color: var(--danger-color);
}

.booking-queue .queue-badge {
    background: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.booking-details {
    display: grid;
    gap: 15px;
}

.detail-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.detail-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 3px;
    min-width: 20px;
}

.detail-item strong {
    display: block;
    color: var(--dark-color);
    margin-bottom: 3px;
}

.detail-item small {
    display: block;
    color: var(--text-color);
    font-size: 0.9rem;
}

.booking-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
}

.booking-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    background: #dcfce7;
    color: #166534;
    font-weight: 500;
}

.booking-footer.pending .booking-info {
    background: #fef3c7;
    color: #92400e;
}

.booking-info i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .booking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
