:root {
  --bg: #f6ecd9;
  --surface: #fffaf1;
  --surface-soft: #fff4e6;
  --ink: #18231f;
  --ink-soft: #4c615a;
  --brand: #118876;
  --brand-strong: #0a5b51;
  --accent: #ff7a3c;
  --accent-soft: #ffd6b8;
  --line: #e9d6bf;
  --ok: #22744b;
  --danger: #9a2c2c;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(14, 49, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(14, 49, 42, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100%;
  line-height: 1.5;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.55;
}
body::before {
  width: 620px; height: 620px;
  top: -180px; left: -220px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #c8efe6, transparent 65%);
}
body::after {
  width: 720px; height: 720px;
  bottom: -260px; right: -260px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #ffd6b8, transparent 65%);
}

h1, h2, h3, h4 {
  font-family: "Fraunces", serif;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}
h1 { font-size: clamp(1.9rem, 4.4vw, 3.25rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; }

a { color: inherit; text-decoration: none; }
.link { color: var(--brand-strong); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ============  Header  ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(246, 236, 217, 0.82);
  border-bottom: 1px solid rgba(233, 214, 191, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(16px, 4vw, 44px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
}

.brand-mark {
  width: 38px; height: 38px;
  border-radius: 14px 22px 14px 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: inset 0 -4px 0 rgba(0,0,0,0.08);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.top-nav a:not(.button), .top-nav button:not(.button):not(.nav-toggle) {
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}
.top-nav a:not(.button):hover { background: #f1ddbf; }
#auth-link { display: inline-flex; gap: 6px; align-items: center; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 40px; height: 40px;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ============  Main  ============ */
main {
  padding: clamp(18px, 3vw, 36px) clamp(16px, 4vw, 44px) 80px;
  max-width: 1240px;
  margin: 0 auto;
}

.section { margin-top: 28px; }
.section-head { margin-bottom: 16px; }
.section-head h1, .section-head h2 { margin-bottom: 6px; }
.section-head p { margin: 0; color: var(--ink-soft); }

/* ============  Hero  ============ */
.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 18px;
}

.hero-content, .hero-card, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-content {
  padding: clamp(22px, 4vw, 48px);
  position: relative;
  overflow: hidden;
  border-radius: 36px 56px 36px 56px;
  background:
    radial-gradient(circle at 88% 8%, rgba(255,122,60,0.22), transparent 42%),
    radial-gradient(circle at 10% 92%, rgba(17,136,118,0.18), transparent 48%),
    var(--surface);
}

.hero-content::after {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  right: -90px; bottom: -130px;
  background: linear-gradient(145deg, rgba(200,239,230,0.75), rgba(255,214,184,0.6));
  border-radius: 62% 38% 55% 45% / 50% 52% 48% 50%;
  animation: blob 14s ease-in-out infinite;
  filter: blur(0.5px);
}
@keyframes blob {
  0%,100% { border-radius: 62% 38% 55% 45% / 50% 52% 48% 50%; transform: rotate(0deg); }
  50%     { border-radius: 42% 58% 35% 65% / 60% 40% 60% 40%; transform: rotate(8deg); }
}

.hero h1 {
  max-width: 17ch;
  margin-top: 8px;
}
.hero-copy {
  color: var(--ink-soft);
  max-width: 58ch;
  margin-top: 12px;
}

.hero-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(165deg, #fff9f2, #fff2e4);
  border-radius: 32px 16px 32px 16px;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-actions, .form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  margin-top: 18px;
}
.form-row { margin-top: 0; }

.chips {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chips span {
  font-size: 0.78rem;
  font-weight: 700;
  background: #dff2ea;
  color: #0d5b4c;
  border-radius: 999px;
  padding: 6px 12px;
}

.note-strip {
  margin-top: 22px;
  background: linear-gradient(90deg, #15241f, #20413a);
  color: #f6ecd9;
  border-radius: 18px;
  padding: 10px 16px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-soft);
}

/* ============  Service cards  ============ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.service-card {
  background: linear-gradient(180deg, #fffdf9, #fff6ea);
  border: 1px solid var(--line);
  border-radius: 22px 10px 22px 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
.service-card h3 { font-size: 1.2rem; }

.price {
  color: var(--brand-strong);
  font-weight: 800;
  font-size: 1.2rem;
  margin: 2px 0;
}
.meta-line { color: var(--ink-soft); font-size: 0.88rem; }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.split > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* ============  Buttons  ============ */
.button {
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.12s ease, box-shadow 0.18s ease, opacity 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.button-primary {
  background: linear-gradient(140deg, var(--brand), var(--brand-strong));
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 91, 81, 0.3);
}
.button-primary:hover { box-shadow: 0 12px 24px rgba(11, 91, 81, 0.4); }

.button-secondary {
  background: linear-gradient(140deg, #ffe4cf, #ffccaa);
  color: #6b2a10;
}
.button-ghost {
  border: 1px solid var(--line);
  background: #ffefe0;
  color: var(--ink);
}
.button.full { width: 100%; }

/* ============  Forms  ============ */
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #d2bfa6;
  background: #fff;
  padding: 11px 13px;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(17, 136, 118, 0.15);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 20px;
}
.form-grid.compact { grid-template-columns: 1fr; }
.full { grid-column: 1 / -1; }

.checkbox-line {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px dashed #d2bfa6;
  border-radius: 14px;
  padding: 9px 12px;
}
.checkbox-line input { width: auto; }

.summary {
  grid-column: 1 / -1;
  background: linear-gradient(160deg, #fff4e6, #fff9ef);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  line-height: 1.55;
}
.summary ul { margin: 6px 0; padding-left: 18px; }

/* ============  Dashboard / Lists  ============ */
.dashboard-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.panel { padding: 20px; }

.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.list li { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fffaf1; }

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.metric {
  background: linear-gradient(160deg, #fffaf1, #fff3e0);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.metric strong {
  display: block;
  font-size: 1.45rem;
  color: var(--brand-strong);
  font-family: "Fraunces", serif;
}

/* ============  Footer  ============ */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding: 28px clamp(16px, 4vw, 44px) 48px;
  display: flex;
  gap: 30px;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1240px;
  margin-left: auto; margin-right: auto;
}
.site-footer a, .site-footer span {
  display: block;
  margin-top: 6px;
  color: var(--brand-strong);
  font-weight: 700;
}
.site-footer span.info-text { color: var(--ink-soft); font-weight: 400; }

/* ============  Misc text  ============ */
.info-text { color: var(--ink-soft); }
.ok   { color: var(--ok); }
.warn { color: #805500; }
.bad  { color: var(--danger); }
.prose { max-width: 68ch; }

code {
  background: #f4e9d5;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

/* ============  Auth cards (login/registro)  ============ */
.auth-main {
  display: flex;
  justify-content: center;
  padding-top: 32px;
}
.auth-card {
  width: min(460px, 100%);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: 34px 14px 34px 14px;
}
.auth-card h1 { font-size: 1.8rem; }

/* ============  Admin panels  ============ */
.tab-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tab-btn {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff7eb;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.9rem;
}
.tab-btn.active {
  background: linear-gradient(140deg, var(--brand), var(--brand-strong));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(11, 91, 81, 0.3);
}

.tab-panel {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 1000px) {
  .tab-panel { grid-template-columns: 1fr 1.25fr; align-items: start; }
}

.admin-list {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px;
}
.admin-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  flex-wrap: wrap;
}
.admin-row .form-row { margin-top: 0; }

.avatar {
  width: 60px; height: 60px;
  border-radius: 20px 10px 20px 10px;
  object-fit: cover;
  background: #f1e5d3;
}
.avatar.placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-weight: 800;
}

/* ============  Selector de terapeuta (reservar.html)  ============ */
.therapist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.therapist-card {
  background: #fffaf1;
  border: 2px solid var(--line);
  border-radius: 22px 10px 22px 10px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.18s ease, background 0.2s ease;
}
.therapist-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.therapist-card.selected {
  border-color: var(--brand);
  background: linear-gradient(160deg, #fff8ee, #e6f4ee);
  box-shadow: 0 10px 22px rgba(11, 91, 81, 0.18);
}
.therapist-card .t-card-body {
  display: flex; flex-direction: column; gap: 2px;
}
.therapist-card .t-card-body strong {
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.t-card-photo {
  width: 72px; height: 72px;
  border-radius: 18px 8px 18px 8px;
  object-fit: cover;
  background: #f1e5d3;
}
.t-card-photo.placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--ink-soft);
}

/* ============  Términos y Condiciones (postulación)  ============ */
.terms-box {
  background: #fff7ec;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  max-height: 320px;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.55;
}
.terms-box p { margin: 8px 0; }
.terms-box ul { margin: 6px 0; padding-left: 20px; }
.terms-box strong { color: var(--ink); }

/* ============  Cámara / Verificación terapeutas  ============ */
.camera-shell {
  margin-top: 10px;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 480px;
}
.camera-shell video,
.camera-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.verification-row,
.application-row {
  align-items: stretch;
  gap: 14px;
}
.verification-docs,
.application-docs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  flex: 2;
  min-width: 260px;
}
.doc-thumb {
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
  background: #fff7ea;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
}
.doc-thumb img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 4px;
}

/* ============  Animations  ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  animation: reveal 0.55s ease forwards;
}
@keyframes reveal {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============  Responsive  ============ */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-content { border-radius: 30px 42px 30px 42px; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .top-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(246, 236, 217, 0.98);
    backdrop-filter: blur(14px);
    padding: 14px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
  }
  .top-nav.open { display: flex; }
  .top-nav a, .top-nav .button, .top-nav button {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .service-grid { grid-template-columns: 1fr; }
  .form-grid { padding: 16px; grid-template-columns: 1fr; }
  .panel { padding: 16px; border-radius: 22px; }
  .hero-content { border-radius: 22px 32px 22px 32px; }
  .hero-content::after { width: 240px; height: 240px; right: -60px; bottom: -100px; }
  h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .admin-row { flex-direction: column; align-items: stretch; }
  .site-footer { flex-direction: column; gap: 14px; }
}
