:root {
  --bg: #f6f3ee;
  --bg-elev: #ffffff;
  --bg-soft: #efeae2;
  --line: rgba(120, 98, 58, 0.16);
  --gold: #b0893a;
  --gold-soft: #c4a056;
  --gold-deep: #8a6a2e;
  --text: #2c2925;
  --muted: #6f6a62;
  --danger: #b94a4a;
  --ok: #3f7a4a;
  --warn: #b8862a;
  --ink: #1f1c18;
  --shadow: 0 12px 32px rgba(70, 55, 30, 0.08);
  --radius: 18px;
  --font-display: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(196, 160, 86, 0.14), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(196, 160, 86, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--gold-deep); text-decoration: none; }
a:hover { color: var(--ink); }

/* —— Intro de marca (primera visita de sesión) —— */
.brand-intro {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 500px at 50% 35%, rgba(196, 160, 86, 0.18), transparent 55%),
    #faf8f4;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  cursor: pointer;
}
.brand-intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
html.intro-done .brand-intro {
  display: none !important;
}
body.intro-open { overflow: hidden; }

body.intro-open .app-shell {
  opacity: 0;
  transform: scale(0.985);
  filter: blur(3px);
  transition: opacity 0.65s ease, transform 0.65s ease, filter 0.65s ease;
}

body.intro-open.intro-reveal .app-shell {
  opacity: 1;
  transform: scale(1);
  filter: none;
}

.brand-intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  padding: 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(14px) scale(0.94);
}
.brand-intro.is-on .brand-intro-inner {
  animation: brandIntroIn 0.85s ease forwards;
}

.brand-intro-logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(220px, 56vw);
  aspect-ratio: 1;
}

.brand-intro-glow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 160, 86, 0.28) 0%, transparent 68%);
  opacity: 0;
  pointer-events: none;
}

.brand-intro-ring {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  border: 2px solid rgba(196, 160, 86, 0.42);
  opacity: 0;
  pointer-events: none;
}

.brand-intro-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
}

.brand-intro.is-pulse .brand-intro-glow {
  animation: brandGlowPulse 1.75s ease-in-out infinite;
}

.brand-intro.is-pulse .brand-intro-ring {
  animation: brandRingPulse 1.75s ease-out infinite;
}

.brand-intro.is-pulse .brand-intro-logo {
  animation: brandLogoPulse 1.75s ease-in-out infinite;
}

.brand-intro-line {
  display: block;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), var(--gold), transparent);
  box-shadow: 0 0 14px rgba(201, 162, 74, 0.55);
}
.brand-intro.is-on .brand-intro-line {
  animation: brandLineIn 0.9s ease 0.35s forwards;
}
.brand-intro-text {
  margin: 0;
  color: var(--gold-deep);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
}
.brand-intro.is-on .brand-intro-text {
  animation: brandTextIn 0.6s ease 0.7s forwards;
}

@keyframes brandIntroIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes brandLineIn {
  to { width: min(190px, 48vw); }
}
@keyframes brandTextIn {
  to { opacity: 0.95; }
}

@keyframes brandLogoPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    transform: scale(1.045);
    filter: drop-shadow(0 0 16px rgba(196, 160, 86, 0.5));
  }
}

@keyframes brandGlowPulse {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.06);
  }
}

@keyframes brandRingPulse {
  0% {
    opacity: 0.55;
    transform: scale(0.88);
  }
  75% {
    opacity: 0;
    transform: scale(1.22);
  }
  100% {
    opacity: 0;
    transform: scale(1.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.intro-open .app-shell {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .brand-intro-inner,
  .brand-intro-text,
  .brand-intro-glow,
  .brand-intro-ring,
  .brand-intro-logo {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .brand-intro-line {
    width: min(190px, 48vw);
  }
}

/* —— Cierre de sesión —— */
.brand-outro {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 500px at 50% 40%, rgba(196, 160, 86, 0.14), transparent 55%),
    #faf8f4;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.brand-outro.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.brand-outro.is-leaving {
  opacity: 0;
  visibility: hidden;
}
body.logout-open { overflow: hidden; }
body.logout-open .app-shell {
  opacity: 0;
  transform: scale(0.985);
  filter: blur(3px);
  transition: opacity 0.55s ease, transform 0.55s ease, filter 0.55s ease;
}
.brand-outro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
  opacity: 0;
  transform: scale(1.04);
}
.brand-outro.is-active .brand-outro-inner {
  animation: brandOutroIn 0.7s ease forwards;
}
.brand-outro.is-leaving .brand-outro-inner {
  animation: brandOutroOut 0.65s ease forwards;
}
.brand-outro-logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(160px, 44vw);
  aspect-ratio: 1;
}
.brand-outro-glow {
  position: absolute;
  inset: -15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 160, 86, 0.22) 0%, transparent 68%);
  opacity: 0;
  pointer-events: none;
}
.brand-outro.is-active .brand-outro-glow {
  animation: brandOutroGlow 1.75s ease-in-out 0.2s 2 forwards;
}
.brand-outro-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
}
.brand-outro.is-active .brand-outro-logo {
  animation: brandOutroLogo 1.75s ease-in-out 0.2s 2 forwards;
}
.brand-outro-line {
  display: block;
  width: min(140px, 40vw);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), var(--gold), transparent);
  opacity: 0.85;
  transform: scaleX(1);
}
.brand-outro.is-leaving .brand-outro-line {
  animation: brandOutroLine 0.4s ease forwards;
}
.brand-outro-text {
  margin: 0;
  color: var(--gold-deep);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
}
.brand-outro.is-active .brand-outro-text {
  animation: brandTextIn 0.6s ease 0.35s forwards;
}
.brand-outro.is-leaving .brand-outro-text {
  animation: brandOutroText 0.5s ease forwards;
}

@keyframes brandOutroIn {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes brandOutroOut {
  to {
    opacity: 0;
    transform: scale(0.88) translateY(8px);
  }
}
@keyframes brandOutroLogo {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    transform: scale(1.04);
    filter: drop-shadow(0 0 12px rgba(196, 160, 86, 0.45));
  }
}
@keyframes brandOutroGlow {
  0%, 100% { opacity: 0.25; transform: scale(0.96); }
  50% { opacity: 0.7; transform: scale(1.05); }
}
@keyframes brandOutroLine {
  to {
    opacity: 0;
    transform: scaleX(0.3);
  }
}
@keyframes brandOutroText {
  to { opacity: 0; letter-spacing: 0.28em; }
}

@media (prefers-reduced-motion: reduce) {
  body.logout-open .app-shell {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .brand-outro-inner,
  .brand-outro-logo,
  .brand-outro-glow,
  .brand-outro-text,
  .brand-outro-line {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbf9f5 100%);
  border-right: 1px solid var(--line);
  padding: 0.9rem 0.85rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  box-sizing: border-box;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0.55rem 0.45rem 0.95rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex: 0 0 auto;
}

.brand {
  display: block;
  width: 100%;
  max-width: 148px;
}

.brand img {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
  margin: 0 auto;
  transition: transform .2s ease;
}

.brand:hover img {
  transform: scale(1.03);
}

.brand-meta {
  width: 100%;
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.brand-tag {
  margin: 0;
  text-align: center;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-place {
  margin: 0.22rem 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.nav-label {
  margin: 0 0.35rem 0.05rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  padding: 0.48rem 0.6rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: transparent;
  transition: background .18s ease;
}

.nav-ico {
  flex: 0 0 auto;
  width: 1.95rem;
  height: 1.95rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(176, 137, 58, 0.22);
  background: rgba(196, 160, 86, 0.08);
  color: var(--gold-deep);
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.nav-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}

.nav-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.nav-title {
  font-size: 0.92rem;
  font-weight: 650;
  color: inherit;
  line-height: 1.2;
}

/* Sin subtítulos: las 5 opciones caben sin scroll */
.nav-hint {
  display: none;
}

@media (max-height: 740px) {
  .brand-meta { display: none; }
  .brand { max-width: 118px; }
  .sidebar-brand { padding: 0.45rem 0.35rem 0.8rem; }
  .nav-link { padding: 0.4rem 0.55rem; }
  .nav-ico { width: 1.75rem; height: 1.75rem; }
  .sidebar {
    gap: 0.65rem;
    padding: 0.7rem 0.75rem 1.15rem;
  }
}

.nav-link:hover {
  color: var(--text);
  background: rgba(196, 160, 86, 0.1);
  border-color: rgba(176, 137, 58, 0.22);
}

.nav-link:hover .nav-ico {
  border-color: rgba(176, 137, 58, 0.4);
  background: rgba(196, 160, 86, 0.14);
}

.nav-link.active {
  color: var(--ink);
  background: rgba(196, 160, 86, 0.16);
  border-color: rgba(176, 137, 58, 0.35);
  box-shadow: none;
}

.nav-link.active::before {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
}

.nav-link.active .nav-ico {
  color: #fff;
  border-color: rgba(176, 137, 58, 0.65);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold-deep));
  box-shadow: none;
}

.nav-link.active .nav-hint {
  color: rgba(226, 193, 120, 0.85);
}

.sidebar-bottom {
  flex: 0 0 auto;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.1rem;
}

.sidebar-cta {
  display: grid;
  gap: 0.35rem;
  padding: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.58rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(176, 137, 58, 0.45);
  background: linear-gradient(180deg, #d4b36a, var(--gold));
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
  box-shadow: 0 8px 18px rgba(176, 137, 58, 0.18);
}

.nav-cta:hover {
  color: #fff;
  filter: brightness(1.05);
}

.nav-cta .nav-icon {
  width: 1.05rem;
  height: 1.05rem;
}

.nav-cta-ghost {
  display: block;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--muted);
  padding: 0.48rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.nav-cta-ghost:hover {
  color: var(--gold-deep);
  background: rgba(196, 160, 86, 0.1);
  border-color: rgba(176, 137, 58, 0.3);
}

.sidebar-foot {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
  padding: 0.55rem 0.45rem 0;
  border-top: 1px solid var(--line);
}

.sidebar-logout {
  display: grid;
  place-items: center;
  align-self: flex-end;
  width: 2.55rem;
  height: 2.55rem;
  margin: 0.15rem 0.35rem 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(185, 74, 74, 0.4);
  background: rgba(185, 74, 74, 0.08);
  color: #9a3a3a;
  flex-shrink: 0;
  animation: sidebarLogoutPulse 2.5s ease-in-out infinite;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-logout:hover {
  animation: none;
  color: #8f2f2f;
  background: rgba(185, 74, 74, 0.16);
  border-color: rgba(185, 74, 74, 0.58);
  transform: scale(1.08);
}

.sidebar-logout-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

@keyframes sidebarLogoutPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(185, 74, 74, 0.22);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 7px rgba(185, 74, 74, 0);
  }
}

.foot-line {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-deep);
  font-size: 0.8rem;
  line-height: 1.35;
}

.foot-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  opacity: 0.9;
}

.foot-muted {
  margin: 0.3rem 0 0;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--muted);
}

/* —— Pantalla Hoy —— */
.hoy-hero {
  padding: 1.25rem 1.35rem 1.1rem;
  margin-bottom: 0.85rem;
  background:
    linear-gradient(135deg, rgba(196, 160, 86, 0.14) 0%, transparent 52%),
    #fff;
  border-color: rgba(196, 160, 86, 0.28);
}
.hoy-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.hoy-kicker {
  margin: 0 0 0.25rem;
  color: var(--gold-deep);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  font-weight: 700;
}
.hoy-date {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.hoy-clock {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
}
.hoy-hero-stats {
  display: flex;
  gap: 0.55rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.hoy-stat {
  min-width: 4.2rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
}
.hoy-stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}
.hoy-stat-label {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.hoy-spotlight {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(196, 160, 86, 0.38);
  background:
    linear-gradient(120deg, rgba(196, 160, 86, 0.16), rgba(196, 160, 86, 0.04)),
    #fff;
}
.hoy-spotlight-time {
  text-align: center;
  padding-right: 0.85rem;
  border-right: 1px solid rgba(196, 160, 86, 0.25);
}
.hoy-spotlight-hour {
  display: block;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--gold-deep);
  line-height: 1;
}
.hoy-spotlight-end {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.hoy-spotlight-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.hoy-spotlight-name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.hoy-spotlight-zones {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}
.hoy-spotlight-actions {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: stretch;
}
.hoy-hero-note {
  margin: 0.95rem 0 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.hoy-progress {
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.hoy-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.hoy-progress-track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.hoy-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold-deep));
  transition: width 0.35s ease;
}

.hoy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.hoy-panel { margin-bottom: 0; }
.hoy-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.hoy-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.hoy-panel-sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
  max-width: 36rem;
}
.hoy-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(176, 137, 58, 0.28);
  background: rgba(196, 160, 86, 0.12);
  color: var(--gold-deep);
  font-size: 0.76rem;
  font-weight: 650;
}

.hoy-empty {
  padding: 1.15rem 1rem;
  text-align: center;
  border-radius: 14px;
  border: 1px dashed rgba(176, 137, 58, 0.28);
  background: var(--bg-soft);
}
.hoy-empty--compact {
  padding: 0.85rem 0.75rem;
}
.hoy-empty-ico {
  width: 2rem;
  height: 2rem;
  color: var(--gold-soft);
  opacity: 0.85;
  margin: 0 auto 0.55rem;
}
.hoy-empty-title {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.hoy-empty .btn { margin-top: 0.75rem; }

.hoy-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  max-height: calc(5 * 8.35rem + 4 * 0.65rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 0.15rem;
}
.hoy-item { margin: 0; }
.hoy-card {
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-left: 3px solid rgba(201, 162, 74, 0.35);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.hoy-item.is-next .hoy-card {
  border-left-color: var(--gold-deep);
  box-shadow: var(--shadow);
  background:
    linear-gradient(120deg, rgba(196, 160, 86, 0.1), transparent 50%),
    #fff;
}
.hoy-item.is-now .hoy-card {
  border-left-color: #2e7d4e;
  box-shadow: var(--shadow);
}
.hoy-item.is-done .hoy-card {
  opacity: 0.82;
  border-left-color: rgba(201, 162, 74, 0.2);
}
.hoy-item.is-cancelada .hoy-card {
  opacity: 0.58;
  border-left-color: rgba(185, 74, 74, 0.45);
  border-style: dashed;
}

.hoy-card-head {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
}
.hoy-card-time {
  text-align: center;
  padding: 0.35rem 0.25rem;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.hoy-time-start {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold-deep);
  line-height: 1.1;
}
.hoy-time-end {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.68rem;
  color: var(--muted);
}
.hoy-item.is-cancelada .hoy-time-start { color: #8f2f2f; }

.hoy-client {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}
.hoy-client a { color: var(--text); text-decoration: none; }
.hoy-client a:hover { color: var(--gold-deep); }
.hoy-phone {
  margin: 0.25rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-decoration: none;
}
.hoy-phone:hover { color: var(--gold-deep); }
.hoy-mini-ico {
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  opacity: 0.85;
}
.hoy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}
.badge-next {
  color: #1a150c;
  border-color: rgba(201, 162, 74, 0.7);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  font-weight: 700;
}
.badge-now {
  color: #1f6b3a;
  border-color: rgba(63, 122, 74, 0.4);
  background: #e7f6ec;
}

.hoy-card-body {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}
.hoy-zones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.hoy-zone-tag {
  display: inline-flex;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 74, 0.32);
  background: rgba(201, 162, 74, 0.1);
  color: var(--gold-deep);
  font-size: 0.74rem;
  font-weight: 600;
}
.hoy-meta {
  font-size: 0.8rem;
  color: var(--muted);
}
.hoy-card-actions {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hoy-week {
  display: grid;
  gap: 0.65rem;
}
.hoy-week-day {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.hoy-week-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.hoy-week-date {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.hoy-week-date strong {
  font-size: 0.88rem;
  text-transform: capitalize;
}
.hoy-week-date span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.hoy-week-count {
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(196, 160, 86, 0.14);
  color: var(--gold-deep);
}
.hoy-week-list {
  list-style: none;
  margin: 0;
  padding: 0.2rem;
  max-height: calc(5 * 3.1rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.hoy-week-day.is-past {
  opacity: 0.82;
}
.hoy-week-empty {
  margin: 0;
  padding: 0.55rem 0.75rem 0.65rem;
  font-size: 0.78rem;
}
.hoy-week-row {
  display: grid;
  grid-template-columns: 2.8rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}
.hoy-week-row:hover {
  background: rgba(201, 162, 74, 0.08);
  color: inherit;
}
.hoy-week-hour {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--gold-deep);
}
.hoy-week-info {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}
.hoy-week-info strong {
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hoy-week-info .muted {
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hoy-badges .status-pick-form {
  margin: 0;
}

.hoy-timeline,
.hoy-week-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 160, 86, 0.5) rgba(196, 160, 86, 0.08);
}
.hoy-timeline::-webkit-scrollbar,
.hoy-week-list::-webkit-scrollbar {
  width: 6px;
}
.hoy-timeline::-webkit-scrollbar-track,
.hoy-week-list::-webkit-scrollbar-track {
  background: rgba(196, 160, 86, 0.08);
  border-radius: 999px;
}
.hoy-timeline::-webkit-scrollbar-thumb,
.hoy-week-list::-webkit-scrollbar-thumb {
  background: rgba(196, 160, 86, 0.45);
  border-radius: 999px;
}
.hoy-timeline::-webkit-scrollbar-thumb:hover,
.hoy-week-list::-webkit-scrollbar-thumb:hover {
  background: rgba(176, 137, 58, 0.65);
}

.main {
  padding: 1.15rem 1.35rem 1.75rem;
  min-width: 0;
}

.main-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.topbar--actions {
  padding-bottom: 0;
  border-bottom: 0;
}

.topbar-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, #d4b36a, var(--gold));
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.btn:hover { filter: brightness(1.05); color: #fff; }
.btn-ghost {
  background: #fff;
  color: var(--gold-deep);
  border-color: rgba(176, 137, 58, 0.35);
}
.btn-ghost:hover { background: rgba(196, 160, 86, 0.12); color: var(--ink); }
.btn-danger {
  background: #fff;
  border-color: rgba(185, 74, 74, 0.45);
  color: var(--danger);
}
.btn-danger:hover {
  background: rgba(185, 74, 74, 0.08);
  color: #8f2f2f;
  filter: none;
}

.client-tabs {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 1rem;
  flex-wrap: wrap;
}
.client-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}
.client-tab span {
  min-width: 1.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(120, 98, 58, 0.08);
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}
.client-tab.is-active {
  border-color: rgba(201, 162, 74, 0.55);
  background: rgba(201, 162, 74, 0.12);
  color: var(--gold-deep);
}
.client-tab.is-active span {
  background: rgba(201, 162, 74, 0.22);
  color: var(--gold-deep);
}
.cliente-reactivar-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  border-color: rgba(201, 162, 74, 0.45);
  background: rgba(201, 162, 74, 0.08);
}
.cliente-reactivar-banner .cliente-section-title { margin: 0; }
.cliente-reactivar-banner form { margin: 0; }
.cliente-baja-panel {
  border-color: rgba(196, 87, 87, 0.22);
}
.cliente-baja-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}
.cliente-baja-card {
  margin: 0;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.cliente-baja-card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}
.cliente-baja-card p {
  margin: 0;
  flex: 1 1 auto;
}
.cliente-baja-card.is-danger {
  border-color: rgba(196, 87, 87, 0.35);
  background: rgba(196, 87, 87, 0.06);
}
.cliente-baja-card input[type="text"] {
  width: 100%;
}
@media (max-width: 720px) {
  .cliente-baja-grid { grid-template-columns: 1fr; }
}

.flash {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid;
}
.flash-ok { background: #eef6ee; border-color: rgba(63, 122, 74, 0.35); color: #2f5c38; }
.flash-error { background: #f8ecec; border-color: rgba(185, 74, 74, 0.35); color: #8f2f2f; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat, .panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat { padding: 1.1rem 1.2rem; }
.stat .label {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.stat .value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold-deep);
}

.panel { padding: 1.2rem; }
.panel h2, .panel h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 0.75rem 0.55rem;
  border-bottom: 1px solid rgba(120, 98, 58, 0.1);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
tbody tr:hover { background: rgba(201, 162, 74, 0.04); }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  border: 1px solid;
  white-space: nowrap;
}
.badge-programada {
  color: #8a6a12;
  border-color: rgba(196, 160, 86, 0.45);
  background: #fbf3d0;
}
.badge-confirmada {
  color: #1f6b3a;
  border-color: rgba(63, 122, 74, 0.4);
  background: #e7f6ec;
}
.badge-completada {
  color: #0f5f73;
  border-color: rgba(32, 140, 168, 0.4);
  background: #e6f6fa;
}
.badge-cancelada, .badge-reagendada {
  color: #8f2f2f;
  border-color: rgba(185, 74, 74, 0.4);
  background: #f8ecec;
}
.badge-reagendada {
  color: #8a4a12;
  border-color: rgba(200, 120, 50, 0.45);
  background: #fbe8d8;
}
.badge-cancelada {
  color: #8f2f2f;
  border-color: rgba(185, 74, 74, 0.4);
  background: #f8ecec;
}
.badge-pagado { color: #1f6b3a; border-color: rgba(63,122,74,.4); background: #e7f6ec; }
.badge-pendiente { color: #8a6a12; border-color: rgba(196,160,86,.45); background: #fbf3d0; }
.badge-parcial { color: #8a4a12; border-color: rgba(200,120,50,.45); background: #fbe8d8; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status-pick-form {
  display: inline-flex;
  margin: 0;
  vertical-align: middle;
}
.status-pick-wrap {
  display: inline-flex;
  margin: 0;
}
.status-pick {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 1.55rem 0.28rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  border: 1px solid;
  white-space: nowrap;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 12px) 55%,
    calc(100% - 7px) 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: filter .15s ease, box-shadow .15s ease;
}
.status-pick:hover {
  filter: brightness(1.08);
}
.status-pick:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.22);
}
.status-pick.badge-programada {
  color: #8a6a12;
  border-color: rgba(196, 160, 86, 0.45);
  background-color: #fbf3d0;
}
.status-pick.badge-confirmada {
  color: #1f6b3a;
  border-color: rgba(63, 122, 74, 0.4);
  background-color: #e7f6ec;
}
.status-pick.badge-completada {
  color: #0f5f73;
  border-color: rgba(32, 140, 168, 0.4);
  background-color: #e6f6fa;
}
.status-pick.badge-reagendada {
  color: #8a4a12;
  border-color: rgba(200, 120, 50, 0.45);
  background-color: #fbe8d8;
}
.status-pick.badge-cancelada {
  color: #8f2f2f;
  border-color: rgba(185, 74, 74, 0.4);
  background-color: #f8ecec;
}
.status-pick.badge-pagado {
  color: #1f6b3a;
  border-color: rgba(63, 122, 74, 0.4);
  background-color: #e7f6ec;
}
.status-pick.badge-pendiente {
  color: #8a6a12;
  border-color: rgba(196, 160, 86, 0.45);
  background-color: #fbf3d0;
}
.status-pick.badge-parcial {
  color: #8a4a12;
  border-color: rgba(200, 120, 50, 0.45);
  background-color: #fbe8d8;
}
.status-pick option {
  color: #1a150c;
  background: #f4efe4;
}
.status-pick-form.is-saving {
  opacity: 0.55;
  pointer-events: none;
}

.hoy-badges .status-pick-form {
  margin-top: 0.1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.form-grid .full { grid-column: 1 / -1; }

label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}

input[type="text"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(120, 98, 58, 0.22);
  color: var(--text);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
}

textarea { min-height: 90px; resize: vertical; }

.client-picker {
  position: relative;
}
.client-picker-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(120, 98, 58, 0.22);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(40, 28, 8, 0.12);
  padding: 0.3rem;
}
.client-picker-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.client-picker-option span {
  color: var(--muted);
  font-size: 0.8rem;
}
.client-picker-option:hover,
.client-picker-option.is-active {
  background: rgba(201, 162, 74, 0.12);
}
.client-picker-empty,
.client-picker-more {
  margin: 0;
  padding: 0.65rem 0.75rem;
  color: var(--muted);
  font-size: 0.84rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.15);
}

/* Opciones del desplegable: contraste legible (Windows/Chrome) */
select option,
select optgroup {
  color: #1a150c;
  background-color: #f4efe4;
  font-weight: 500;
}
select option:checked,
select option:hover {
  color: #1a150c;
  background-color: #e2c178;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-size: 0.92rem;
}
.check input { width: auto; accent-color: var(--gold); }

.zona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.55rem;
}
.zona-chip {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  align-items: center;
  cursor: pointer;
}
.zona-chip:has(input:checked) {
  border-color: rgba(201,162,74,.7);
  background: rgba(201,162,74,.12);
}
.zona-chip.from-ficha {
  box-shadow: inset 0 0 0 1px rgba(201,162,74,.28);
}
.zona-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
}
.cita-ficha-box {
  border: 1px solid rgba(201,162,74,.22);
  border-radius: 14px;
  background: rgba(201,162,74,.06);
  padding: 0.85rem 1rem;
}
.cita-ficha-hint {
  margin: 0;
  color: var(--gold-deep);
  font-size: 0.85rem;
}
.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.seguimiento-form {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  padding: 0.95rem 1rem 1.05rem;
  margin-bottom: 0.4rem;
}
.seguimiento-table th,
.seguimiento-table td {
  white-space: nowrap;
}
.seguimiento-table td:nth-child(7) {
  white-space: normal;
  min-width: 140px;
}
.seguimiento-table.compact th,
.seguimiento-table.compact td {
  padding: 0.45rem 0.55rem;
  font-size: 0.84rem;
}
.seguimiento-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}
.seguimiento-actions .inline-form {
  display: inline;
  margin: 0;
}
.seguimiento-actions .link-danger,
button.link-danger {
  background: none;
  border: none;
  padding: 0;
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}
.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.cita-historial-box {
  background: var(--bg-soft);
}
.seg-modo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.seg-modo-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.86rem;
  cursor: pointer;
}
.seg-modo-tab:has(input:checked) {
  border-color: rgba(201,162,74,.55);
  background: rgba(201,162,74,.12);
  color: var(--gold-deep);
}
.sesiones-lista {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}
.sesion-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.sesion-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid rgba(201,162,74,.14);
  background: rgba(201,162,74,.06);
}
.sesion-num {
  font-weight: 700;
  color: var(--gold-deep);
  margin-right: 0.55rem;
}
.sesion-fecha {
  color: var(--muted);
  font-size: 0.88rem;
}
.sesion-precio {
  display: inline-block;
  margin-left: 0.55rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: rgba(201, 162, 74, 0.16);
  color: var(--gold-deep);
  font-size: 0.82rem;
  font-weight: 700;
}
.sesion-precio-ref {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--gold-deep);
}
.sesion-card .table-wrap {
  padding: 0.15rem 0.35rem 0.35rem;
}
.seg-obs {
  white-space: normal !important;
  min-width: 120px;
  max-width: 220px;
}
.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}
.cita-disponibilidad {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.cita-disponibilidad.is-ok {
  border-color: rgba(111, 158, 106, 0.45);
  background: rgba(111, 158, 106, 0.12);
}
.cita-disponibilidad.is-busy {
  border-color: rgba(196, 87, 87, 0.45);
  background: rgba(196, 87, 87, 0.12);
}
.cita-disponibilidad-msg {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  line-height: 1.4;
}
.cita-disponibilidad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
#cita-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.timepicker {
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.95rem 1rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(196, 160, 86, 0.1), transparent 55%),
    #fff;
  box-shadow: var(--shadow);
}
.timepicker.is-muted {
  opacity: 0.55;
  pointer-events: none;
}
.timepicker-selected {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: var(--bg-soft);
  font-size: 0.84rem;
}
.timepicker-selected-k {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.timepicker-selected strong {
  color: var(--ink);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.timepicker-periods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.timepicker-period {
  min-width: 0;
  padding: 0.7rem 0.7rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}
.timepicker-label {
  display: block;
  margin: 0 0 0.55rem;
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.timepicker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}
.timepicker-empty {
  grid-column: 1 / -1;
  margin: 0.35rem 0;
}
.timepicker-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.4rem 0.2rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: center;
  transition:
    border-color .15s ease,
    background .15s ease,
    box-shadow .15s ease;
}
.timepicker-item-main {
  font-size: 0.92rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.timepicker-item:hover:not(:disabled):not(.is-selected) {
  border-color: rgba(201, 162, 74, 0.55);
  background: rgba(201, 162, 74, 0.12);
}
.timepicker-item.is-busy:not(.is-selected) {
  cursor: not-allowed;
  color: #8f2f2f;
  border-color: rgba(196, 87, 87, 0.22);
  background: rgba(196, 87, 87, 0.08);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.timepicker-item.is-selected {
  color: #1a150c;
  border-color: rgba(226, 193, 120, 0.9);
  background: linear-gradient(180deg, #e8cb86, #c9a24a);
  box-shadow: 0 6px 14px rgba(201, 162, 74, 0.22);
}
.timepicker-item.is-custom {
  border-style: dashed;
}
.timepicker-busy {
  padding: 0.7rem 0.8rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(196, 87, 87, 0.22);
  background: rgba(196, 87, 87, 0.06);
}
.timepicker-busy-title {
  margin: 0 0 0.45rem;
  color: #8f2f2f;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.timepicker-busy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.timepicker-busy-list li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(185, 74, 74, 0.18);
  background: #fff;
  font-size: 0.8rem;
  color: var(--muted);
}
.timepicker-busy-list strong {
  color: #8f2f2f;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 860px) {
  .timepicker-periods {
    grid-template-columns: 1fr;
  }
  .timepicker-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .timepicker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.section-title {
  margin: 1.4rem 0 0.7rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--gold-deep);
}
.section-num {
  color: var(--gold);
  margin-right: 0.25rem;
  font-weight: 700;
}
.subsection-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: 0.01em;
}
.valoracion-grid {
  align-items: start;
}
.valoracion-block {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}
.areas-figure {
  margin: 0;
  padding: 0;
}
.areas-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  border-radius: 10px;
  background: #f3efe8;
  border: 1px solid var(--line);
}

.body-map {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.85fr);
  gap: 0.85rem;
  align-items: start;
}
.body-map-main {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.65rem 0.85rem 0.85rem;
  overflow: visible;
}
.body-map-gender { display: none; overflow: visible; }
.body-map-gender.is-active { display: block; }
.body-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  justify-items: center;
  overflow: visible;
}
.body-view-card {
  min-width: 0;
  width: 100%;
  max-width: 180px;
  overflow: visible;
}
.body-panel-title {
  margin: 0 0 0.3rem;
  text-align: center;
  color: var(--gold-deep);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.body-photo-stage {
  position: relative;
  width: 100%;
  overflow: visible;
}
.body-photo-wrap {
  position: relative;
  width: 168px;
  margin: 0 auto;
  overflow: visible;
}
.body-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  border-radius: 10px;
  background: #f3efe8;
  border: 1px solid var(--line);
}
.body-hits-full {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.body-hit {
  position: absolute;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  border: 1.5px solid rgba(226, 193, 120, 0.95);
  border-radius: 50%;
  background: rgba(201, 162, 74, 0.55);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 2;
}
.body-hit:hover,
.body-hit:focus-visible {
  background: rgba(226, 193, 120, 0.95);
  border-color: #f0d78a;
  transform: translate(-50%, -50%) scale(1.15);
  z-index: 5;
  outline: none;
}
.body-hit.is-selected {
  background: #c9a24a;
  border-color: #f3e7c8;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.4),
    inset 0 0 0 2px rgba(26, 20, 8, 0.25);
  z-index: 4;
}
.body-hit-pulse {
  animation: bodyPulse 1.6s ease-in-out infinite;
}
.body-hit-pulse.is-selected {
  animation: none;
}
@keyframes bodyPulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(201, 162, 74, 0.55),
      0 0 0 2px rgba(0, 0, 0, 0.35);
  }
  55% {
    box-shadow:
      0 0 0 7px rgba(201, 162, 74, 0),
      0 0 0 2px rgba(0, 0, 0, 0.35);
  }
}
.body-hit-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  transform: translateX(-50%) translateY(4px);
  padding: 0.35rem 0.7rem;
  border-radius: 7px;
  border: 1px solid rgba(201, 162, 74, 0.7);
  background: #fff;
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  z-index: 6;
}
.body-hit-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(201, 162, 74, 0.7);
}
.body-hit:hover .body-hit-tip,
.body-hit:focus-visible .body-hit-tip,
.body-hit.is-selected .body-hit-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.body-hit.is-selected .body-hit-tip {
  background: linear-gradient(180deg, #e2c178, #c9a24a);
  border-color: #8d6b28;
  color: #1a1408;
}
.body-hit.is-selected .body-hit-tip::after {
  border-top-color: #c9a24a;
}
.body-map-side {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
}
.areas-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 48px;
  margin-top: 0.7rem;
}
.area-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(201, 162, 74, 0.4);
  background: rgba(201, 162, 74, 0.12);
  color: var(--gold-deep);
  border-radius: 999px;
  padding: 0.42rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.area-chip-x {
  opacity: 0.75;
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
}
.area-chip:hover {
  background: rgba(185, 74, 74, 0.1);
  border-color: rgba(185, 74, 74, 0.4);
  color: #8f2f2f;
}
.body-hint {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .body-map { grid-template-columns: 1fr; }
  .body-pair { grid-template-columns: 1fr 1fr; gap: 0.85rem; }
  .body-view-card { max-width: 160px; }
  .body-photo-wrap { width: 150px; }
  .body-photo { max-height: 280px; }
}
@media (max-width: 560px) {
  .body-pair { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .body-view-card { max-width: 150px; }
  .body-photo-wrap { width: 140px; }
  .body-photo { max-height: 250px; }
}
.fototipo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.fototipo-card {
  margin: 0;
  cursor: pointer;
}
.fototipo-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fototipo-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  padding: 0.55rem 0.35rem 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
  min-height: 118px;
  transition: border-color .15s ease, background .15s ease;
}
.fototipo-card:hover .fototipo-card-inner {
  border-color: rgba(201, 162, 74, 0.5);
}
.fototipo-card input:checked + .fototipo-card-inner {
  border-color: var(--gold);
  background: rgba(201, 162, 74, 0.12);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 74, 0.28);
}
.fototipo-swatch {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25);
}
.fototipo-rom {
  color: var(--gold-soft);
  font-weight: 700;
  font-size: 0.85rem;
}
.fototipo-title {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
}
.fototipo-desc {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}
.choice-label {
  margin: 0.85rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.choice-label .opt-icon {
  width: 16px;
  height: 16px;
  color: var(--gold-soft);
}
.vello-group { margin-top: 0.85rem; }
.vello-group:first-of-type { margin-top: 0.25rem; }
.vello-group .choice-label { margin: 0 0 0.45rem; }
.seg-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.seg-option {
  margin: 0;
  cursor: pointer;
  min-width: 0;
}
.seg-option + .seg-option {
  border-left: 1px solid rgba(201, 162, 74, 0.22);
}
.seg-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.seg-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  transition: background .15s ease, color .15s ease;
  user-select: none;
}
.seg-option:hover span {
  color: var(--text);
  background: rgba(201, 162, 74, 0.06);
}
.seg-option input:checked + span {
  color: #14110a;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
}
.seg-option input:focus-visible + span {
  outline: 2px solid var(--gold-soft);
  outline-offset: -2px;
}

.legal-section .aviso-box {
  max-height: none;
  overflow: visible;
}
.aviso-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-line;
}
.aviso-privacy {
  font-size: 0.86rem;
}
.consent-box { display: none; }
.consent-box.is-active { display: block; }
.consent-nombre {
  display: inline;
  color: var(--gold-deep);
  font-weight: 700;
  border-bottom: 1px dashed rgba(176, 137, 58, 0.55);
  padding: 0 0.1rem;
}
.consent-nombre.is-filled {
  color: var(--ink);
  border-bottom-color: var(--gold);
  border-bottom-style: solid;
}
.legal-client-name .consent-nombre.is-filled {
  color: var(--gold-deep);
}

.legal-section {
  margin-bottom: 1.15rem;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.legal-section:last-of-type {
  margin-bottom: 0;
}
.legal-section--privacy {
  display: none;
}
.legal-section--privacy.is-visible {
  display: block;
  animation: legalStepIn 0.35s ease both;
}
.legal-section--consent.is-collapsed .legal-section-title,
.legal-section--consent.is-collapsed .legal-section-body {
  display: none;
}
.legal-section--consent .legal-section-summary {
  display: none;
}
.legal-section--consent.is-collapsed .legal-section-summary {
  display: flex;
}
.legal-section-summary {
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(63, 122, 74, 0.35);
  background: #e7f6ec;
  color: #1f6b3a;
  font-size: 0.86rem;
  font-weight: 600;
}
.legal-done-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #1f6b3a;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.legal-expand-btn {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--gold-deep);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.15rem 0.25rem;
}
.legal-expand-btn:hover {
  color: var(--ink);
}
@keyframes legalStepIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.legal-section-title {
  margin: 0 0 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(176, 137, 58, 0.2);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.legal-check {
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.legal-check input {
  width: auto;
  accent-color: var(--gold);
}
.legal-firmas {
  margin-top: 1rem;
}

.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.calendar-nav h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.cal-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding: 1.05rem 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 140% at 100% 0%, rgba(196, 160, 86, 0.14), transparent 55%),
    #fff;
  box-shadow: var(--shadow);
}
.cal-kicker {
  margin: 0 0 0.25rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  font-weight: 650;
}
.cal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.cal-sub { margin: 0.4rem 0 0; }
.cal-hero-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}
.cal-view-toggle {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}
.cal-toggle {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}
.cal-toggle.active {
  color: #fff;
  background: linear-gradient(180deg, #d4b36a, var(--gold));
}
.cal-toggle:hover:not(.active) { color: var(--text); }
.cal-nav-arrows {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-bottom: 0.95rem;
  padding: 0 0.15rem;
}
.cal-leg {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.cal-leg-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  display: inline-block;
  animation: cal-leg-pulse 2.4s ease-in-out infinite;
}
.cal-leg:nth-child(2) .cal-leg-dot { animation-delay: 0.3s; }
.cal-leg:nth-child(3) .cal-leg-dot { animation-delay: 0.6s; }
.cal-leg:nth-child(4) .cal-leg-dot { animation-delay: 0.9s; }
.cal-leg:nth-child(5) .cal-leg-dot { animation-delay: 1.2s; }
.cal-leg-dot.estado-programada { background: #c4a056; }
.cal-leg-dot.estado-confirmada { background: #3f7a4a; }
.cal-leg-dot.estado-completada { background: #2a8aa8; }
.cal-leg-dot.estado-reagendada { background: #c87832; }
.cal-leg-dot.estado-cancelada { background: #b94a4a; }
@keyframes cal-leg-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.82); opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-leg-dot { animation: none; }
}

.cal-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}
.cal-head, .cal-day {
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 110px;
  padding: 0.5rem;
  background: #fff;
}
.cal-head {
  min-height: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem;
  background: rgba(201, 162, 74, 0.05);
}
.cal-day {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color .15s ease, background .15s ease;
}
.cal-day.empty {
  opacity: 0.28;
  min-height: 70px;
  background: transparent;
}
.cal-day.has-events { background: #fff; }
.cal-day.today {
  border-color: rgba(176, 137, 58, 0.55);
  box-shadow: inset 0 0 0 1px rgba(196, 160, 86, 0.2), var(--shadow);
  background:
    linear-gradient(160deg, rgba(196, 160, 86, 0.14), transparent 45%),
    #fff;
}
.cal-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}
.cal-day .num {
  font-weight: 700;
  color: var(--gold-deep);
  font-size: 0.95rem;
}
.cal-day .num.is-today {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  color: #1a150c;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
}
.cal-day-count {
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid rgba(201,162,74,.22);
  border-radius: 999px;
  padding: 0.1rem 0.4rem;
}
.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-height: 0;
}
.cal-event {
  display: block;
  font-size: 0.72rem;
  background: rgba(201,162,74,.12);
  border-left: 3px solid rgba(201,162,74,.55);
  border-radius: 8px;
  padding: 0.28rem 0.4rem;
  color: var(--text);
  overflow: hidden;
  line-height: 1.25;
  white-space: normal;
  transition: filter .15s ease, transform .15s ease;
}
.cal-event:hover {
  color: var(--text);
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.cal-event-time {
  display: block;
  color: var(--gold-deep);
  font-weight: 700;
}
.cal-event-name {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event-meta {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-more {
  font-size: 0.68rem;
  color: var(--muted);
  padding: 0.1rem 0.2rem;
}
.cal-event.estado-programada {
  border-left-color: #c4a056;
  background: #fbf3d0;
}
.cal-event.estado-confirmada {
  border-left-color: #3f7a4a;
  background: #e7f6ec;
}
.cal-event.estado-completada {
  border-left-color: #2a8aa8;
  background: #e6f6fa;
}
.cal-event.estado-reagendada {
  border-left-color: #c87832;
  background: #fbe8d8;
}
.cal-event.estado-cancelada {
  border-left-color: #b94a4a;
  background: #f8ecec;
  opacity: 0.9;
  text-decoration: none;
}
.cal-event.estado-cancelada .cal-event-name {
  text-decoration: line-through;
  opacity: 0.9;
}
.cal-event.pago-pagado { box-shadow: inset 0 0 0 1px rgba(63, 122, 74, 0.28); }
.cal-event.pago-parcial { box-shadow: inset 0 0 0 1px rgba(196, 160, 86, 0.35); }
.cal-event.pago-pendiente { box-shadow: inset 0 0 0 1px rgba(185, 74, 74, 0.28); }

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.55rem;
}
.week-col {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  min-height: 260px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.week-col.today {
  border-color: rgba(176, 137, 58, 0.5);
  background:
    linear-gradient(180deg, rgba(196, 160, 86, 0.12), transparent 35%),
    #fff;
  box-shadow: var(--shadow);
}
.week-col-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(201,162,74,.14);
}
.week-dow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.week-date {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text);
}
.week-date.is-today { color: var(--gold-deep); }
.week-count {
  min-width: 1.5rem;
  height: 1.5rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-soft);
  border: 1px solid rgba(201,162,74,.28);
  background: rgba(201,162,74,.08);
}
.week-empty {
  margin: 0.6rem 0 0;
  font-size: 0.84rem;
}
.week-events {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.week-event {
  padding: 0.45rem 0.5rem;
}
.cal-foot-hint {
  margin: 0.95rem 0 0;
  font-size: 0.82rem;
}
.cal-foot-hint strong { color: var(--gold-deep); }

.hist-client-grid {
  display: grid;
  gap: 0.65rem;
}
.hist-client-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.hist-client-card:hover {
  color: inherit;
  border-color: rgba(201, 162, 74, 0.45);
  background: rgba(201, 162, 74, 0.08);
  transform: translateY(-1px);
}
.hist-client-name {
  display: block;
  font-size: 1.05rem;
  color: var(--text);
}
.hist-client-meta {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
}
.hist-client-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  text-align: right;
}
.hist-stat {
  color: var(--gold-deep);
  font-size: 0.88rem;
}
.hist-stat em {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-right: 0.2rem;
}
.hist-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.pagination-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.pagination-info {
  margin: 0;
  font-size: 0.84rem;
}
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  height: 2.15rem;
  padding: 0 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pagination-btn:hover:not(.is-disabled):not(.is-active) {
  border-color: rgba(201, 162, 74, 0.45);
  background: rgba(201, 162, 74, 0.08);
  color: var(--gold-deep);
}
.pagination-btn.is-active {
  border-color: var(--gold);
  background: rgba(201, 162, 74, 0.16);
  color: var(--gold-deep);
  pointer-events: none;
}
.pagination-btn.is-disabled {
  opacity: 0.35;
  cursor: default;
}
.pagination-ellipsis {
  padding: 0 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.hist-summary {
  border-color: var(--line);
  background:
    linear-gradient(120deg, rgba(196, 160, 86, 0.1), transparent 45%),
    #fff;
}

.filters {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
}
.filters input,
.filters select {
  max-width: none;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.55rem 0.15rem;
  color: var(--text);
  font-weight: 600;
}
.filters select {
  cursor: pointer;
  color-scheme: light;
}
.filters select option {
  color: #1a150c;
  background-color: #f4efe4;
  font-weight: 600;
}
.filters input:focus,
.filters select:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(196, 160, 86, 0.12), transparent 55%),
    #fff;
  box-shadow: var(--shadow);
}
.filter-kicker {
  margin: 0 0 0.2rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 650;
}
.filter-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.filter-sub {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
}
.filter-bar .filters {
  flex: 1 1 320px;
  justify-content: flex-end;
}
.filter-field {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: min(100%, 240px);
  padding: 0.2rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.filter-field:focus-within {
  border-color: rgba(176, 137, 58, 0.5);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(196, 160, 86, 0.16);
}
.filter-search { flex: 1 1 220px; max-width: 360px; }
.filter-select { flex: 0 1 200px; min-width: 180px; }
.filter-ico {
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  flex: 0 0 auto;
}
.filter-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: block;
}
.filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  background: #fff;
}
.filter-clear:hover {
  color: var(--gold-soft);
  border-color: rgba(201, 162, 74, 0.45);
  background: rgba(201, 162, 74, 0.08);
}

/* Chrome search clear button */
.filters input[type="search"]::-webkit-search-decoration,
.filters input[type="search"]::-webkit-search-cancel-button,
.filters input[type="search"]::-webkit-search-results-button,
.filters input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.muted { color: var(--muted); }
.actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
}
button.action-btn {
  font: inherit;
  cursor: pointer;
}
.actions .inline-form { margin: 0; }
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.55rem 0.32rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 74, 0.28);
  background: rgba(201, 162, 74, 0.06);
  color: var(--gold-deep);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    box-shadow .18s ease;
}
.action-btn .action-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  transition: transform .22s ease;
}
.action-btn:hover {
  color: #1a150c;
  background: linear-gradient(180deg, rgba(226, 193, 120, 0.95), rgba(201, 162, 74, 0.9));
  border-color: rgba(201, 162, 74, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(201, 162, 74, 0.18);
}
.action-btn:hover .action-icon {
  transform: scale(1.12);
}
.action-btn:active {
  transform: translateY(0);
}
.action-btn.is-danger {
  color: #8f2f2f;
  border-color: rgba(185, 74, 74, 0.35);
  background: #f8ecec;
}
.action-btn.is-danger:hover {
  color: #6e2020;
  background: #f3dede;
  border-color: rgba(185, 74, 74, 0.55);
  box-shadow: 0 6px 14px rgba(185, 74, 74, 0.12);
}
@media (max-width: 720px) {
  .action-btn span { display: none; }
  .action-btn {
    padding: 0.4rem;
    border-radius: 10px;
  }
}
.stack-sm > * + * { margin-top: 0.55rem; }

.firmas-grid {
  align-items: start;
  justify-content: start;
  max-width: 720px;
}
.signature-block {
  max-width: 320px;
}
.signature-block label { margin-bottom: 0.4rem; }
.signature-pad {
  position: relative;
  width: 100%;
  max-width: 320px;
  min-height: 110px;
  background: #f7f3ea;
  border: 1px dashed rgba(201, 162, 74, 0.55);
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}
.signature-pad canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}
.signature-pad.is-drawing {
  border-style: solid;
  border-color: var(--gold);
}
.signature-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  background: #f7f3ea;
  padding: 0.4rem;
}
.firma-view {
  background: #f7f3ea;
  border-radius: 14px;
  border: 1px solid rgba(201,162,74,.3);
  padding: 0.6rem;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.firma-view img {
  max-width: 100%;
  max-height: 160px;
  display: block;
}

/* Tarjetas de antecedentes (ficha) */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
  margin-top: 0.7rem;
}
.option-card {
  margin: 0;
  cursor: pointer;
}
.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.option-card-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  min-height: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color .15s ease, background .15s ease;
  height: 100%;
}
.option-card:hover .option-card-inner {
  border-color: rgba(201, 162, 74, 0.5);
  background: rgba(201, 162, 74, 0.06);
}
.option-card input:checked + .option-card-inner {
  border-color: var(--gold);
  background: rgba(201, 162, 74, 0.12);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 74, 0.25);
}
.option-card input:focus-visible + .option-card-inner {
  outline: 2px solid var(--gold-soft);
  outline-offset: 2px;
}
.opt-icon {
  width: 18px;
  height: 18px;
  color: var(--gold-soft);
  flex-shrink: 0;
}
.option-card-label {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.25;
  font-weight: 500;
}

.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.legal-modal.is-open { display: flex; }
.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 36, 24, 0.42);
  backdrop-filter: blur(2px);
}
.legal-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(70, 55, 30, 0.18);
  overflow: hidden;
}
.legal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}
.legal-modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--gold-deep);
}
.legal-modal-body {
  padding: 1rem 1.15rem 1.2rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.legal-modal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(201, 162, 74, 0.18);
}
.legal-submit-hint {
  margin: 0;
  flex: 1 1 220px;
  font-size: 0.82rem;
}
#legal-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.25);
}
body.modal-open { overflow: hidden; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .main {
    padding: 1rem 1rem 1.5rem;
  }
  .main-inner {
    max-width: none;
  }
  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--line);
    gap: 0.9rem;
    overflow: visible;
  }
  .sidebar-brand {
    flex-direction: row;
    align-items: center;
    gap: 0.95rem;
    padding: 0.55rem 0.35rem 0.85rem;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    max-width: 88px;
    flex: 0 0 auto;
  }
  .brand-meta {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    text-align: left;
  }
  .brand-tag,
  .brand-place {
    text-align: left;
  }
  .sidebar-section {
    gap: 0.35rem;
    flex: 0 0 auto;
    overflow: visible;
  }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .nav-link {
    flex: 1 1 calc(33.333% - 0.35rem);
    min-width: 110px;
    padding: 0.45rem 0.5rem;
  }
  .nav-link::before { display: none; }
  .nav-hint { display: none; }
  .sidebar-bottom {
    margin-top: 0;
  }
  .sidebar-cta {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
  .nav-cta-ghost {
    padding: 0.55rem 0.5rem;
  }
  .sidebar-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.35rem 0.1rem;
  }
  .foot-muted { margin: 0; }
  .grid-2, .grid-3, .grid-4, .form-grid, .check-grid, .week-grid {
    grid-template-columns: 1fr;
  }
  .week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cal-month { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-head { display: none; }
  .cal-hero-controls { align-items: stretch; width: 100%; }
  .cal-nav-arrows { justify-content: flex-start; }
  .cal-view-toggle { align-self: flex-start; }
  .filter-bar {
    align-items: stretch;
  }
  .filter-bar .filters {
    justify-content: stretch;
  }
  .filter-search,
  .filter-select {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }
  .signature-pad { min-height: 110px; max-width: 280px; }
  .signature-block { max-width: 280px; }
  .option-grid { grid-template-columns: 1fr 1fr; }
  .fototipo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hoy-layout { grid-template-columns: 1fr; }
  .hoy-hero-stats { width: 100%; }
  .hoy-stat { flex: 1 1 0; min-width: 0; }
  .hoy-spotlight {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hoy-spotlight-time {
    padding-right: 0;
    padding-bottom: 0.65rem;
    border-right: 0;
    border-bottom: 1px solid rgba(196, 160, 86, 0.25);
    text-align: left;
  }
  .hoy-spotlight-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .hoy-card-head {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }
  .hoy-badges {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (min-width: 981px) and (max-height: 780px) {
  .hoy-hero {
    padding: 0.95rem 1.1rem 0.85rem;
    margin-bottom: 0.65rem;
  }
  .hoy-hero-note {
    margin-top: 0.65rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
  }
  .hoy-empty {
    padding: 0.85rem 0.75rem;
  }
  .hoy-empty-ico {
    width: 1.65rem;
    height: 1.65rem;
    margin-bottom: 0.4rem;
  }
}

@media (max-width: 640px) {
  .hoy-card-head { grid-template-columns: 1fr; }
  .hoy-card-time {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    width: fit-content;
    text-align: left;
  }
  .hoy-time-end { margin-top: 0; }
  .week-grid { grid-template-columns: 1fr; }
  .cal-month { grid-template-columns: 1fr 1fr; }
}

/* —— Login (compacto, sin scroll) —— */
body.login-page {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 1rem;
  background:
    radial-gradient(680px 380px at 50% 0%, rgba(196, 160, 86, 0.14), transparent 62%),
    var(--bg);
}

.login-center {
  width: min(400px, 100%);
}

.login-card {
  width: 100%;
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-logo {
  width: min(132px, 38vw);
  height: auto;
  display: block;
  margin: 0 auto 0.65rem;
}

.login-tag {
  margin: 0 0 0.85rem;
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-divider {
  display: block;
  width: 3.5rem;
  height: 2px;
  margin: 0 auto 0.85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), transparent);
}

.login-title {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.login-sub {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.login-alert {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: center;
}

.login-alert.is-idle {
  background: #fbf3d0;
  border: 1px solid rgba(196, 160, 86, 0.45);
  color: #8a6a12;
}

.login-alert.is-error {
  background: #f8ecec;
  border: 1px solid rgba(185, 74, 74, 0.35);
  color: #8f2f2f;
}

.login-pin-wrap {
  position: relative;
  margin-bottom: 0.75rem;
}

.login-pin-wrap input {
  width: 100%;
  padding: 0.82rem 2.75rem 0.82rem 0.85rem;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-align: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
}

.login-pin-wrap input:focus {
  outline: none;
  border-color: rgba(176, 137, 58, 0.55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(196, 160, 86, 0.16);
}

.login-pin-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.login-pin-toggle:hover {
  color: var(--gold-deep);
  background: rgba(196, 160, 86, 0.1);
}

.login-pin-toggle svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.login-submit {
  width: 100%;
  padding: 0.72rem 1rem;
  font-size: 0.9rem;
}

.login-foot {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-height: 640px) {
  .login-logo { width: min(108px, 32vw); margin-bottom: 0.45rem; }
  .login-card { padding: 1rem 1rem 0.9rem; }
  .login-sub { margin-bottom: 0.65rem; }
}

/* Vista ficha del cliente */
.cliente-hero {
  padding: 1.25rem 1.35rem 1.1rem;
  background:
    linear-gradient(135deg, rgba(196, 160, 86, 0.12) 0%, transparent 55%),
    #fff;
  border-color: rgba(196, 160, 86, 0.28);
}
.cliente-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.cliente-hero-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.cliente-hero-name {
  margin: 0 0 0.55rem;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  line-height: 1.15;
  color: var(--text);
}
.cliente-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cliente-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}
.cliente-tag--ok {
  background: rgba(46, 125, 78, 0.1);
  border-color: rgba(46, 125, 78, 0.28);
  color: #2e7d4e;
}
.cliente-tag--warn {
  background: rgba(196, 120, 40, 0.1);
  border-color: rgba(196, 120, 40, 0.32);
  color: #9a6218;
}
.cliente-hero-stats {
  display: flex;
  gap: 0.55rem;
  flex-shrink: 0;
}
.cliente-stat {
  min-width: 4.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: center;
}
.cliente-stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}
.cliente-stat-label {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.cliente-hero-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.95rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.cliente-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(196, 160, 86, 0.35);
  background: rgba(196, 160, 86, 0.08);
  color: var(--gold-deep);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}
.cliente-contact-link:hover {
  background: rgba(196, 160, 86, 0.16);
  color: var(--gold-deep);
}
.cliente-contact-link.is-muted {
  border-color: var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  cursor: default;
}
.cliente-contact-ico {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.cliente-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.cliente-card {
  padding: 1rem 1.05rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.cliente-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}
.info-list {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.info-row {
  display: grid;
  grid-template-columns: minmax(0, 38%) 1fr;
  gap: 0.45rem 0.65rem;
  align-items: baseline;
}
.info-row dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.info-row dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
}
.info-inline {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.78rem;
}
.cliente-block-label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.cliente-area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cliente-area-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 74, 0.35);
  background: rgba(201, 162, 74, 0.1);
  color: var(--gold-deep);
  font-size: 0.8rem;
  font-weight: 600;
}
.cliente-firmas-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: auto;
}
.firma-view--mini {
  min-height: 72px;
  padding: 0.4rem;
}
.firma-view--mini img {
  max-height: 64px;
}
.cliente-med-ok {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(46, 125, 78, 0.08);
  border: 1px solid rgba(46, 125, 78, 0.22);
  color: #2e7d4e;
  font-size: 0.86rem;
  font-weight: 600;
}
.cliente-med-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.cliente-med-pill {
  display: inline-flex;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(185, 74, 74, 0.08);
  border: 1px solid rgba(185, 74, 74, 0.28);
  color: #9a3a3a;
  font-size: 0.78rem;
  font-weight: 600;
}
.cliente-note {
  padding-top: 0.55rem;
  border-top: 1px dashed var(--line);
}
.cliente-note p:last-child {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}
.cliente-section {
  margin-top: 0.85rem;
}
.cliente-section-title {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}
.cliente-section-sub {
  margin: 0;
  font-size: 0.84rem;
}
.cliente-table-wrap {
  margin-top: 0.75rem;
}

@media (max-width: 980px) {
  .cliente-grid {
    grid-template-columns: 1fr;
  }
  .cliente-hero-stats {
    width: 100%;
    justify-content: flex-start;
  }
  .cliente-stat {
    flex: 1 1 0;
  }
}
@media (max-width: 520px) {
  .info-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
  .cliente-firmas-mini {
    grid-template-columns: 1fr;
  }
}
