:root {
  color-scheme: dark;
  --primary: #2f6f75;
  --secondary: #f5f5f5;
  --accent: #2dd4bf;
  --primary-text: #ffffff;
  --accent-text: #06120f;
  --brand: var(--primary);
  --brand-soft: color-mix(in srgb, var(--primary) 16%, #1a1a1a);
  --ink: #f5f5f5;
  --muted: #a3a3a3;
  --line: rgba(255,255,255,.1);
  --paper: color-mix(in srgb, var(--secondary) 4%, #1a1a1a);
  --canvas: #0f0f0f;
  --danger: #fb7185;
  --success: var(--accent);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.55;
}

html[data-color-theme="violet"] { --primary: #8b5cf6; --accent: #2dd4bf; }
html[data-color-theme="teal"] { --primary: #2f6f75; --accent: #2dd4bf; }
html[data-color-theme="rose"] { --primary: #d071cd; --accent: #34d399; }
html[data-color-theme="blue"] { --primary: #3b82f6; --accent: #2dd4bf; }
html[data-color-theme="amber"] { --primary: #d97706; --accent: #38bdf8; }
html[data-theme="light"] { color-scheme: light; --ink:#171717;--muted:#5f6368;--line:rgba(0,0,0,.12);--paper:color-mix(in srgb,var(--secondary) 18%,#ffffff);--canvas:#f5f7f8;--brand-soft:color-mix(in srgb,var(--primary) 10%,#ffffff); }

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input { font: inherit; }
button { touch-action: manipulation; }
button, .option, .slot, input { transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.shell { width: min(100%, 36rem); margin: 0 auto; padding: 0 1rem max(2rem, env(safe-area-inset-bottom)); }
.brand { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: .9rem; min-height: 5.25rem; margin: 0 -1rem 1.25rem; padding: max(.9rem,env(safe-area-inset-top)) 1rem .9rem; border-bottom: 1px solid color-mix(in srgb,var(--primary) 36%,var(--line)); color: var(--ink); background: color-mix(in srgb,var(--canvas) 82%,transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand > div { min-width:0;flex:1; }
.theme-toggle { width:2.75rem;min-width:2.75rem;min-height:2.75rem;padding:.45rem;border:1px solid var(--line);border-radius:999px;color:var(--ink);background:color-mix(in srgb,var(--paper) 88%,transparent);font-size:1rem;cursor:pointer; }
.brand-cover { overflow: hidden; height: 11rem; margin: 1rem 0; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); }
.brand-cover img { width: 100%; height: 100%; object-fit: cover; }
.brand__logo { width: 3rem; height: 3rem; flex: 0 0 auto; border: 1px solid var(--line); border-radius: .8rem; object-fit: cover; background: #1a1a1a; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.7rem, 7vw, 2.35rem); font-weight: 500; line-height: 1.12; letter-spacing: -.035em; }
.brand h1 { color: color-mix(in srgb,var(--primary) 62%,#ffffff); }
h2 { margin-bottom: 1.25rem; font-size: clamp(1.3rem,5vw,1.6rem); font-weight: 500; letter-spacing: -.025em; }
.eyebrow, .step-label { margin-bottom: .25rem; color: color-mix(in srgb,var(--primary) 74%,#ffffff); font-size: .72rem; font-weight: 500; letter-spacing: .08em; }
.brand .eyebrow { color: var(--muted); }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0 0 1.25rem; padding: 0 .4rem; list-style: none; }
.progress li { position: relative; padding: 1.4rem .2rem 0; color: #737373; font-size: .68rem; font-weight: 500; text-align: center; white-space: nowrap; }
.progress li::before { content: ""; position: absolute; top: .42rem; left: 50%; z-index: 2; width: .55rem; height: .55rem; border: 1px solid #525252; border-radius: 50%; background: var(--canvas); transform: translateX(-50%); }
.progress li:not(:first-child)::after { content: ""; position: absolute; top: .7rem; right: 50%; width: 100%; height: 1px; background: #353535; }
.progress li.active, .progress li[aria-current="step"] { color: var(--ink); }
.progress li.active::before, .progress li[aria-current="step"]::before { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb,var(--primary) 15%,transparent); }
.progress li.active::after { background: color-mix(in srgb,var(--primary) 70%,#353535); }
.card { padding: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.option-list { display: grid; gap: .7rem; }
.option-list.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
.option, .slot, .primary, .secondary { min-height: 3.2rem; border-radius: .75rem; cursor: pointer; }
.option { display: flex; align-items: center; justify-content: flex-start; gap: 1rem; width: 100%; padding: 1rem; border: 1px solid color-mix(in srgb,var(--primary) 52%,var(--line)); color: var(--ink); background: #1a1a1a; text-align: left; }
.option:hover, .option:focus-visible, .option.selected { border-color: var(--accent); outline: none; background: color-mix(in srgb,var(--accent) 7%,#1a1a1a); box-shadow: 0 0 0 3px color-mix(in srgb,var(--accent) 14%,transparent); transform: translateY(-1px); }
.option strong { display: block; margin-bottom: .25rem; font-weight: 600; }
.option small { font-size: 14px; color: var(--muted); }
.catalog-photo { flex-shrink: 0; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; border: 1px solid var(--line); }
.catalog-photo-fallback { display: grid; place-items: center; border-color: transparent; background: var(--accent); color: var(--accent-text); font-size: 18px; font-weight: 600; line-height: 1; user-select: none; }
#service-list .catalog-photo { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 12px; }
#professional-list .catalog-photo { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%; object-position: center top; }
@media (max-width: 24rem) {
  #service-list .catalog-photo { width: 56px; height: 56px; flex: 0 0 56px; }
  #professional-list .catalog-photo { width: 44px; height: 44px; flex: 0 0 44px; }
}
.field { display: grid; gap: .45rem; margin: 1rem 0; color: #d4d4d4; font-size: .84rem; font-weight: 500; }
.field input { min-height: 3.2rem; width: 100%; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: .75rem; color: var(--ink); background: #171717; }
.field input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb,var(--primary) 20%,transparent); }
.primary, .secondary { width: 100%; padding: .8rem 1rem; font-weight: 600; }
.primary { border: 1px solid color-mix(in srgb,var(--accent) 80%,#ffffff); color: var(--accent-text); background: var(--accent); }
.primary:hover { background: color-mix(in srgb,var(--accent) 86%,#ffffff); box-shadow: 0 8px 24px color-mix(in srgb,var(--accent) 18%,transparent); transform: translateY(-1px); }
.primary:disabled { cursor: wait; opacity: .55; transform: none; }
.secondary { margin-top: .65rem; border: 1px solid var(--line); color: var(--ink); background: transparent; }
.secondary:hover { border-color: color-mix(in srgb,var(--primary) 65%,var(--line)); background: var(--brand-soft); }
.back { margin: -.25rem 0 1rem; padding: .35rem 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }
.back:hover { color: var(--ink); }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; padding-top: .125rem; overflow: visible; align-items: stretch; }
.slot-grid > .slot:first-child { margin-top: 0; }
.slot { border: 1px solid var(--line); color: var(--ink); background: #171717; font-weight: 500; }
.slot:hover, .slot:focus-visible, .slot.selected { border-color: var(--primary); outline: none; color: var(--primary-text); background: var(--primary); transform: translateY(-1px); }
.muted, .message { color: var(--muted); }
.summary { padding: .9rem; border: 1px solid color-mix(in srgb,var(--primary) 35%,var(--line)); border-radius: .75rem; background: color-mix(in srgb, var(--primary) 12%, var(--paper)); color: var(--ink); line-height: 1.6; }
.summary p { margin-bottom: .15rem; }
.summary:empty::before { content: "Nenhum agendamento selecionado."; color: var(--muted); }
#payment-section { margin: 1rem 0; }
#payment-section .step-label { margin-top: 0; }
.message { min-height: 1.5rem; margin: .85rem .25rem 0; text-align: center; }
.message.error { color: var(--danger); }
.status-card, .confirmation { text-align: center; }
#loading { overflow: hidden; text-align: left; }
.spinner { position: relative; width: 100%; height: 7.5rem; margin: 0 0 1rem; border: 0; border-radius: .75rem; background: #202020; animation: skeleton-pulse 1.4s ease-in-out infinite; }
.spinner::before, .spinner::after { content: ""; position: absolute; left: 1rem; height: .7rem; border-radius: 999px; background: #303030; }
.spinner::before { top: 1.25rem; width: 58%; }
.spinner::after { top: 2.65rem; width: 82%; box-shadow: 0 1.4rem 0 #2a2a2a; }
.success-mark { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; border: 1px solid color-mix(in srgb,var(--success) 70%,#ffffff); border-radius: 50%; color: var(--accent-text); background: var(--success); font-size: 1.6rem; }
.challenge-slot:empty { display: none; }
[hidden] { display: none !important; }
noscript { display: block; padding: 1rem; color: var(--muted); text-align: center; }
@keyframes skeleton-pulse { 50% { opacity: .58; } }
@media (min-width: 35rem) { .shell { padding-inline: 1.25rem; } .brand { margin-inline: -1.25rem; padding-inline: 1.25rem; } .card { padding: 1.6rem; } }
@media (max-width: 24rem) { .shell { padding-inline: .75rem; } .brand { margin-inline: -.75rem; padding-inline: .75rem; } .option-list.compact { grid-template-columns: 1fr; } .slot-grid { grid-template-columns: repeat(2,1fr); } .progress li { font-size: .62rem; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
html[data-theme="light"] .option,html[data-theme="light"] .slot,html[data-theme="light"] .field input { background:#ffffff; }
html[data-theme="light"] .field { color:#3f3f46; }
html[data-theme="light"] .brand h1,html[data-theme="light"] .eyebrow,html[data-theme="light"] .step-label { color:color-mix(in srgb,var(--primary) 82%,#111827); }
html[data-theme="light"] .card { box-shadow:0 10px 24px rgba(15,23,42,.08); }
