/* ════════════════════════════════════════
   ER STUDIO — agendamentos.css
   ════════════════════════════════════════ */

body {
    padding-top: 90px;
}

/* ════════════════════════════════════════
   AUTH (login/cadastro)
   ════════════════════════════════════════ */
.auth-gate {
    max-width: 480px;
    width: 100%;
    margin: 4rem auto;
    background: var(--white);
    border-radius: 24px;
    padding: 2.8rem 2.4rem;
    box-shadow: 0 12px 40px var(--shadow);
}

.auth-gate-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--brown);
    margin-bottom: .5rem;
    line-height: 1.2;
}

.auth-gate-sub {
    font-size: .88rem;
    color: var(--brown-lt);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.auth-tabs {
    display: flex;
    gap: .5rem;
    background: var(--nude-dk);
    border-radius: 30px;
    padding: .3rem;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: .6rem;
    font-family: 'Jost', sans-serif;
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brown-lt);
    border-radius: 24px;
    cursor: pointer;
    transition: all .25s;
}

.auth-tab.active {
    background: var(--white);
    color: var(--brown);
    box-shadow: 0 2px 8px var(--shadow);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-error {
    background: rgba(229, 173, 184, .2);
    border: 1px solid var(--rose);
    border-radius: 10px;
    padding: .7rem 1rem;
    font-size: .82rem;
    color: var(--brown);
    margin-bottom: 1rem;
    display: none;
}

.auth-error:not(:empty) {
    display: block;
}

/* ════════════════════════════════════════
   USER CARD
   ════════════════════════════════════════ */
.user-card {
    display: none;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    border: 1px solid var(--nude-dk);
    border-radius: 16px;
    padding: 1rem 1.4rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px var(--shadow);
    max-width: 420px;
}


.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--rose);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 400;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.user-cashback {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #e8f5ee;
    border-radius: 12px;
    padding: .4rem .8rem;
    gap: .1rem;
    margin-left: auto;
    flex-shrink: 0;
}

.user-cashback-label {
    font-size: .6rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #2d6b50;
}

.user-cashback-val {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: #2d6b50;
    font-weight: 500;
    line-height: 1;
}

.user-info strong {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--brown);
    font-weight: 400;
}

.user-info span {
    font-size: .78rem;
    color: var(--brown-lt);
    letter-spacing: .04em;
}

/* ════════════════════════════════════════
   BOOKING LAYOUT + CALENDÁRIO
   ════════════════════════════════════════ */
#booking {
    background: var(--nude);
}

.booking-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.calendar-wrap {
    background: var(--white);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px var(--shadow);
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.6rem;
}

.cal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--brown);
}

.cal-nav {
    background: none;
    border: 1.5px solid var(--nude-dk);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brown-lt);
    font-size: 1rem;
    transition: all .2s;
}

.cal-nav:hover {
    border-color: var(--rose);
    color: var(--rose);
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: .6rem;
}

.cal-weekdays span {
    text-align: center;
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brown-lt);
    padding: .4rem 0;
}

.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: .3rem;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .82rem;
    cursor: pointer;
    transition: all .2s;
    color: var(--brown);
    position: relative;
}

.day:hover:not(.empty):not(.past) {
    background: var(--nude-dk);
}

.day.selected {
    background: var(--rose) !important;
    color: var(--white) !important;
}

.day.today {
    font-weight: 500;
}

.day.today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--rose);
}

.day.past {
    color: var(--nude-dk);
    cursor: default;
}

.day.empty {
    cursor: default;
}

.day.has-slot::before {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--rose-lt);
}

/* Horários */
.time-slots {
    margin-top: 1.6rem;
}

.time-label {
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brown-lt);
    margin-bottom: .8rem;
}

.slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.slot {
    padding: .55rem 1.3rem;
    border-radius: 20px;
    border: 1.5px solid var(--nude-dk);
    font-size: 1rem;
    color: var(--brown-lt);
    cursor: pointer;
    transition: all .2s;
}

.slot:hover:not(.taken):not(.slot--locked) {
    border-color: var(--rose);
    color: var(--rose);
}

.slot.selected-slot {
    background: var(--rose);
    border-color: var(--rose);
    color: var(--white);
}

.slot.taken {
    background: var(--nude-dk);
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: .5;
}

.slot--locked {
    opacity: .35;
    cursor: not-allowed;
    pointer-events: none;
}

.slots-locked-hint {
    width: 100%;
    font-size: .78rem;
    color: var(--rose);
    letter-spacing: .06em;
    margin-top: .3rem;
}

/* Resumo */
.summary-box {
    background: var(--rose);
    color: var(--white);
    border-radius: 16px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.4rem;
    display: none;
}

.summary-box.visible {
    display: block;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    margin-bottom: .4rem;
}

.summary-row:last-child {
    margin-bottom: 0;
    padding-top: .6rem;
    border-top: 1px solid rgba(255, 255, 255, .3);
    font-weight: 500;
}

/* ════════════════════════════════════════
   CARRINHO
   ════════════════════════════════════════ */
#cart-section {
    display: none;
    background: var(--white);
    border: 1.5px solid var(--rose-lt);
    border-radius: 20px;
    padding: 1.6rem 1.8rem;
    margin-top: 2rem;
    box-shadow: 0 6px 24px var(--shadow);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.cart-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 300;
    color: var(--brown);
}

.cart-title em {
    color: var(--rose);
    font-style: italic;
}

.cart-count {
    background: var(--rose);
    color: var(--white);
    border-radius: 20px;
    padding: .2rem .7rem;
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

#cart-list {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    margin-bottom: 1.2rem;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--nude);
    border-radius: 12px;
    padding: .9rem 1.1rem;
    gap: 1rem;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: .9rem;
    color: var(--brown);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-dt {
    font-size: .75rem;
    color: var(--brown-lt);
    letter-spacing: .04em;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: .8rem;
    flex-shrink: 0;
}

.cart-item-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--rose);
}

.btn-remove-cart {
    background: none;
    border: 1.5px solid var(--nude-dk);
    color: var(--brown-lt);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: .7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.btn-remove-cart:hover {
    border-color: #c0392b;
    color: #c0392b;
}

.cart-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--nude-dk);
    gap: 1rem;
    flex-wrap: wrap;
}

.cart-total {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: var(--brown);
}

.cart-total span {
    color: var(--rose);
}

.btn-confirm-cart {
    background: var(--dourado);
    color: var(--white);
    border: none;
    padding: .85rem 2.2rem;
    font-family: 'Jost', sans-serif;
    font-size: .82rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 40px;
    transition: background .25s, transform .2s;
}

.btn-confirm-cart:hover {
    background: var(--rose);
    transform: translateY(-2px);
}

.btn-add-to-cart {
    width: 100%;
    background: var(--rose);
    color: var(--white);
    border: none;
    padding: 1rem;
    font-family: 'Jost', sans-serif;
    font-size: .82rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 14px;
    transition: background .25s, transform .2s;
    margin-bottom: .7rem;
}

.btn-add-to-cart:hover {
    background: var(--dourado);
    transform: translateY(-2px);
}

.add-hint {
    text-align: center;
    font-size: .75rem;
    color: var(--brown-lt);
    letter-spacing: .06em;
}

.modal-section-label {
    font-size: .68rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--rose);
    padding: .4rem .2rem .2rem;
    margin-top: .4rem;
}

.modal-section-label--muted {
    color: var(--brown-lt);
}

/* ════════════════════════════════════════
   MODAL PIX
   ════════════════════════════════════════ */
.pix-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(107, 76, 59, .4);
    backdrop-filter: blur(5px);
    z-index: 300;
}

.pix-overlay.active {
    display: block;
}

.pix-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    width: min(460px, 94vw);
    background: var(--cream);
    border-radius: 28px;
    box-shadow: 0 28px 72px rgba(107, 76, 59, .25);
    z-index: 301;
    flex-direction: column;
    opacity: 0;
    transition: opacity .28s, transform .28s;
}

.pix-modal.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%);
}

.pix-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.6rem 2rem 1.2rem;
    border-bottom: 1px solid var(--nude-dk);
}

.pix-header-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--brown);
}

.pix-header-title em {
    color: var(--rose);
    font-style: italic;
}

.pix-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--brown-lt);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.pix-close:hover {
    background: var(--nude-dk);
    color: var(--brown);
}

.pix-body {
    padding: 1.8rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

.pix-qr-wrap {
    background: var(--white);
    border-radius: 20px;
    padding: 1.2rem;
    box-shadow: 0 4px 20px var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .8rem;
}

#pix-qr {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#pix-qr canvas,
#pix-qr img {
    border-radius: 6px;
}

.pix-qr-label {
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brown-lt);
}

.pix-value-box {
    text-align: center;
}

.pix-valor {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.4rem;
    font-weight: 300;
    color: var(--rose);
    line-height: 1;
}

.pix-desc {
    font-size: .78rem;
    color: var(--brown-lt);
    letter-spacing: .06em;
    margin-top: .3rem;
}

.pix-copy-wrap {
    width: 100%;
}

.pix-copy-label {
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brown-lt);
    margin-bottom: .5rem;
}

.pix-copy-row {
    display: flex;
    gap: .6rem;
    align-items: stretch;
}

#pix-code {
    flex: 1;
    background: var(--white);
    border: 1.5px solid var(--nude-dk);
    border-radius: 10px;
    padding: .6rem .9rem;
    font-family: 'Jost', sans-serif;
    font-size: .72rem;
    color: var(--brown-lt);
    outline: none;
    cursor: text;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#pix-copy-btn {
    background: var(--rose);
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: .6rem 1.1rem;
    font-family: 'Jost', sans-serif;
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

#pix-copy-btn:hover {
    background: var(--dourado);
}

.btn-pix-done {
    width: 100%;
    background: var(--dourado);
    color: var(--white);
    border: none;
    padding: .9rem;
    border-radius: 14px;
    font-family: 'Jost', sans-serif;
    font-size: .82rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .25s, transform .2s;
}

.btn-pix-done:hover {
    background: var(--rose);
    transform: translateY(-2px);
}

.pix-breakdown {
    width: 100%;
    background: var(--nude);
    border-radius: 10px;
    padding: .6rem .9rem;
    margin-bottom: .5rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.pix-breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    color: var(--brown);
    font-family: 'Jost', sans-serif;
}

.pix-note {
    font-size: .72rem;
    color: var(--brown-lt);
    text-align: center;
    line-height: 1.6;
}

/* ════════════════════════════════════════
   MODAL MEUS AGENDAMENTOS
   ════════════════════════════════════════ */
.btn-meus-agendamentos {
    background: var(--nude-dk);
    border: 1.5px solid var(--nude-dk);
    color: var(--brown);
    border-radius: 20px;
    padding: .35rem 1rem;
    font-family: 'Jost', sans-serif;
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}

.btn-meus-agendamentos:hover {
    border-color: var(--rose);
    color: var(--rose);
    background: transparent;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(107, 76, 59, .35);
    backdrop-filter: blur(4px);
    z-index: 200;
}

.modal-overlay.active {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -48%);
    width: min(520px, 92vw);
    max-height: 80vh;
    background: var(--cream);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(107, 76, 59, .22);
    z-index: 201;
    overflow: hidden;
    flex-direction: column;
    opacity: 0;
    transition: opacity .25s, transform .25s;
}

.modal.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.8rem 2rem 1.2rem;
    border-bottom: 1px solid var(--nude-dk);
}

.modal-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--brown);
}

.modal-title em {
    font-style: italic;
    color: var(--rose);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--brown-lt);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.modal-close:hover {
    background: var(--nude-dk);
    color: var(--brown);
}

.modal-body {
    padding: 1.4rem 2rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.booking-item {
    background: var(--white);
    border: 1px solid var(--nude-dk);
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    position: relative;
}

.booking-item-service {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--brown);
}

.booking-item-info {
    font-size: .8rem;
    color: var(--brown-lt);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.booking-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .4rem;
}

.booking-item-status {
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .25rem .8rem;
    border-radius: 20px;
}

.status-confirmado {
    background: rgba(201, 145, 122, .15);
    color: var(--rose);
}

.status-cancelado {
    background: rgba(107, 76, 59, .08);
    color: var(--brown-lt);
    text-decoration: line-through;
}

.btn-cancelar {
    background: transparent;
    border: 1.5px solid var(--nude-dk);
    color: var(--brown-lt);
    border-radius: 20px;
    padding: .3rem .9rem;
    font-family: 'Jost', sans-serif;
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
}

.btn-cancelar:hover {
    border-color: #c0392b;
    color: #c0392b;
}

.modal-empty {
    text-align: center;
    padding: 2.4rem 1rem;
    color: var(--brown-lt);
    font-size: .9rem;
    line-height: 1.8;
}

.modal-empty span {
    display: block;
    font-size: 2rem;
    margin-bottom: .6rem;
}

/* ════════════════════════════════════════
   GOOGLE SIGN-IN
   ════════════════════════════════════════ */
.auth-separator {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 1.4rem 0 1.2rem;
    color: var(--brown-lt);
    font-size: .78rem;
    letter-spacing: .06em;
}

.auth-separator::before,
.auth-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--cream);
}

.google-btn-wrap {
    display: flex;
    justify-content: center;
}

/* ════════════════════════════════════════
   RESPONSIVIDADE AGENDAMENTOS
   ════════════════════════════════════════ */
@media (max-width: 900px) {
    .booking-layout {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .page-header-text {
        margin-left: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .page-mini-hero {
        margin-right: 0;
        margin-left: 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-sub {
        font-size: .85rem;
        text-align: center;
        color: var(--brown);
        margin-bottom: .8rem;
        padding-left: 0;
    }

    .cart-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-confirm-cart {
        text-align: center;
    }

    .pix-body {
        padding: 1.4rem 1.4rem 1.6rem;
    }
}