:root {
  --primary: #b239ef;
  --primary-2: #d86cff;
  --primary-dark: #5b197a;
  --primary-soft: #f6e9ff;
  --primary-soft-2: #fcf8ff;
  --ink: #17101d;
  --navy: #263a60;
  --muted: #7e7189;
  --muted-2: #a194ad;
  --line: rgba(92, 48, 118, 0.10);
  --card: rgba(255, 255, 255, 0.82);
  --white: #ffffff;
  --success: #20c465;
  --danger: #dc2626;
  --warning: #b97814;
  --shadow: 0 18px 52px rgba(65, 32, 86, 0.12);
  --shadow-soft: 0 10px 32px rgba(75, 36, 98, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% -8%, rgba(207, 120, 255, 0.26), transparent 30%),
    radial-gradient(circle at 0% 32%, rgba(178, 57, 239, 0.10), transparent 32%),
    linear-gradient(180deg, #fffaff 0%, #f8efff 48%, #fff 100%);
  color: var(--ink);
}
button, input, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: 100%;
  min-height: 100vh;
  padding: max(14px, env(safe-area-inset-top, 0px)) 14px calc(18px + var(--safe-bottom));
  display: flex;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}
.bg-glow { position: fixed; pointer-events: none; border-radius: 999px; filter: blur(16px); opacity: 0.7; }
.bg-glow-one { width: 360px; height: 360px; top: -190px; right: -145px; background: radial-gradient(circle, rgba(178, 57, 239, 0.22), transparent 64%); }
.bg-glow-two { width: 300px; height: 300px; left: -165px; bottom: 2%; background: radial-gradient(circle, rgba(216, 180, 254, 0.24), transparent 66%); }

.app-card { width: min(100%, 500px); position: relative; z-index: 1; }
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.70));
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
}
.inner { padding: 18px; }

.loading-screen, .state-screen {
  min-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 13px;
  color: var(--muted);
}
.brand-logo { display: block; width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 14px 30px rgba(178,57,239,.18)); }
.loading-logo, .state-logo { width: 70px; height: 70px; }
.top-brand-row { display: flex; justify-content: center; margin-bottom: 14px; }
.hero-logo { width: 40px; height: 40px; opacity: .96; }
.spinner { width: 26px; height: 26px; border-radius: 999px; border: 3px solid rgba(178,57,239,.14); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.technical-detail { max-width: 360px; margin: 0; padding: 10px 12px; border-radius: 16px; background: rgba(178,57,239,.08); color: #7a6088; font-size: 12px; line-height: 1.45; }
.brand-mark { width: 58px; height: 58px; border-radius: 22px; display: grid; place-items: center; color: white; font-weight: 900; font-size: 26px; background: linear-gradient(145deg, var(--primary), #d7a6ff); box-shadow: 0 16px 34px rgba(178,57,239,.25); }

.hero {
  position: relative;
  text-align: center;
  padding: 24px 18px 18px;
  background:
    radial-gradient(circle at 50% 2%, rgba(178,57,239,.14), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,.48), rgba(255,255,255,0));
}
.logo-stack { display: flex; flex-direction: column; align-items: center; gap: 13px; }
.avatar-ring {
  width: 92px; height: 92px; border-radius: 32px; padding: 3px;
  background: linear-gradient(145deg, rgba(178,57,239,.9), rgba(232,190,255,.95));
  box-shadow: 0 16px 40px rgba(178,57,239,.18);
  position: relative;
}
.avatar { width: 100%; height: 100%; border-radius: 29px; object-fit: cover; background: #fff; border: 4px solid rgba(255,255,255,.96); }
.avatar-fallback { width: 100%; height: 100%; border-radius: 29px; border: 4px solid rgba(255,255,255,.96); background: linear-gradient(145deg, #fff, #f7eaff); display: grid; place-items: center; color: var(--primary); font-size: 31px; font-weight: 900; }
.online-dot { width: 14px; height: 14px; border-radius: 50%; background: #23ca67; border: 3px solid #fff; position: absolute; right: 5px; bottom: 7px; }
.kicker { color: var(--primary); text-transform: uppercase; letter-spacing: 1.6px; font-size: 10px; font-weight: 900; margin: 0 0 8px; }
.title-gradient {
  margin: 0;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1.02;
  letter-spacing: -1.2px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--ink), var(--primary) 72%, #da92ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.professional-name { margin: 10px 0 0; color: var(--navy); font-weight: 850; font-size: 17px; }
.subtitle { max-width: 31rem; margin: 8px auto 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }

.card { background: var(--card); border: 1px solid rgba(255,255,255,.84); box-shadow: var(--shadow-soft); border-radius: var(--radius-lg); padding: 15px; }
.card + .card, .card + .section, .section + .card, .section + .section { margin-top: 14px; }
.info-grid { display: grid; gap: 10px; }
.info-row { display: flex; align-items: center; gap: 12px; }
.icon-badge { width: 42px; height: 42px; border-radius: 16px; display: grid; place-items: center; background: rgba(178,57,239,.09); color: var(--primary); flex: 0 0 auto; font-size: 18px; }
.info-label { display: block; color: var(--muted-2); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 3px; }
.info-value { margin: 0; color: var(--navy); font-weight: 820; line-height: 1.36; }

.primary-button, .secondary-button, .ghost-button, .back-button {
  border: 0; cursor: pointer; border-radius: 999px; min-height: 52px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none;
  transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.primary-button { width: 100%; color: #fff; font-weight: 900; background: linear-gradient(135deg, #a72ced, #cf70ff); box-shadow: 0 15px 34px rgba(178,57,239,.24); }
.primary-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.secondary-button { width: 100%; background: rgba(255,255,255,.78); color: var(--navy); border: 1px solid rgba(178,57,239,.12); font-weight: 850; box-shadow: 0 8px 24px rgba(59, 26, 80, .06); }
.whatsapp-button { color: #1b8f4c; }
.ghost-button, .back-button { background: rgba(255,255,255,.66); border: 1px solid rgba(178,57,239,.12); color: var(--primary-dark); font-weight: 850; }
.primary-button:not(:disabled):active, .secondary-button:active, .ghost-button:active, .back-button:active { transform: scale(.985); }

.step-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0 16px; }
.back-button { width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 16px; flex: 0 0 auto; font-size: 28px; line-height: 1; }
.step-center { text-align: center; min-width: 0; }
.step-label { margin: 0; color: var(--primary); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.5px; }
.step-title { margin: 3px 0 0; font-size: 16px; font-weight: 900; color: var(--ink); }
.section { padding: 0 0 2px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 11px; }
.section-kicker { margin: 0 0 3px; color: var(--primary); font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; font-weight: 900; }
.section-title { margin: 0 0 12px; color: var(--ink); font-size: 18px; letter-spacing: -.35px; }
.section-heading .section-title { margin-bottom: 0; }

.service-list, .days-list, .slots-list { display: grid; gap: 10px; }
.service-option, .day-option, .slot-option, .check-row {
  width: 100%; text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.74);
  border-radius: var(--radius-lg); padding: 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; color: var(--ink); box-shadow: 0 8px 22px rgba(74,34,95,.045);
}
.service-option.active, .day-option.active, .slot-option.active, .check-row.checked { border-color: rgba(178,57,239,.45); background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(249,234,255,.92)); box-shadow: 0 13px 32px rgba(178,57,239,.12); }
.option-main { min-width: 0; }
.option-title { margin: 0; font-weight: 900; font-size: 15.5px; color: var(--ink); }
.option-meta { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.38; }
.option-description { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.42; }
.option-side { text-align: right; flex: 0 0 auto; }
.price { color: var(--primary-dark); font-weight: 950; font-size: 14px; white-space: nowrap; }
.radio { margin: 8px 0 0 auto; width: 21px; height: 21px; border-radius: 50%; border: 2px solid rgba(178,57,239,.22); display: grid; place-items: center; }
.radio-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); }

.horizontal-scroll { display: flex; gap: 9px; overflow-x: auto; padding: 2px 3px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.horizontal-scroll::-webkit-scrollbar { display: none; }
.day-pill { min-width: 92px; border: 1px solid var(--line); background: rgba(255,255,255,.75); border-radius: 19px; padding: 12px 10px; text-align: center; color: var(--ink); cursor: pointer; }
.day-pill.active { background: linear-gradient(135deg, #a72ced, #ce70ff); color: #fff; border-color: transparent; box-shadow: 0 14px 28px rgba(178,57,239,.20); }
.day-week { font-size: 12.5px; font-weight: 900; display: block; }
.day-date { font-size: 11.5px; opacity: .8; margin-top: 3px; display: block; }
.slots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.slot-button { border: 1px solid var(--line); background: rgba(255,255,255,.78); color: var(--ink); border-radius: 17px; min-height: 48px; font-weight: 900; cursor: pointer; }
.slot-button.active { background: linear-gradient(135deg, #a72ced, #ce70ff); color: #fff; border-color: transparent; box-shadow: 0 13px 26px rgba(178,57,239,.20); }

.summary-card { border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(249,236,255,.82)); border: 1px solid rgba(255,255,255,.84); padding: 15px; margin-bottom: 14px; box-shadow: var(--shadow-soft); }
.summary-title { margin: 0; font-size: 16px; font-weight: 900; }
.summary-meta { margin: 6px 0 0; color: var(--muted); font-weight: 650; line-height: 1.42; font-size: 13px; }
.deposit-hint { margin: 11px 0 0; color: var(--warning); font-weight: 750; font-size: 12.5px; line-height: 1.42; }
.form-grid { display: grid; gap: 13px; }
.field { display: grid; gap: 7px; }
.label { color: var(--ink); font-size: 12.5px; font-weight: 850; }
.input, .textarea { width: 100%; border: 1px solid rgba(178,57,239,.13); background: rgba(255,255,255,.84); border-radius: 18px; padding: 14px 15px; color: var(--ink); outline: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.input:focus, .textarea:focus { border-color: rgba(178,57,239,.44); box-shadow: 0 0 0 4px rgba(178,57,239,.075); }
.textarea { min-height: 92px; resize: vertical; }
.field-error { color: var(--danger); font-size: 12px; font-weight: 750; }
.submit-error { color: var(--danger); background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.16); border-radius: 17px; padding: 12px 14px; font-size: 13px; font-weight: 750; line-height: 1.4; }
.check-row { align-items: flex-start; justify-content: flex-start; }
.checkbox { width: 23px; height: 23px; border-radius: 8px; border: 2px solid rgba(178,57,239,.24); display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.checked .checkbox { background: var(--primary); border-color: var(--primary); color: #fff; }
.check-copy { color: var(--muted); font-size: 12.8px; line-height: 1.42; }

.footer-action { position: sticky; bottom: calc(8px + var(--safe-bottom)); padding: 16px 0 2px; background: linear-gradient(to top, rgba(250,243,255,.98) 0%, rgba(250,243,255,.90) 68%, transparent 100%); }
.status-box { border-radius: var(--radius-lg); padding: 15px; border: 1px solid rgba(178,57,239,.14); background: rgba(255,255,255,.74); color: var(--muted); line-height: 1.46; font-size: 13px; }
.status-box.warning { color: var(--warning); background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.18); }
.status-box.error { color: var(--danger); background: rgba(220,38,38,.07); border-color: rgba(220,38,38,.16); }
.status-box.success { color: var(--success); background: rgba(22,163,74,.08); border-color: rgba(22,163,74,.18); }
.payment-card { margin-top: 14px; border-radius: var(--radius-lg); padding: 17px; background: linear-gradient(145deg, #fff, #faf0ff); border: 1px solid rgba(178,57,239,.15); box-shadow: var(--shadow-soft); }
.payment-amount { font-size: 28px; font-weight: 950; letter-spacing: -.8px; color: var(--primary-dark); margin: 6px 0 8px; }
.copy-box { margin-top: 10px; border-radius: 17px; padding: 12px; background: rgba(255,255,255,.84); border: 1px solid rgba(178,57,239,.13); word-break: break-word; color: var(--ink); font-size: 12.5px; line-height: 1.43; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: calc(18px + var(--safe-bottom)); transform: translateX(-50%) translateY(24px); opacity: 0; pointer-events: none; max-width: min(92vw, 420px); background: rgba(32,17,39,.92); color: #fff; border-radius: 999px; padding: 12px 16px; font-size: 13px; font-weight: 750; transition: opacity .2s ease, transform .2s ease; box-shadow: 0 16px 40px rgba(32,17,39,.22); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mt-14 { margin-top: 14px; }
.center { text-align: center; }

@media (min-width: 760px) {
  .page-shell { padding-top: 32px; padding-bottom: 32px; }
  .app-card { width: min(100%, 520px); }
  .inner { padding: 22px; }
  .hero { padding-top: 28px; }
}
@media (max-width: 380px) {
  .page-shell { padding-left: 10px; padding-right: 10px; }
  .inner { padding: 16px; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .slots-grid { grid-template-columns: repeat(2, 1fr); }
  .title-gradient { font-size: 28px; }
  .avatar-ring { width: 84px; height: 84px; border-radius: 29px; }
}
