/* Camada compartilhada de contraste e superfícies para todas as áreas. */
:root{
  --ui-surface:#fffdf8;
  --ui-surface-soft:#f3ecdd;
  --ui-surface-muted:#eee8dc;
  --ui-input:#fffefa;
  --ui-heading:#0d2d27;
  --ui-text:#18302b;
  --ui-muted:#5d6d67;
  --ui-border:rgba(137,93,49,.24);
  --ui-hover:rgba(13,45,39,.065);
  --ui-focus:#087f82;
  --ui-success-bg:#dff2e8;
  --ui-success-text:#1d6042;
  --ui-warning-bg:#fff0ca;
  --ui-warning-text:#76520f;
  --ui-info-bg:#d9edf0;
  --ui-info-text:#155763;
  --ui-neutral-bg:#e5e4ef;
  --ui-neutral-text:#4c496b;
  --ui-danger-bg:#f5dedb;
  --ui-danger-text:#7c302c;
}

html[data-theme="dark"]{
  --ui-surface:#12352e;
  --ui-surface-soft:#0c2a23;
  --ui-surface-muted:#173a32;
  --ui-input:#09241f;
  --ui-heading:#f4ead8;
  --ui-text:#e5ece8;
  --ui-muted:#b7c7c0;
  --ui-border:rgba(221,181,129,.25);
  --ui-hover:rgba(255,255,255,.07);
  --ui-focus:#65c8c0;
  --ui-success-bg:#173d2d;
  --ui-success-text:#a8dfc0;
  --ui-warning-bg:#4a391b;
  --ui-warning-text:#f4d58d;
  --ui-info-bg:#173b42;
  --ui-info-text:#a8dce3;
  --ui-neutral-bg:#343249;
  --ui-neutral-text:#d4d0ee;
  --ui-danger-bg:#472927;
  --ui-danger-text:#f1aaa5;
}

html,body{color-scheme:light}
html[data-theme="dark"],html[data-theme="dark"] body{color-scheme:dark}
body,input,textarea,select,button,dialog{transition:background-color .2s ease,color .2s ease,border-color .2s ease}
input::placeholder,textarea::placeholder{color:var(--ui-muted);opacity:.86}
input:disabled,textarea:disabled,select:disabled,button:disabled{opacity:.62}
::selection{background:rgba(8,127,130,.28);color:inherit}

/* Site público */
html[data-theme="dark"] .reservation-success-card{
  border-color:var(--ui-border);
  background:linear-gradient(145deg,var(--ui-surface),var(--ui-surface-soft));
  color:var(--ui-text);
  box-shadow:0 30px 90px rgba(0,0,0,.52),inset 0 1px rgba(255,255,255,.06);
}
html[data-theme="dark"] .reservation-success-card h2{color:var(--ui-heading)}
html[data-theme="dark"] .reservation-success-card>p:not(.eyebrow){color:var(--ui-muted)}
html[data-theme="dark"] .guest-error,
html[data-theme="dark"] .coupon-feedback.error{color:var(--ui-danger-text)}
html[data-theme="dark"] .coupon-feedback.success{color:var(--ui-success-text)}

/* Área do cliente, confirmação, recuperação e detalhes da reserva */
html[data-theme="dark"] .detail-state h1,
html[data-theme="dark"] .reservation-hero-card h1,
html[data-theme="dark"] .reservation-period,
html[data-theme="dark"] .progress-card-heading h2,
html[data-theme="dark"] .is-completed .progress-step-label,
html[data-theme="dark"] .is-current .progress-step-label,
html[data-theme="dark"] .reservation-next-action strong,
html[data-theme="dark"] .section-heading h2,
html[data-theme="dark"] .stay-data dd,
html[data-theme="dark"] .stay-notes h3,
html[data-theme="dark"] .timeline-item strong,
html[data-theme="dark"] .reservation-guidance-content h2{
  color:var(--ui-heading);
}
html[data-theme="dark"] .detail-state p,
html[data-theme="dark"] .request-date,
html[data-theme="dark"] .progress-step-label,
html[data-theme="dark"] .stay-data dt,
html[data-theme="dark"] .stay-notes p,
html[data-theme="dark"] .timeline-item time,
html[data-theme="dark"] .reservation-guidance-content>p:last-child,
html[data-theme="dark"] .receipt-note{color:var(--ui-muted)}
html[data-theme="dark"] .status-pendente,
html[data-theme="dark"] .status-solicitada{background:var(--ui-warning-bg);color:var(--ui-warning-text)}
html[data-theme="dark"] .status-aguardando_pagamento{background:#4b321d;color:#f1c38c}
html[data-theme="dark"] .status-confirmada{background:var(--ui-success-bg);color:var(--ui-success-text)}
html[data-theme="dark"] .status-checkin{background:var(--ui-info-bg);color:var(--ui-info-text)}
html[data-theme="dark"] .status-concluida{background:var(--ui-neutral-bg);color:var(--ui-neutral-text)}
html[data-theme="dark"] .status-cancelada,
html[data-theme="dark"] .status-expirada{background:var(--ui-danger-bg);color:var(--ui-danger-text)}
html[data-theme="dark"] .form-message.error{color:var(--ui-danger-text)}
html[data-theme="dark"] .form-message.success{color:var(--ui-success-text)}
html[data-theme="dark"] .availability-error{color:var(--ui-danger-text)}

/* Painel administrativo */
html[data-theme="dark"] .pending .stat-number,
html[data-theme="dark"] .requested .stat-number{color:var(--ui-warning-text)}
html[data-theme="dark"] .completed .stat-number{color:var(--ui-neutral-text)}
html[data-theme="dark"] .modal-close{background:var(--ui-surface-muted);color:var(--ui-text)}
html[data-theme="dark"] .admin-chat-message{background:var(--ui-surface-muted);color:var(--ui-text)}
html[data-theme="dark"] .table-notification-badge{background:var(--ui-danger-bg);color:var(--ui-danger-text)}
html[data-theme="dark"] .dashboard-state,
html[data-theme="dark"] .loading-state,
html[data-theme="dark"] .empty-state{color:var(--ui-muted)}

/* Despesas */
html[data-theme="dark"] .expenses-table-wrap{border-color:var(--ui-border)}
html[data-theme="dark"] .expenses-table th,
html[data-theme="dark"] .expenses-table td{border-color:var(--ui-border)}
html[data-theme="dark"] .expense-chart-track{background:rgba(255,255,255,.1)}
html[data-theme="dark"] .expense-status.pago{background:var(--ui-success-bg);color:var(--ui-success-text)}
html[data-theme="dark"] .expense-status.pendente{background:var(--ui-warning-bg);color:var(--ui-warning-text)}
html[data-theme="dark"] .form-feedback.error{color:var(--ui-danger-text)}
html[data-theme="dark"] .dialog-close{border-color:var(--ui-border);color:var(--ui-heading)}
html[data-theme="dark"] .expenses-table tr{border-color:var(--ui-border)}

/* Regulamento */
html[data-theme="dark"] .skip-link{background:var(--ui-surface-muted);color:var(--ui-heading)}
html[data-theme="dark"] .review-note{background:rgba(189,135,80,.14);color:var(--ui-text)}

@media(prefers-reduced-motion:reduce){body,input,textarea,select,button,dialog{transition:none}}
