/* ============================================================
   AiVeridia - Hoja de estilos principal
   Paleta: Azul #1565C0 | Verde #00C853 | Cyan #00BCD4
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --primary:        #1565C0;
  --primary-dark:   #0D47A1;
  --primary-light:  #1976D2;
  --secondary:      #00C853;
  --accent:         #00BCD4;
  --dark:           #0A1628;
  --dark-lighter:   #162240;
  --text-primary:   #1A202C;
  --text-secondary: #4A5568;
  --text-light:     #718096;
  --bg-light:       #F7FAFC;
  --bg-white:       #FFFFFF;
  --border:         #E2E8F0;
  --success:        #00C853;
  --warning:        #FFC107;
  --error:          #F44336;
  --gradient: linear-gradient(135deg, #00C853 0%, #00BCD4 50%, #1565C0 100%);
  --gradient-dark: linear-gradient(135deg, #0D47A1 0%, #00838F 100%);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl:  0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, textarea, select { font-family: inherit; outline: none; }

/* ---------- Typography ---------- */
h1,h2,h3,h4,h5 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p  { line-height: 1.75; color: var(--text-secondary); }

/* ---------- Utilities ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.section    { padding: 5rem 0; }
.section--gray { background: var(--bg-light); }
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem 1rem;
  border-radius: 999px;
  background: rgba(21,101,192,.1);
  color: var(--primary);
  margin-bottom: 1rem;
}
.badge--light { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .95rem;
  transition: var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 15px rgba(21,101,192,.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(21,101,192,.45); }
.btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
}
.btn--secondary:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--outline:hover { background: var(--primary); color: #fff; }
.btn--ghost {
  background: rgba(255,255,255,.1);
  color: #fff;
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255,255,255,.2); }
.btn--sm { padding: .5rem 1.25rem; font-size: .85rem; }
.btn--lg { padding: 1rem 2.25rem; font-size: 1.05rem; }
.btn--full { width: 100%; justify-content: center; }

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(10,22,40,.95);
  backdrop-filter: blur(12px);
  padding: .6rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.navbar__logo img,
.navbar__logo svg {
  height: 44px;
  width: 44px;
  flex-shrink: 0;
}
.navbar__logo span {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
}
.navbar__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.navbar__nav a {
  color: rgba(255,255,255,.85);
  font-weight: 500;
  font-size: .95rem;
  transition: var(--transition);
  position: relative;
}
.navbar__nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--secondary);
  transition: var(--transition);
}
.navbar__nav a:hover { color: #fff; }
.navbar__nav a:hover::after { width: 100%; }
.navbar__nav a.active { color: #fff; }
.navbar__nav a.active::after { width: 100%; }
.navbar__cta { display: flex; align-items: center; gap: .75rem; }
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  background: none;
  color: #fff;
}
.navbar__hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .navbar__hamburger { display: flex; }
  .navbar__nav-wrap {
    position: fixed;
    top: 0; right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: var(--dark);
    padding: 5rem 2rem 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    transition: right .35s ease;
    z-index: 999;
    box-shadow: -5px 0 30px rgba(0,0,0,.4);
  }
  .navbar__nav-wrap.open { right: 0; }
  .navbar__nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }
  .navbar__nav a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    width: 100%;
  }
  .navbar__cta { flex-direction: column; width: 100%; margin-top: 1.5rem; }
  .navbar__cta .btn { width: 100%; justify-content: center; }
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 998;
  }
  .nav-overlay.open { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  background: var(--dark);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-dark);
  opacity: .7;
}
.hero__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  opacity: .12;
  animation: float linear infinite;
}
@keyframes float {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: .12; }
  90%  { opacity: .12; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,188,212,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,188,212,.06) 1px, transparent 1px);
  background-size: 50px 50px;
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 8rem 0 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero__text { color: #fff; }
.hero__title { color: #fff; margin-bottom: 1.25rem; }
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.75);
  margin-bottom: 2.5rem;
  max-width: 520px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.hero__stat-num {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.hero__stat-label { font-size: .8rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .08em; }
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero__logo-large {
  width: min(380px, 90%);
  filter: drop-shadow(0 0 60px rgba(0,188,212,.4));
  animation: pulse-logo 4s ease-in-out infinite;
}
@keyframes pulse-logo {
  0%,100% { filter: drop-shadow(0 0 60px rgba(0,188,212,.4)); transform: translateY(0); }
  50%      { filter: drop-shadow(0 0 80px rgba(0,200,83,.5)); transform: translateY(-10px); }
}
.hero__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: ring-spin linear infinite;
}
.hero__ring--1 {
  width: 320px; height: 320px;
  border-color: rgba(0,188,212,.2);
  animation-duration: 20s;
}
.hero__ring--2 {
  width: 450px; height: 450px;
  border-color: rgba(0,200,83,.15);
  animation-duration: 30s;
  animation-direction: reverse;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero__content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .hero__subtitle { max-width: 100%; }
  .hero__actions { justify-content: center; }
  .hero__stats { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__logo-large { width: min(250px, 70%); }
  .hero__ring--1 { width: 220px; height: 220px; }
  .hero__ring--2 { width: 310px; height: 310px; }
}

/* ---------- Feature Strip ---------- */
.features {
  background: var(--dark);
  padding: 0;
}
.features__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.feature-item {
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: #fff;
  transition: var(--transition);
}
.feature-item:last-child { border-right: none; }
.feature-item:hover { background: rgba(255,255,255,.04); }
.feature-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.feature-text h4 { font-size: .95rem; color: #fff; margin-bottom: .25rem; }
.feature-text p  { font-size: .8rem; color: rgba(255,255,255,.5); line-height: 1.4; }
@media (max-width: 768px) {
  .features__inner { grid-template-columns: 1fr 1fr; }
  .feature-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
}
@media (max-width: 480px) {
  .features__inner { grid-template-columns: 1fr; }
}

/* ---------- Section Headers ---------- */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h2 { margin-bottom: 1rem; }
.section-header p  { max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* ---------- Services Cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.service-card:hover::before { transform: scaleX(1); }
.service-card__icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(21,101,192,.25);
}
.service-card h3 { margin-bottom: .75rem; font-size: 1.2rem; }
.service-card p  { font-size: .9rem; line-height: 1.65; }
.service-card__features {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.service-card__features li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-secondary);
}
.service-card__features li::before {
  content: '✓';
  color: var(--secondary);
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Testimonials ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
}
.testimonial-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.testimonial-card__quote {
  font-size: 3rem;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .5rem;
}
.testimonial-card__text {
  font-size: .95rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-style: italic;
}
.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.testimonial-card__avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.testimonial-card__author-info strong { display: block; font-size: .95rem; }
.testimonial-card__author-info span { font-size: .8rem; color: var(--text-light); }
.testimonial-card__stars {
  display: flex;
  gap: 2px;
  margin-top: .75rem;
}
.testimonial-card__stars span { color: #FFC107; font-size: 1rem; }

/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--dark);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: .08;
}
.cta-section h2 { color: #fff; position: relative; }
.cta-section p  { color: rgba(255,255,255,.7); position: relative; max-width: 560px; margin: 1rem auto 2rem; font-size: 1.05rem; }
.cta-section .btn-wrap { position: relative; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ---------- About strip ---------- */
.about-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.about-strip__visual {
  position: relative;
}
.about-strip__img-container {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--gradient);
  padding: 3px;
}
.about-strip__img-inner {
  border-radius: calc(var(--radius-xl) - 3px);
  overflow: hidden;
  background: var(--dark-lighter);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-strip__img-inner img { width: 60%; opacity: .8; filter: brightness(0) invert(1); }
.about-strip__badge-float {
  position: absolute;
  bottom: 1.5rem;
  right: -1rem;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
  font-weight: 600;
}
.about-strip__badge-float .icon { font-size: 1.5rem; }
.about-strip__text h2 { margin-bottom: 1rem; }
.about-strip__text p  { margin-bottom: 1rem; }
.about-strip__list { display: flex; flex-direction: column; gap: .75rem; margin: 1.5rem 0; }
.about-strip__list li { display: flex; align-items: flex-start; gap: .75rem; }
.about-strip__list li .icon { font-size: 1.1rem; flex-shrink: 0; margin-top: .1rem; }
@media (max-width: 768px) {
  .about-strip { grid-template-columns: 1fr; }
  .about-strip__badge-float { right: .5rem; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,.6);
  padding: 4rem 0 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 2rem;
}
.footer__brand img {
  height: 36px;
  filter: brightness(0) invert(1);
  margin-bottom: .75rem;
}
.footer__brand-name {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
}
.footer__brand p {
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  margin-top: .75rem;
  max-width: 260px;
  line-height: 1.6;
}
.footer__col h4 { color: #fff; font-size: .9rem; margin-bottom: 1.25rem; }
.footer__col ul { display: flex; flex-direction: column; gap: .6rem; }
.footer__col ul a {
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  transition: var(--transition);
}
.footer__col ul a:hover { color: var(--accent); }
.footer__contact li { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: rgba(255,255,255,.5); margin-bottom: .6rem; }
.footer__contact .icon { color: var(--accent); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .8rem;
}
.footer__bottom a { color: rgba(255,255,255,.5); transition: var(--transition); }
.footer__bottom a:hover { color: var(--accent); }
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ---------- Page Hero (interior pages) ---------- */
.page-hero {
  background: var(--dark);
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-dark);
  opacity: .6;
}
.page-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,188,212,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,188,212,.05) 1px, transparent 1px);
  background-size: 50px 50px;
}
.page-hero__content { position: relative; z-index: 2; color: #fff; }
.page-hero__content h1 { color: #fff; margin-bottom: 1rem; }
.page-hero__content p { color: rgba(255,255,255,.75); font-size: 1.1rem; max-width: 580px; margin: 0 auto; }

/* ---------- Chatbot Widget ---------- */
.chatbot-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 6px 25px rgba(21,101,192,.45);
  z-index: 900;
  transition: var(--transition);
  border: none;
}
.chatbot-toggle:hover { transform: scale(1.1); box-shadow: 0 10px 35px rgba(21,101,192,.55); }
.chatbot-toggle .icon-open  { display: flex; }
.chatbot-toggle .icon-close { display: none; }
.chatbot-toggle.open .icon-open  { display: none; }
.chatbot-toggle.open .icon-close { display: flex; }
.chatbot-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

.chatbot-window {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: min(380px, calc(100vw - 2rem));
  height: min(560px, calc(100vh - 8rem));
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  z-index: 899;
  overflow: hidden;
  transform: translateY(20px) scale(.95);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.chatbot-window.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.chatbot-header {
  background: var(--gradient);
  color: #fff;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.chatbot-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.chatbot-header-info strong { display: block; font-size: .95rem; }
.chatbot-header-info span {
  font-size: .75rem;
  opacity: .85;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.chatbot-header-info span::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--secondary);
  display: inline-block;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  scroll-behavior: smooth;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }
.chatbot-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.chat-msg {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
  animation: msg-in .25s ease;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg--bot { flex-direction: row; }
.chat-msg--user { flex-direction: row-reverse; }
.chat-msg__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: #fff;
}
.chat-msg__bubble {
  max-width: 78%;
  padding: .65rem .9rem;
  border-radius: 18px;
  font-size: .88rem;
  line-height: 1.55;
}
.chat-msg--bot .chat-msg__bubble {
  background: var(--bg-light);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-msg--user .chat-msg__bubble {
  background: var(--gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg__time {
  font-size: .65rem;
  color: var(--text-light);
  margin-top: .2rem;
  text-align: center;
}

.chat-typing {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
  padding: 0 .25rem;
}
.chat-typing__dots {
  background: var(--bg-light);
  padding: .7rem 1rem;
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.chat-typing__dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-light);
  animation: typing-bounce .8s ease-in-out infinite;
}
.chat-typing__dots span:nth-child(2) { animation-delay: .15s; }
.chat-typing__dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-bounce {
  0%,60%,100% { transform: translateY(0); }
  30%          { transform: translateY(-5px); }
}

.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 0 1.25rem .5rem;
}
.chat-quick-reply {
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 500;
  background: none;
  transition: var(--transition);
}
.chat-quick-reply:hover { background: var(--primary); color: #fff; }

.chatbot-input {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.chatbot-input input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: .55rem 1rem;
  font-size: .88rem;
  color: var(--text-primary);
  transition: var(--transition);
}
.chatbot-input input:focus { border-color: var(--primary); }
.chatbot-input input::placeholder { color: var(--text-light); }
.chatbot-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.chatbot-send:hover { transform: scale(1.1); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .65rem .9rem;
  font-size: .9rem;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,101,192,.1); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-error { font-size: .78rem; color: var(--error); margin-top: .3rem; display: none; }
.form-error.show { display: block; }

/* ---------- Admin Styles ---------- */
.admin-body {
  background: var(--bg-light);
  min-height: 100vh;
}
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  position: relative;
  overflow: hidden;
}
.admin-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-dark);
  opacity: .7;
}
.admin-login__card {
  position: relative;
  z-index: 2;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: min(420px, calc(100vw - 2rem));
  box-shadow: var(--shadow-xl);
}
.admin-login__logo {
  text-align: center;
  margin-bottom: 2rem;
}
.admin-login__logo img { height: 60px; margin: 0 auto .75rem; }
.admin-login__logo h1 { font-size: 1.5rem; }
.admin-login__logo p { font-size: .85rem; }
.admin-login .alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  margin-bottom: 1rem;
}
.admin-login .alert--error { background: #FEF2F2; color: var(--error); border: 1px solid #FECACA; }

.admin-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: var(--dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 800;
  overflow-y: auto;
}
.admin-sidebar__logo {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.admin-sidebar__logo img { height: 32px; filter: brightness(0) invert(1); }
.admin-sidebar__logo span { font-weight: 800; font-size: 1.1rem; }
.admin-nav { padding: 1.5rem 0; flex: 1; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1.5rem;
  color: rgba(255,255,255,.6);
  font-size: .9rem;
  font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active {
  color: #fff;
  background: rgba(255,255,255,.06);
  border-left-color: var(--accent);
}
.admin-nav a .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.admin-sidebar__footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.admin-sidebar__footer a {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  transition: var(--transition);
}
.admin-sidebar__footer a:hover { color: var(--error); }

.admin-main {
  margin-left: 260px;
  padding: 2rem;
  min-height: 100vh;
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.admin-topbar h1 { font-size: 1.5rem; }
.admin-topbar__user {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
}
.admin-topbar__user strong { color: var(--text-primary); }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.admin-stat {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.admin-stat__icon {
  width: 50px; height: 50px;
  border-radius: var(--radius-sm);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.admin-stat__num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.admin-stat__label { font-size: .78rem; color: var(--text-light); margin-top: .2rem; }

.admin-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.admin-card__header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.admin-card__header h3 { font-size: 1rem; }
.admin-card__body { padding: 1.5rem; }

/* Calendar */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.cal-nav button {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  color: var(--text-primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.cal-nav button:hover { background: var(--primary); color: #fff; }
.cal-month { font-weight: 700; font-size: 1rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-day-name {
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  padding: .4rem 0;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  border: 1.5px solid transparent;
  gap: 2px;
}
.cal-day:hover { background: var(--bg-light); }
.cal-day.empty { cursor: default; }
.cal-day.today { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.cal-day.has-appts { font-weight: 700; }
.cal-day.selected { background: var(--primary); color: #fff; }
.cal-day.selected.has-appts { background: var(--primary); }
.cal-day.not-available { color: var(--border); cursor: default; }
.cal-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.cal-dot--pending  { background: var(--warning); }
.cal-dot--confirmed { background: var(--secondary); }
.cal-dot--cancelled { background: var(--error); }

/* Table */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .6rem .75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg-light);
}
.admin-table td {
  padding: .85rem .75rem;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-light); }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.status-badge--pending  { background: #FFF8E1; color: #F57F17; }
.status-badge--confirmed { background: #E8F5E9; color: #2E7D32; }
.status-badge--cancelled { background: #FFEBEE; color: #C62828; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  width: min(500px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(.95);
  transition: var(--transition);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal__header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal__header h3 { font-size: 1.1rem; }
.modal__close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.modal__close:hover { background: var(--error); color: #fff; }
.modal__body { padding: 1.5rem; }
.modal__footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
}

/* Responsive admin */
@media (max-width: 900px) {
  .admin-sidebar { transform: translateX(-100%); transition: var(--transition); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    background: var(--dark);
    color: #fff;
    font-size: 1.2rem;
  }
}
@media (min-width: 901px) {
  .admin-mobile-toggle { display: none; }
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.toast {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: .85rem 1.25rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .88rem;
  font-weight: 500;
  border-left: 4px solid var(--primary);
  animation: toast-in .3s ease;
  max-width: 320px;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast--success { border-left-color: var(--secondary); }
.toast--error   { border-left-color: var(--error); }
.toast--warning { border-left-color: var(--warning); }

/* ---------- Scroll Top ---------- */
.scroll-top {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover { background: var(--primary); }

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: .1s; }
.fade-in-delay-2 { transition-delay: .2s; }
.fade-in-delay-3 { transition-delay: .3s; }
.fade-in-delay-4 { transition-delay: .4s; }

/* ---------- Booking section on home ---------- */
.booking-section { padding: 5rem 0; background: var(--bg-light); }
.booking-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.booking-info h2 { margin-bottom: 1rem; }
.booking-info p  { margin-bottom: 1.5rem; }
.booking-hours { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.booking-hour-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .88rem;
}
.booking-hour-item .day { font-weight: 600; min-width: 120px; }
.booking-hour-item .hours { color: var(--text-secondary); }
.booking-form-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.booking-form-card h3 { margin-bottom: 1.5rem; font-size: 1.1rem; }
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .5rem;
  margin-top: .5rem;
}
.slot-btn {
  padding: .45rem .6rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-primary);
  background: none;
  transition: var(--transition);
  cursor: pointer;
}
.slot-btn:hover { border-color: var(--primary); color: var(--primary); }
.slot-btn.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.slot-btn.taken { background: var(--bg-light); color: var(--border); cursor: not-allowed; border-color: transparent; }
@media (max-width: 768px) {
  .booking-inner { grid-template-columns: 1fr; }
}

/* Loading spinner */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Success overlay ---------- */
.success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,.92);
  z-index: 4000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: #fff;
  padding: 2rem;
}
.success-overlay.show { display: flex; }
.success-overlay .checkmark { font-size: 5rem; margin-bottom: 1rem; }
.success-overlay h2 { color: #fff; margin-bottom: .75rem; }
.success-overlay p  { color: rgba(255,255,255,.75); max-width: 420px; margin: 0 auto 2rem; }
