body {
    background: #f3f0fa;
    padding-top: 120px; /* Espaço para o header fixo */
}

.container-agendamento {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
    background: transparent;
    box-shadow: none;
}

h2.text-center.mb-4 {
    color: #7c3aed;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 32px !important;
    text-align: center;
    margin-top: 0 !important;
}

#calendario-agendamento {
    margin: 0 auto 24px auto;
    max-width: 380px;
    min-width: 260px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(124, 58, 237, 0.10);
    border-collapse: separate;
    border-spacing: 8px;
    font-size: 1.18em;
    padding: 18px 8px 8px 8px;
    transition: box-shadow 0.2s;
}

#calendario-agendamento th {
    color: #7c3aed;
    font-weight: 700;
    background: transparent;
    border: none;
    font-size: 1.08em;
    padding: 8px 0 12px 0;
    letter-spacing: 1px;
}

.dia-calendario {
    width: 48px;
    height: 48px;
    text-align: center;
    vertical-align: middle;
    font-size: 1.08em;
    border-radius: 12px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.2s;
    border: 2px solid transparent;
    background: #f8f7fc;
    color: #7c3aed;
    font-weight: 500;
    box-shadow: 0 1px 2px #7c3aed11;
    cursor: pointer;
    position: relative;
    outline: none;
}

.dia-calendario.disponivel:hover,
.dia-calendario.disponivel:focus {
    background: #f59e42;
    color: #fff;
    border: 2px solid #f59e42;
    box-shadow: 0 0 0 2px #f59e4233;
    z-index: 2;
}

.dia-calendario.ocupado {
    background: #7c3aed !important;
    color: #fff !important;
    cursor: not-allowed;
    opacity: 0.7;
    border: 2px solid #7c3aed;
    position: relative;
}
.dia-calendario.ocupado::after {
    content: '✖';
    position: absolute;
    top: 7px;
    right: 7px;
    font-size: 0.9em;
    color: #fff;
    opacity: 0.8;
}

.dia-calendario.selecionado,
.dia-calendario.selecionado:hover {
    background: #f59e42 !important;
    color: #fff !important;
    border: 2px solid #f59e42 !important;
    box-shadow: 0 0 0 2px #f59e42aa;
}

form#formAgendamento {
    background: #f8f7fc;
    border-radius: 12px;
    padding: 24px 18px 12px 18px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.04);
    margin-bottom: 18px;
}

form#formAgendamento label {
    font-weight: 500;
    color: #7c3aed;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    display: block;
    width: 100%;
}

form#formAgendamento input[type="text"],
form#formAgendamento select {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: none;
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: 1em;
    height: 48px;
    background: #fff;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

form#formAgendamento input:focus,
form#formAgendamento select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px #7c3aed22;
}

.btn-success.w-100 {
    background: linear-gradient(90deg, #7c3aed 60%, #f59e42 100%);
    border: none;
    font-size: 1.15em;
    padding: 12px 0;
    border-radius: 8px;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px #7c3aed22;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-success.w-100:hover {
    background: linear-gradient(90deg, #f59e42 0%, #7c3aed 100%);
    box-shadow: 0 4px 16px #7c3aed33;
}

#mensagemSucesso, #mensagemErro {
    font-size: 1.1em;
    border-radius: 8px;
    padding: 12px 18px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#mensagemSucesso::before {
    content: '✔️';
    font-size: 1.2em;
}

#mensagemErro::before {
    content: '❌';
    font-size: 1.2em;
}

#opcoesPacote button {
    min-width: 90px;
}

#valorFesta {
    font-size: 1.2em;
    color: #7c3aed;
}

/* Layout flexível para o agendamento */
.container-agendamento-flex {
    display: flex;
    flex-wrap: wrap;
    min-height: 600px;
    gap: 0;
    justify-content: center;
    align-items: flex-start;
}

.col-calendario, .col-form-agendamento {
    flex: 1 1 0;
    min-width: 320px;
    max-width: 600px;
    box-sizing: border-box;
}
.col-calendario {
    padding: 32px 18px 18px 32px;
}
.col-form-agendamento {
    padding: 32px 32px 18px 18px;
}

#controle-calendario {
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

#controle-calendario button {
    padding: 6px 12px;
    font-size: 1em;
    background: #f8f7fc;
    border: 2px solid #7c3aed;
    color: #7c3aed;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    flex-shrink: 0;
}

#controle-calendario button:hover {
    background: #7c3aed;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

#controle-calendario button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.2);
}

#controle-calendario select {
    padding: 6px 12px;
    font-size: 1em;
    border-radius: 8px;
    border: 2px solid #7c3aed;
    background: #f8f7fc;
    color: #7c3aed;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 40px;
    min-width: 80px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    padding-right: 32px;
    flex-shrink: 0;
}

#controle-calendario select:hover {
    background-color: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

#controle-calendario select:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

#controle-calendario select option {
    background: #fff;
    color: #7c3aed;
    padding: 8px;
}

#mesAnoAtual {
    font-size: 1.1em;
    font-weight: bold;
    color: #7c3aed;
    letter-spacing: 0.5px;
    background: #f8f7fc;
    border-radius: 6px;
    padding: 3px 12px;
    margin: 0 4px;
    display: inline-block;
    flex-shrink: 0;
    white-space: nowrap;
}

.campos-data-row {
    width: 100%;
    display: flex;
    gap: 16px;
    margin-top: 24px;
    justify-content: center;
    padding: 0 12px;
}

.campos-data-row > div {
    flex: 1 1 0;
    min-width: 140px;
}

.campos-data-row label {
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 8px;
    font-size: 0.95em;
    display: block;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    width: 100%;
}

.campos-data-row input,
.campos-data-row select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    color: #333;
    background: #f8f7fc;
    transition: all 0.2s ease;
    height: 44px;
    box-sizing: border-box;
}

.campos-data-row input:focus,
.campos-data-row select:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.campos-data-row input:disabled,
.campos-data-row select:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.8;
}

.campos-data-row select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.campos-data-row select option {
    background: #fff;
    color: #333;
    padding: 8px;
}

/* RESPONSIVIDADE COMPLETA */

/* Tablets grandes (1024px - 1200px) */
@media (max-width: 1200px) {
    .container-agendamento {
        max-width: 100%;
        padding: 0 12px;
    }
    
    .col-calendario, .col-form-agendamento {
        min-width: 280px;
    }
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    body {
        padding-top: 100px;
    }
    
    .container-agendamento {
        padding: 16px 8px;
    }
    
    h2.text-center.mb-4 {
        font-size: 1.8rem;
        margin-top: 0 !important;
    }
    
    .col-calendario, .col-form-agendamento {
        min-width: 260px;
        padding: 24px 12px;
    }
    
    #calendario-agendamento {
        max-width: 320px;
        font-size: 1.1em;
    }
    
    .dia-calendario {
        width: 42px;
        height: 42px;
        font-size: 1em;
    }
}

/* Tablets pequenos (600px - 768px) */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
    
    .container-agendamento {
        padding: 12px 6px;
    }
    
    h2.text-center.mb-4 {
        font-size: 1.6rem;
        margin-top: 0 !important;
        margin-bottom: 24px !important;
    }
    
    .container-agendamento-flex {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .col-calendario, .col-form-agendamento {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        padding: 20px 12px;
    }
    
    #calendario-agendamento {
        max-width: 100%;
        min-width: 0;
        font-size: 1em;
        padding: 12px 4px;
    }
    
    .dia-calendario {
        width: 38px;
        height: 38px;
        font-size: 0.95em;
    }
    
    #controle-calendario {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    #controle-calendario button {
        min-width: 40px;
        height: 40px;
        font-size: 1em;
    }
    
    #controle-calendario select {
        height: 40px;
        min-width: 90px;
        font-size: 1em;
    }
    
    #mesAnoAtual {
        font-size: 1.1em;
        padding: 3px 12px;
        margin: 0 4px;
    }
    
    .campos-data-row {
        flex-direction: column;
        gap: 12px;
        margin-top: 16px;
        padding: 0 8px;
    }
    
    .campos-data-row > div {
        min-width: 0;
    }
    
    form#formAgendamento {
        padding: 20px 12px 8px 12px;
    }
    
    form#formAgendamento input[type="text"],
    form#formAgendamento select {
        height: 44px;
        font-size: 1.1em;
        margin-bottom: 12px;
    }
    
    .btn-success.w-100 {
        font-size: 1.1em;
        padding: 10px 0;
    }
}

/* Celulares grandes (480px - 600px) */
@media (max-width: 600px) {
    body {
        padding-top: 70px;
    }
    
    .container-agendamento {
        padding: 10px 4px;
    }
    
    h2.text-center.mb-4 {
        font-size: 1.4rem;
        margin-top: 0 !important;
        margin-bottom: 20px !important;
    }
    
    .col-calendario, .col-form-agendamento {
        padding: 16px 8px;
    }
    
    #calendario-agendamento {
        font-size: 0.9em;
        padding: 8px 2px;
        border-spacing: 4px;
    }
    
    .dia-calendario {
        width: 34px;
        height: 34px;
        font-size: 0.9em;
        border-radius: 8px;
    }
    
    #controle-calendario {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    #controle-calendario button {
        min-width: 36px;
        height: 36px;
        font-size: 0.9em;
        padding: 6px 12px;
    }
    
    #controle-calendario select {
        height: 36px;
        min-width: 80px;
        font-size: 0.9em;
        padding: 6px 12px;
    }
    
    #mesAnoAtual {
        font-size: 1em;
        padding: 2px 8px;
        margin: 0 2px;
    }
    
    .campos-data-row {
        margin-top: 12px;
        padding: 0 4px;
    }
    
    .campos-data-row input,
    .campos-data-row select {
        height: 40px;
        font-size: 1em;
        padding: 10px 12px;
    }
    
    .campos-data-row label {
        font-size: 0.9em;
        white-space: nowrap;
    }
    
    form#formAgendamento {
        padding: 16px 8px 6px 8px;
    }
    
    form#formAgendamento label {
        font-size: 0.9em;
        white-space: nowrap;
    }
    
    form#formAgendamento input[type="text"],
    form#formAgendamento select {
        height: 40px;
        font-size: 1em;
        margin-bottom: 10px;
    }
    
    .btn-success.w-100 {
        font-size: 1em;
        padding: 8px 0;
    }
}

/* Celulares pequenos (até 480px) */
@media (max-width: 480px) {
    body {
        padding-top: 60px;
    }
    
    .container-agendamento {
        padding: 8px 2px;
    }
    
    h2.text-center.mb-4 {
        font-size: 1.2rem;
        margin-top: 0 !important;
        margin-bottom: 16px !important;
    }
    
    .col-calendario, .col-form-agendamento {
        padding: 12px 6px;
    }
    
    #calendario-agendamento {
        font-size: 0.8em;
        padding: 6px 1px;
        border-spacing: 2px;
    }
    
    .dia-calendario {
        width: 30px;
        height: 30px;
        font-size: 0.8em;
        border-radius: 6px;
    }
    
    #controle-calendario {
        gap: 4px;
        margin-bottom: 8px;
        flex-wrap: wrap;
    }
    
    #controle-calendario button {
        min-width: 32px;
        height: 32px;
        font-size: 0.8em;
        padding: 4px 8px;
    }
    
    #controle-calendario select {
        height: 32px;
        min-width: 70px;
        font-size: 0.8em;
        padding: 4px 8px;
    }
    
    #mesAnoAtual {
        font-size: 0.9em;
        padding: 2px 6px;
        margin: 0 1px;
    }
    
    .campos-data-row {
        margin-top: 8px;
        padding: 0 2px;
    }
    
    .campos-data-row input,
    .campos-data-row select {
        height: 36px;
        font-size: 0.9em;
        padding: 8px 10px;
    }
    
    .campos-data-row label {
        font-size: 0.85em;
        white-space: nowrap;
    }
    
    form#formAgendamento {
        padding: 12px 6px 4px 6px;
    }
    
    form#formAgendamento label {
        font-size: 0.85em;
        white-space: nowrap;
    }
    
    form#formAgendamento input[type="text"],
    form#formAgendamento select {
        height: 36px;
        font-size: 0.9em;
        margin-bottom: 8px;
    }
    
    .btn-success.w-100 {
        font-size: 0.9em;
        padding: 6px 0;
    }
    
    #mensagemSucesso, #mensagemErro {
        font-size: 0.9em;
        padding: 8px 12px;
    }
}

/* Telas muito pequenas (até 360px) */
@media (max-width: 360px) {
    body {
        padding-top: 50px;
    }
    
    .container-agendamento {
        padding: 6px 1px;
    }
    
    h2.text-center.mb-4 {
        font-size: 1.1rem;
        margin-top: 0 !important;
        margin-bottom: 12px !important;
    }
    
    .col-calendario, .col-form-agendamento {
        padding: 8px 4px;
    }
    
    #calendario-agendamento {
        font-size: 0.75em;
        padding: 4px 0px;
        border-spacing: 1px;
    }
    
    .dia-calendario {
        width: 26px;
        height: 26px;
        font-size: 0.75em;
        border-radius: 4px;
    }
    
    #controle-calendario {
        gap: 2px;
        margin-bottom: 6px;
    }
    
    #controle-calendario button {
        min-width: 28px;
        height: 28px;
        font-size: 0.75em;
        padding: 2px 6px;
    }
    
    #controle-calendario select {
        height: 28px;
        min-width: 60px;
        font-size: 0.75em;
        padding: 2px 6px;
    }
    
    #mesAnoAtual {
        font-size: 0.8em;
        padding: 1px 4px;
        margin: 0;
    }
    
    .campos-data-row {
        margin-top: 6px;
        padding: 0 1px;
    }
    
    .campos-data-row input,
    .campos-data-row select {
        height: 32px;
        font-size: 0.8em;
        padding: 6px 8px;
    }
    
    .campos-data-row label {
        font-size: 0.8em;
        white-space: nowrap;
    }
    
    form#formAgendamento {
        padding: 8px 4px 2px 4px;
    }
    
    form#formAgendamento label {
        font-size: 0.8em;
        white-space: nowrap;
    }
    
    form#formAgendamento input[type="text"],
    form#formAgendamento select {
        height: 32px;
        font-size: 0.8em;
        margin-bottom: 6px;
    }
    
    .btn-success.w-100 {
        font-size: 0.8em;
        padding: 4px 0;
    }
    
    #mensagemSucesso, #mensagemErro {
        font-size: 0.8em;
        padding: 6px 8px;
    }
}

/* Orientação landscape em celulares */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding-top: 60px;
    }
    
    h2.text-center.mb-4 {
        margin-top: 0 !important;
        margin-bottom: 12px !important;
        font-size: 1.3rem;
    }
    
    .container-agendamento-flex {
        flex-direction: row;
        gap: 12px;
    }
    
    .col-calendario {
        flex: 0.5;
        min-width: 0;
    }
    
    .col-form-agendamento {
        flex: 0.5;
        min-width: 0;
    }
    
    #calendario-agendamento {
        font-size: 0.8em;
    }
    
    .dia-calendario {
        width: 28px;
        height: 28px;
        font-size: 0.8em;
    }
    
    .campos-data-row {
        flex-direction: row;
        gap: 8px;
    }
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Modo escuro (se suportado) */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
    }
    
    .col-calendario, .col-form-agendamento {
        background: #2d2d2d;
        color: #e2e8f0;
    }
    
    form#formAgendamento {
        background: #3a3a3a;
    }
    
    form#formAgendamento input[type="text"],
    form#formAgendamento select {
        background: #4a4a4a;
        border-color: #555;
        color: #e2e8f0;
    }
    
    .campos-data-row input,
    .campos-data-row select {
        background: #4a4a4a;
        border-color: #555;
        color: #e2e8f0;
    }
    
    #calendario-agendamento {
        background: #2d2d2d;
    }
    
    .dia-calendario {
        background: #3a3a3a;
        color: #7c3aed;
    }
    
    .dia-calendario.disponivel:hover,
    .dia-calendario.disponivel:focus {
        background: #f59e42;
        color: #fff;
    }
}

/* Correção específica para labels cortando em mobile */
@media (max-width: 768px) {
    .campos-data-row {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 0 8px !important;
        margin: 0 !important;
        width: 100% !important;
        overflow: visible !important;
    }
    
    .campos-data-row > div {
        min-width: 100% !important;
        width: 100% !important;
        flex: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }
    
    .campos-data-row label {
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: unset !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 0 4px 0 !important;
        display: block !important;
    }
    
    .col-form-agendamento {
        padding: 16px 8px !important;
        overflow: visible !important;
    }
    
    form#formAgendamento {
        padding: 16px 8px !important;
        overflow: visible !important;
    }
}

/* Correção adicional para telas muito pequenas */
@media (max-width: 480px) {
    .campos-data-row {
        padding: 0 4px !important;
    }
    
    .col-form-agendamento {
        padding: 12px 4px !important;
    }
    
    form#formAgendamento {
        padding: 12px 4px !important;
    }
    
    .campos-data-row label {
        font-size: 0.9em !important;
        margin: 0 0 6px 0 !important;
    }
}

@media (max-width: 360px) {
    .campos-data-row {
        padding: 0 2px !important;
    }
    
    .col-form-agendamento {
        padding: 8px 2px !important;
    }
    
    form#formAgendamento {
        padding: 8px 2px !important;
    }
    
    .campos-data-row label {
        font-size: 0.85em !important;
        margin: 0 0 4px 0 !important;
    }
}
