:root {
    --cream: #f8f6f1;
    --cream-dark: #efeae0;
    --white: #ffffff;
    --charcoal: #4a4543;
    --charcoal-light: #6b6563;
    --muted: #9a9590;
    --border: #e0dbd3;
    --border-light: #ece8e2;
    --gold: #b8960b;
    --gold-hover: #a3850a;
    --gold-light: #c9a84c;
    --gold-pale: #f0e6cc;
    --gold-bg: #faf7f0;
    --green: #5a8a5e;
    --green-bg: #eef5ef;
    --red: #c4544a;
    --red-bg: #fdf0ef;
    --amber-bg: #fef8ec;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Outfit', sans-serif; background: var(--cream); color: var(--charcoal); min-height: 100vh; }
.font-display { font-family: 'Cormorant Garamond', serif; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ========== HEADER ========== */
.header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 0; }
.logo-text { font-family: 'Outfit', sans-serif; font-weight: 300; font-size: 22px; letter-spacing: 0.35em; color: var(--charcoal); text-transform: uppercase; }
.logo-text span { color: var(--gold); }
.logo-sub { font-family: 'Outfit', sans-serif; font-weight: 300; font-size: 9px; letter-spacing: 0.5em; color: var(--gold); text-transform: uppercase; margin-top: -3px; }

/* Nav Tabs */
.nav-tabs { display: flex; gap: 4px; }
.nav-tab { display: flex; align-items: center; gap: 6px; padding: 8px 18px; font-size: 13px; font-weight: 500; color: var(--muted); background: none; border: none; cursor: pointer; border-radius: 8px; transition: all 0.2s; letter-spacing: 0.02em; }
.nav-tab:hover { color: var(--charcoal); background: var(--cream); }
.nav-tab.active { color: var(--gold); background: var(--gold-bg); }
.nav-tab svg { width: 16px; height: 16px; }

/* ========== MAIN LAYOUT ========== */
.main { max-width: 1100px; margin: 0 auto; padding: 28px 24px 80px; }
.layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ========== SECTION HEADERS ========== */
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.section-num { font-family: 'Cormorant Garamond', serif; font-size: 13px; font-weight: 600; color: var(--gold); letter-spacing: 0.15em; text-transform: uppercase; }
.section-line { flex: 1; height: 1px; background: var(--border); }

/* ========== FORM CARDS ========== */
.card { background: var(--white); border: 1px solid var(--border-light); border-radius: 16px; padding: 28px; margin-bottom: 20px; }
.card-flat { padding: 0; border: none; background: none; }

/* ========== FORM INPUTS (elegant underline style) ========== */
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field-label .req { color: var(--red); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 500px) { .field-row { grid-template-columns: 1fr; } }

.input {
    width: 100%; padding: 10px 0; font-family: 'Outfit', sans-serif; font-size: 15px; font-weight: 400;
    color: var(--charcoal); background: transparent; border: none; border-bottom: 1.5px solid var(--border);
    transition: border-color 0.2s; outline: none;
}
.input::placeholder { color: var(--border); font-weight: 300; }
.input:focus { border-color: var(--gold); }
.input.valid { border-color: var(--green); }
.input.invalid { border-color: var(--red); }
select.input { cursor: pointer; -webkit-appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9590' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 0 center no-repeat; padding-right: 20px; }
.field-msg { font-size: 12px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.field-msg.success { color: var(--green); }
.field-msg.error { color: var(--red); }
.field-msg.warn { color: #b8860b; }
.field-hint { font-size: 11px; color: var(--muted); margin-top: 4px; font-weight: 300; }

/* ========== TOGGLE SWITCHES ========== */
.service-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.service-row:last-child { border-bottom: none; }
.service-info { display: flex; align-items: center; gap: 14px; }
.service-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--gold-bg); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.service-name { font-size: 14px; font-weight: 500; color: var(--charcoal); }
.service-desc { font-size: 11px; color: var(--muted); font-weight: 300; margin-top: 1px; }

.toggle { position: relative; width: 44px; height: 24px; background: var(--border); border-radius: 12px; cursor: pointer; transition: background 0.25s; flex-shrink: 0; }
.toggle.on { background: var(--gold); }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: white; border-radius: 50%; transition: transform 0.25s; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }
.toggle.on::after { transform: translateX(20px); }

.extra-input { width: 64px; padding: 6px 0; text-align: center; font-family: 'Outfit', sans-serif; font-size: 14px; border: none; border-bottom: 1.5px solid var(--border); color: var(--charcoal); background: transparent; outline: none; }
.extra-input:focus { border-color: var(--gold); }

.terraza-sub { margin-top: 12px; padding-left: 50px; display: none; }
.terraza-sub.show { display: block; }

/* ========== PROPOSAL / QUOTE CARD ========== */
.proposal { position: sticky; top: 92px; }
.proposal-card { background: var(--white); border: 1px solid var(--border-light); border-radius: 16px; overflow: hidden; }
.proposal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.proposal-title { font-family: 'Cormorant Garamond', serif; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.proposal-badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: var(--gold-bg); color: var(--gold); display: none; }
.proposal-body { padding: 24px; }

.proposal-empty { text-align: center; padding: 40px 20px; }
.proposal-empty-icon { font-size: 28px; opacity: 0.3; margin-bottom: 10px; }
.proposal-empty-text { font-size: 13px; color: var(--muted); font-weight: 300; line-height: 1.6; }

.q-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.q-label { color: var(--muted); font-weight: 300; min-width: 65px; }
.q-value { color: var(--charcoal); font-weight: 500; }

.q-divider { height: 1px; background: var(--border-light); margin: 16px 0; }

.q-pkg-header { display: flex; justify-content: space-between; align-items: baseline; }
.q-pkg-name { font-size: 14px; font-weight: 600; color: var(--charcoal); }
.q-pkg-price { font-size: 14px; font-weight: 600; color: var(--gold); }
.q-pkg-details { margin-top: 10px; }
.q-pkg-details p { font-size: 12px; color: var(--muted); font-weight: 300; margin-bottom: 3px; }

.q-addon { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.q-addon-name { color: var(--charcoal-light); font-weight: 300; }
.q-addon-price { font-weight: 500; }

.q-total { background: var(--charcoal); border-radius: 12px; padding: 16px 20px; margin-top: 16px; display: flex; justify-content: space-between; align-items: center; }
.q-total-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.6); font-weight: 500; }
.q-total-value { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 500; color: var(--gold-light); }
.q-total-sub { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 2px; }

/* ========== BUTTONS ========== */
.btn-row { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; border-radius: 12px; cursor: pointer; transition: all 0.2s; border: none; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-outline { background: transparent; border: 1.5px solid var(--gold); color: var(--gold); }
.btn-outline:hover:not(:disabled) { background: var(--gold-bg); }
.btn-gold { background: var(--gold); color: white; box-shadow: 0 4px 16px rgba(184,150,11,0.25); }
.btn-gold:hover:not(:disabled) { background: var(--gold-hover); box-shadow: 0 6px 24px rgba(184,150,11,0.35); }
.btn-charcoal { background: var(--charcoal); color: white; }
.btn-charcoal:hover:not(:disabled) { background: #3a3533; }

/* ========== SUCCESS SCREEN ========== */
.success-screen { display: none; text-align: center; max-width: 560px; margin: 0 auto; padding-top: 20px; }
.success-screen.show { display: block; }
.success-check { width: 72px; height: 72px; border-radius: 50%; background: var(--green-bg); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.success-check svg { width: 32px; height: 32px; color: var(--green); }
.success-title { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 400; color: var(--charcoal); margin-bottom: 6px; }
.success-subtitle { font-size: 14px; color: var(--muted); font-weight: 300; margin-bottom: 32px; }

.success-card { background: var(--white); border: 1px solid var(--border-light); border-radius: 16px; padding: 32px; text-align: left; margin-bottom: 24px; }
.success-card-title { font-family: 'Cormorant Garamond', serif; font-size: 13px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 6px; }
.success-card-divider { width: 40px; height: 2px; background: var(--gold); margin: 0 auto 24px; }
.success-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.success-field-label { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.success-field-value { font-size: 15px; font-weight: 500; color: var(--charcoal); }
.success-field-value.gold { color: var(--gold); font-family: 'Cormorant Garamond', serif; font-size: 22px; }
.success-services { border-top: 1px solid var(--border-light); padding-top: 16px; }
.success-services-title { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.success-services p { font-size: 13px; color: var(--charcoal-light); font-weight: 300; margin-bottom: 4px; padding-left: 4px; }

.success-btns { display: flex; gap: 12px; justify-content: center; margin-bottom: 20px; }
.success-btns .btn { flex: 1; max-width: 240px; }
.success-new { font-size: 13px; color: var(--muted); cursor: pointer; border: none; background: none; font-family: 'Outfit', sans-serif; letter-spacing: 0.05em; }
.success-new:hover { color: var(--gold); }

/* ========== CALENDAR / AVAILABILITY TAB ========== */
.cal-container { max-width: 700px; margin: 0 auto; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.cal-nav { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; }
.cal-nav:hover { border-color: var(--gold); color: var(--gold); }
.cal-nav svg { width: 16px; height: 16px; }
.cal-month { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 500; color: var(--charcoal); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 0; }
.cal-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; font-weight: 400; color: var(--charcoal); cursor: pointer; transition: all 0.15s; position: relative; gap: 2px; }
.cal-cell:hover:not(.past):not(.empty) { background: var(--cream); }
.cal-cell.past { opacity: 0.25; cursor: default; }
.cal-cell.today { border: 2px solid var(--gold); font-weight: 600; }
.cal-cell.has-event { background: var(--red-bg); color: var(--red); font-weight: 600; }
.cal-cell.has-event:hover { background: #fbe3e1; }
.cal-cell.blocked { background: var(--cream-dark); color: var(--muted); }
.cal-cell.selected { background: var(--gold-bg); border: 2px solid var(--gold); }
.cal-dots { display: flex; gap: 3px; height: 5px; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

.cal-legend { display: flex; gap: 20px; margin-top: 20px; justify-content: center; flex-wrap: wrap; }
.cal-legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 300; }
.cal-legend-dot { width: 10px; height: 10px; border-radius: 4px; }

.cal-detail { background: var(--white); border: 1px solid var(--border-light); border-radius: 16px; padding: 24px; margin-top: 20px; min-height: 120px; }
.cal-detail-title { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 500; color: var(--charcoal); margin-bottom: 16px; }
.cal-detail-empty { font-size: 13px; color: var(--muted); font-weight: 300; text-align: center; padding: 20px 0; }
.cal-detail-section { margin-bottom: 16px; }
.cal-detail-section:last-child { margin-bottom: 0; }
.cal-detail-label { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cal-detail-event { background: var(--red-bg); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--red); font-weight: 500; }
.cal-detail-visit { background: var(--gold-bg); border-radius: 8px; padding: 8px 14px; font-size: 13px; color: var(--charcoal); font-weight: 400; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.cal-detail-visit-time { font-weight: 600; color: var(--gold); min-width: 50px; }
.cal-detail-blocked { background: var(--cream-dark); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--muted); }

/* ========== SWIRL DECORATION ========== */
.swirl { position: absolute; pointer-events: none; opacity: 0.06; }

/* ========== TOAST ========== */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; width: 320px; }
.toast { padding: 14px 16px; border-radius: 12px; font-size: 13px; font-weight: 500; display: flex; align-items: start; gap: 10px; animation: toastSlide 0.3s ease-out; border: 1px solid; }
.toast.success { background: var(--green-bg); border-color: #c0dcc2; color: #2d5a30; }
.toast.error { background: var(--red-bg); border-color: #f0c4c1; color: #8b3530; }
.toast.out { animation: toastOut 0.3s ease-in forwards; }
.toast-close { background: none; border: none; cursor: pointer; opacity: 0.5; font-size: 16px; line-height: 1; margin-left: auto; }
.toast-close:hover { opacity: 1; }
@keyframes toastSlide { from { opacity: 0; transform: translateX(80px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(80px); } }

/* ========== CONFIRM MODAL ========== */
.modal-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(74,69,67,0.5); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal { background: var(--white); border-radius: 20px; padding: 32px; max-width: 380px; width: 100%; text-align: center; animation: modalIn 0.25s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-icon { font-size: 36px; margin-bottom: 12px; }
.modal-title { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 500; margin-bottom: 6px; }
.modal-text { font-size: 13px; color: var(--muted); font-weight: 300; margin-bottom: 24px; line-height: 1.5; }
.modal-btns { display: flex; gap: 10px; }
.modal-btns .btn { flex: 1; padding: 12px; font-size: 11px; }

/* ========== ANIMATIONS ========== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.4s ease-out both; }
.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.1s; }
.fade-up-3 { animation-delay: 0.15s; }

/* ========== LOADING SPINNER ========== */
.spinner { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== RESPONSIVE ========== */
@media (max-width: 700px) {
    .header-inner { flex-direction: column; height: auto; padding: 12px 16px; gap: 10px; }
    .nav-tabs { width: 100%; justify-content: center; }
    .nav-tab { padding: 6px 12px; font-size: 12px; }
    .main { padding: 16px 16px 100px; }
    .card { padding: 20px; }
    .proposal { position: static; }
    .success-grid { grid-template-columns: 1fr; }
    .success-btns { flex-direction: column; }
    .success-btns .btn { max-width: 100%; }
}
