/* ==========================================================
   PATIPERROS · estilos premium futuristas
   Paleta basada en logo: azul #5b8def, violeta #7c5cff, magenta #b06bff
   ========================================================== */
:root {
  --pp-blue: #5b8def;
  --pp-violet: #7c5cff;
  --pp-magenta: #b06bff;
  --pp-dark: #1a1a2e;
  --pp-soft: #f6f7fb;
  --pp-accent: #00d4b4;       /* color extra 1 (turquesa suave) */
  --pp-warning: #ffb547;      /* color extra 2 (ámbar) */
  --pp-grad: linear-gradient(135deg, #5b8def 0%, #7c5cff 50%, #b06bff 100%);
  --pp-grad-soft: linear-gradient(135deg, rgba(91,141,239,0.08) 0%, rgba(124,92,255,0.08) 50%, rgba(176,107,255,0.08) 100%);
  --pp-shadow: 0 10px 40px -10px rgba(124, 92, 255, 0.25);
  --pp-shadow-hover: 0 20px 60px -10px rgba(124, 92, 255, 0.45);
}

* { box-sizing: border-box; }

html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--pp-dark);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -0.02em; }

/* ===== Gradient text ===== */
.text-gradient {
  background: var(--pp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ===== Floating cards ===== */
@keyframes float-y {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}
@keyframes float-y-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
.float-card { animation: float-y 5s ease-in-out infinite; }
.float-card-slow { animation: float-y-slow 7s ease-in-out infinite; }

/* ===== Glow border (futurista) ===== */
.glow-border {
  position: relative;
  background: white;
  border-radius: 20px;
  z-index: 0;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s;
}
.glow-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1.5px;
  background: var(--pp-grad);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}
.glow-border:hover {
  transform: translateY(-4px);
  box-shadow: var(--pp-shadow-hover);
}

/* ===== Glass cards ===== */
.glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(124, 92, 255, 0.15);
  border-radius: 18px;
  box-shadow: var(--pp-shadow);
}

/* ===== Botones ===== */
.btn-primary {
  background: var(--pp-grad);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px -8px rgba(124, 92, 255, 0.55);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(124, 92, 255, 0.7); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: white;
  color: var(--pp-dark);
  padding: 0.65rem 1.25rem;
  border-radius: 14px;
  font-weight: 500;
  border: 1.5px solid rgba(124, 92, 255, 0.25);
  transition: all 0.2s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-ghost:hover { border-color: var(--pp-violet); color: var(--pp-violet); transform: translateY(-1px); }

.btn-danger, .btn-soft {
  background: linear-gradient(135deg, #ffb547 0%, #ff8c00 100%);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
}
.btn-danger:hover, .btn-soft:hover { transform: translateY(-1px); filter: brightness(1.05); }

/* ===== Inputs ===== */
.pp-input, .pp-select, .pp-textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1.5px solid rgba(124, 92, 255, 0.2);
  background: white;
  font-size: 0.95rem;
  transition: border 0.2s, box-shadow 0.2s;
  font-family: inherit;
  color: var(--pp-dark);
}
.pp-input:focus, .pp-select:focus, .pp-textarea:focus {
  outline: none;
  border-color: var(--pp-violet);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}

/* ===== Pestañas ===== */
.tab {
  padding: 0.7rem 1.2rem;
  border-radius: 14px;
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.25s;
  color: #555;
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.tab:hover { color: var(--pp-violet); background: rgba(124, 92, 255, 0.06); }
.tab.active {
  background: var(--pp-grad);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(124, 92, 255, 0.55);
}

/* ===== Animations ===== */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fade-in-up 0.5s ease-out forwards; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.7); }
  50% { box-shadow: 0 0 0 12px rgba(124, 92, 255, 0); }
}
.pulse-glow { animation: pulse-glow 2s infinite; }

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}
.spin-slow { animation: spin-slow 18s linear infinite; }

@keyframes shine {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shine {
  background: linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.18), transparent);
  background-size: 200% 100%;
  animation: shine 2.5s linear infinite;
}

/* ===== Scroll animations ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Toast ===== */
.toast {
  background: white;
  border-left: 4px solid var(--pp-violet);
  box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  padding: 14px 18px;
  min-width: 280px;
  max-width: 360px;
  animation: fade-in-up 0.3s ease-out;
  position: relative;
  overflow: hidden;
}
.toast.success { border-left-color: var(--pp-accent); }
.toast.warn { border-left-color: var(--pp-warning); }
.toast.error { border-left-color: var(--pp-warning); }

/* ===== Calendario ===== */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s;
  background: white;
  user-select: none;
  position: relative;
}
.cal-day.muted { color: #c0c0c8; background: #fafafc; cursor: default; }
.cal-day.today { border-color: var(--pp-violet); color: var(--pp-violet); font-weight: 700; }
.cal-day.selected { background: var(--pp-grad); color: #fff; border-color: transparent; }
.cal-day.selectable:hover:not(.muted):not(.disabled) { border-color: var(--pp-violet); transform: scale(1.06); }
.cal-day.disabled { color: #d0d0d8; background: #f6f6f9; cursor: not-allowed; }
.cal-day.realizado { background: linear-gradient(135deg, #00d4b4 0%, #00b89a 100%); color: white; }
.cal-day.en_curso { background: linear-gradient(135deg, #ffb547 0%, #ff8c00 100%); color: white; animation: pulse-glow 1.5s infinite; }
.cal-day.pendiente { background: rgba(124, 92, 255, 0.12); color: var(--pp-violet); border-color: rgba(124, 92, 255, 0.3); }

.cal-day .dot {
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ===== Mapa ===== */
.map-container {
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(124, 92, 255, 0.18);
  box-shadow: var(--pp-shadow);
  height: 420px;
  width: 100%;
  position: relative;
}

/* ===== Chat ===== */
.chat-bubble {
  max-width: 78%;
  padding: 0.65rem 1rem;
  border-radius: 16px;
  margin-bottom: 6px;
  word-wrap: break-word;
  font-size: 0.93rem;
  line-height: 1.4;
}
.chat-bubble.me {
  background: var(--pp-grad);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.chat-bubble.them {
  background: #f0f1f7;
  color: var(--pp-dark);
  margin-right: auto;
  border-bottom-left-radius: 4px;
}
.chat-bubble.admin {
  background: #fff7e6;
  color: #8a5800;
  border: 1px dashed #ffb547;
  margin-right: auto;
}

/* ===== Backgrounds decorativos ===== */
.bg-grid {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(124, 92, 255, 0.08) 1px, transparent 0);
  background-size: 28px 28px;
}
.bg-aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.bg-aurora::before, .bg-aurora::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}
.bg-aurora::before { background: var(--pp-blue); top: -200px; left: -200px; animation: float-y-slow 8s ease-in-out infinite; }
.bg-aurora::after { background: var(--pp-magenta); bottom: -200px; right: -200px; animation: float-y-slow 10s ease-in-out infinite reverse; }

/* ===== Tarjeta de servicio ===== */
.service-card {
  background: white;
  border-radius: 22px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.4s;
  border: 1.5px solid transparent;
  background-image: linear-gradient(white, white), var(--pp-grad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.service-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--pp-shadow-hover);
}
.service-card .icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--pp-grad-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  color: var(--pp-violet);
  font-size: 1.5rem;
}

/* ===== Tarjeta de contacto (público) ===== */
.contact-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--pp-dark);
  position: relative;
  border: 1.5px solid transparent;
  background-image: linear-gradient(white, white), var(--pp-grad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s;
  cursor: pointer;
  text-align: center;
  min-height: 130px;
}
.contact-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--pp-shadow-hover); }
.contact-card .ico {
  font-size: 2rem;
  background: var(--pp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.contact-card .label { font-weight: 600; letter-spacing: 0.01em; font-size: 0.95rem; }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 14, 50, 0.55);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: fade-in-up 0.25s ease-out;
}
.modal-content {
  background: white;
  border-radius: 22px;
  padding: 1.5rem;
  max-width: 720px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.35);
  animation: fade-in-up 0.35s ease-out;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124, 92, 255, 0.3); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124, 92, 255, 0.5); }

/* ===== Logo navbar ===== */
.logo-nav { height: 44px; width: auto; transition: transform 0.3s; }
.logo-nav:hover { transform: scale(1.05); }

/* ===== Mobile bottom nav ===== */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(124, 92, 255, 0.15);
  display: none;
  justify-content: space-around;
  padding: 0.5rem 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
  z-index: 100;
}
@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  .desktop-tabs { display: none !important; }
  body { padding-bottom: 80px; }
}
.bottom-nav .nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 0.45rem;
  border-radius: 12px;
  font-size: 0.7rem;
  color: #777;
  cursor: pointer;
  transition: all 0.2s;
}
.bottom-nav .nav-item.active { color: var(--pp-violet); }
.bottom-nav .nav-item i { font-size: 1.15rem; }

/* ===== Star rating ===== */
.star-input { font-size: 2rem; cursor: pointer; color: #d0d0d8; transition: color 0.2s, transform 0.2s; }
.star-input:hover, .star-input.filled { color: #ffb547; transform: scale(1.1); }

/* ===== Stats card ===== */
.stat-card {
  border-radius: 18px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  background: white;
  border: 1px solid rgba(124, 92, 255, 0.15);
}
.stat-card .stat-num { font-family: 'Space Grotesk'; font-size: 2.2rem; font-weight: 700; }

/* ===== Marker label (paseador) ===== */
.gm-marker-label {
  background: var(--pp-grad);
  color: white;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.35);
}

/* utility */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }


/* ===== Hero logo (público) ===== */
.hero-logo {
  width: 180px;
  height: auto;
  max-width: 60vw;
  filter: drop-shadow(0 18px 40px rgba(91,141,239,0.35));
}
@media (min-width: 768px) {
  .hero-logo { width: 220px; }
}

/* ===== Floaty (efecto de tarjeta flotante con sombra azul logo) ===== */
.floaty {
  box-shadow: 0 8px 24px -8px rgba(91, 141, 239, 0.30);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s;
}
.floaty:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -10px rgba(91, 141, 239, 0.50);
}

/* Reforzar glow-border con sombra azul logo */
.glow-border {
  box-shadow: 0 6px 24px -10px rgba(91, 141, 239, 0.28);
}
.glow-border:hover {
  box-shadow: 0 18px 50px -10px rgba(91, 141, 239, 0.45);
}

/* ===== Header iconos (panel admin/cliente/paseador) ===== */
.header-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(91, 141, 239, 0.10);
  color: var(--pp-blue);
  border: 1.5px solid rgba(91, 141, 239, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.header-icon-btn:hover {
  background: rgba(91, 141, 239, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -6px rgba(91, 141, 239, 0.45);
}
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--pp-warning);
  color: white;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.btn-logout {
  background: white;
  color: var(--pp-blue);
  padding: 0.55rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  border: 1.5px solid rgba(91,141,239,0.30);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.88rem;
}
.btn-logout:hover {
  background: rgba(91,141,239,0.10);
  border-color: var(--pp-blue);
  transform: translateY(-1px);
}
.btn-logout span { display: none; }
@media (min-width: 768px) { .btn-logout span { display: inline; } }

/* Calendar arrow buttons */
.cp-arrow {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(91, 141, 239, 0.10);
  color: var(--pp-blue);
  border: 1.5px solid rgba(91, 141, 239, 0.25);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex; align-items: center; justify-content: center;
}
.cp-arrow:hover:not(:disabled) {
  background: var(--pp-blue);
  color: white;
  transform: translateY(-1px);
}
.cp-arrow:disabled { opacity: 0.35; cursor: not-allowed; }

/* Floating chat panel (cliente / paseador) — discreto */
.float-chat {
  position: fixed;
  right: 16px;
  bottom: 90px;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 460px;
  background: white;
  border-radius: 18px;
  box-shadow: 0 24px 60px -12px rgba(91, 141, 239, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
  border: 1.5px solid rgba(91, 141, 239, 0.20);
}
.float-chat.minimized { height: 50px; }
.float-chat.minimized .float-chat-msgs,
.float-chat.minimized .float-chat-foot { display: none; }
.float-chat-head {
  background: var(--pp-grad);
  color: white;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
}
.float-chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #fafbff;
}
.float-chat-foot {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid rgba(91, 141, 239, 0.15);
  background: white;
}

/* Marker label custom */
.gm-marker-label-text {
  background: white !important;
  border-radius: 10px;
  padding: 3px 8px !important;
  border: 1.5px solid var(--pp-blue);
  box-shadow: 0 4px 12px rgba(91, 141, 239, 0.30);
}
