﻿:root {
  --bg: #ffffff;
  --bg-secondary: #f4f5f9;
  --bg-tertiary: #e8eaf1;
  --text: #213163;
  --text-secondary: #4a5578;
  --text-muted: #8b95b3;
  --accent: #ebbc1c;
  --accent-hover: #d4a617;
  --border: #d6dae8;
  --border-light: #e8eaf1;
  --shadow-sm: 0 1px 2px 0 rgb(33 49 99 / 0.05);
  --shadow: 0 1px 3px 0 rgb(33 49 99 / 0.1), 0 1px 2px -1px rgb(33 49 99 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(33 49 99 / 0.1), 0 2px 4px -2px rgb(33 49 99 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(33 49 99 / 0.1), 0 4px 6px -4px rgb(33 49 99 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(33 49 99 / 0.1), 0 8px 10px -6px rgb(33 49 99 / 0.1);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.2s ease;
  --header-height: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-height, 60px);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; min-height: 0; }

.header .logo { flex-shrink: 0; }
.header .logo-img { height: 38px; width: auto; display: block; flex-shrink: 0; }

.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 40px; height: 40px; background: var(--accent); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--text);
  transition: var(--transition);
}
.logo:hover .logo-icon { transform: rotate(-6deg) scale(1.05); }
.logo-text { font-family: 'Sora', sans-serif; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }

.nav { display: flex; align-items: center; gap: 20px; }
.nav-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: 2px solid transparent;
  overflow: hidden; flex-shrink: 0; transition: var(--transition); cursor: pointer;
}
.nav-avatar:hover {
  border-color: transparent; box-shadow: none;
  opacity: 0.85;
}
.nav-avatar img {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  object-fit: cover; display: block;
  border-radius: 50%;
}
.nav-avatar-initials {
  font-family: 'Sora', sans-serif; font-size: 0.9rem; font-weight: 700; color: var(--text);
  line-height: 1;
}
.nav-link { font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); transition: var(--transition); position: relative; white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -6px; left: 0; right: 0; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.nav-link-cta { background: var(--text); color: var(--bg); padding: 10px 20px; border-radius: 8px; }
.nav-link-cta:hover { background: var(--text-secondary); }

.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--text); transition: var(--transition); }
.mobile-menu-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.view { display: block; }
.view.hidden,
.hidden { display: none !important; }

/* Hero */
.hero { padding: 160px 0 100px; background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg) 100%); }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 100px;
  font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 24px;
}
.hero-badge-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.hero-title { font-size: 3.75rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 24px; line-height: 1.05; }
.hero-subtitle { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 40px; max-width: 500px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 64px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 48px; }
.stat { display: flex; flex-direction: column; }
.stat-number { font-family: 'Sora', sans-serif; font-size: 2rem; font-weight: 700; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

.hero-visual { display: flex; flex-direction: column; gap: 20px; }
.hero-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow); transition: var(--transition);
}
.hero-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.hero-card-featured { border-color: var(--accent); }
.hero-card-accent { background: var(--text); color: var(--bg); border-color: var(--text); }
.hero-card-icon { margin-bottom: 16px; }
.hero-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.hero-card p { color: var(--text-secondary); font-size: 0.95rem; }
.hero-card-accent p { color: var(--text-muted); }

/* Sections */
.section { padding: 120px 0; }
.section-muted { background: var(--bg-secondary); }
.page-section { padding: 160px 0 120px; }
.cta-center { text-align: center; margin-top: 64px; }
.section-label {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 16px;
}
.section-title { font-size: 2.75rem; letter-spacing: -0.02em; margin-bottom: 24px; }
.section-subtitle { font-size: 1.125rem; color: var(--text-secondary); max-width: 600px; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header .section-subtitle { margin: 0 auto; }
.narrow { max-width: 520px; margin: 0 auto; }

/* Sobre mÃ­ */
.sobre-mi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.sobre-mi-image-card {
  width: 100%; aspect-ratio: 1; max-width: 480px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transition: var(--transition);
}
.sobre-mi-image-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.sobre-mi-avatar {
  width: 160px; height: 160px; background: var(--bg);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); margin-bottom: 24px;
  overflow: hidden;
}

.avatar-logo {
  width: auto;
  height: 120px;
  max-width: 90%;
  object-fit: contain;
}

.sobre-mi-card-content { text-align: center; }
.sobre-mi-card-content strong { display: block; font-family: 'Sora', sans-serif; font-size: 1.5rem; margin-bottom: 4px; }
.sobre-mi-card-content span { color: var(--text-secondary); font-size: 0.95rem; }
.sobre-mi-text { font-size: 1.05rem; color: var(--text-secondary); margin-bottom: 20px; }
.sobre-mi-features { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.feature { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.feature-icon {
  width: 32px; height: 32px; background: var(--bg-secondary); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.feature-icon svg { color: var(--accent); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 32px; }
.step { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; transition: var(--transition); text-align: center; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-number { font-family: 'JetBrains Mono', monospace; font-size: 1.5rem; color: var(--accent); display: block; margin-bottom: 12px; }
.step p { color: var(--text-secondary); margin: 0; }

/* Servicios */
.servicios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.servicio-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 40px 32px; transition: var(--transition); display: flex; flex-direction: column;
}
.servicio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.servicio-card-featured { border-color: var(--accent); background: linear-gradient(180deg, var(--bg) 0%, rgba(250, 204, 21, 0.06) 100%); }
.servicio-icon {
  width: 56px; height: 56px; background: var(--bg-secondary); border-radius: 14px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 24px;
}
.servicio-title { font-size: 1.25rem; margin-bottom: 12px; }
.servicio-description { color: var(--text-secondary); margin-bottom: 20px; }
.servicio-list { list-style: none; margin-bottom: 24px; }
.servicio-list li {
  position: relative; padding-left: 24px; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 10px;
}
.servicio-list li::before {
  content: ''; position: absolute; left: 0; top: 8px; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%;
}
.servicio-result { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border-light); }
.servicio-result-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.servicio-result-text { display: block; font-size: 0.95rem; font-weight: 600; margin-top: 4px; }

/* Contenido */
.contenido-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contenido-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; transition: var(--transition);
}
.contenido-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.contenido-tag {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em;
  background: rgba(250, 204, 21, 0.15); color: var(--text); padding: 6px 10px; border-radius: 6px; margin-bottom: 16px;
}
.contenido-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.contenido-card p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 20px; }
.contenido-link { font-weight: 600; font-size: 0.9rem; color: var(--text); transition: var(--transition); }
.contenido-link:hover { color: var(--accent-hover); }

/* Testimonios */
.testimonios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonio-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; transition: var(--transition);
}
.testimonio-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.testimonio-stars { display: flex; gap: 4px; margin-bottom: 20px; }
.testimonio-text { font-size: 1rem; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.7; }
.testimonio-author { display: flex; align-items: center; gap: 12px; }
.testimonio-avatar {
  width: 48px; height: 48px; background: var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.85rem; color: var(--text);
}
.testimonio-author strong { display: block; font-size: 0.95rem; }
.testimonio-author span { font-size: 0.85rem; color: var(--text-muted); }

/* CTA */
.cta-section { padding: 80px 0 120px; }
.cta-box {
  background: var(--text); color: var(--bg); border-radius: var(--radius-xl);
  padding: 80px 40px; text-align: center; position: relative; overflow: hidden;
}
.cta-box::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.2) 0%, transparent 70%);
  pointer-events: none;
}
.cta-title { font-size: 2.5rem; margin-bottom: 16px; position: relative; }
.cta-subtitle { color: var(--text-muted); max-width: 500px; margin: 0 auto 32px; position: relative; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; }
.cta-actions .btn-outline { border-color: rgba(255,255,255,0.3); color: var(--bg); }
.cta-actions .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }

/* Valores */
.valores-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.valor-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; transition: var(--transition);
}
.valor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.valor-icon {
  width: 48px; height: 48px; background: rgba(250, 204, 21, 0.15); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px; color: var(--text);
}
.valor-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.valor-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.faq-item { border-bottom: 1px solid var(--border); padding-bottom: 24px; }
.faq-item h3 { font-size: 1.35rem; margin-bottom: 12px; }
.faq-item p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.7; }

/* Forms */
.formcard {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px;
}
.formcard h2, .formcard h3 { margin-bottom: 24px; }

label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin: 16px 0 8px; }

input, select, textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: 'Manrope', sans-serif; font-size: 1rem; color: var(--text); background: var(--bg); transition: var(--transition);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.2); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px; font-family: 'Manrope', sans-serif;
  font-size: 0.95rem; font-weight: 600; cursor: pointer; border: none; transition: var(--transition);
}
.btn-primary { background: var(--accent); color: var(--text); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-secondary); border-color: var(--text-muted); }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-block { width: 100%; margin-top: 24px; }
.btn-gold { background: var(--accent); color: var(--text); }
.btn-gold:hover { background: var(--accent-hover); }

.btn-spinner { display: inline-flex; align-items: center; justify-content: center; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.form-helper { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-secondary); }
.form-helper a { font-weight: 600; text-decoration: underline; }
.form-success {
  display: flex; align-items: center; gap: 12px; padding: 16px; background: #e4e8f5;
  border: 1px solid #d6dae8; border-radius: 10px; margin-top: 20px; font-size: 0.9rem; color: #213163;
}
.form-error {
  display: flex; align-items: center; gap: 12px; padding: 16px; background: #fdf5d9;
  border: 1px solid #ebbc1c; border-radius: 10px; margin-top: 20px; font-size: 0.9rem; color: #7a5f0d;
}

/* Auth */
.auth-card { padding: 48px; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header h2 { margin-bottom: 8px; }
.auth-header p { color: var(--text-secondary); font-size: 0.95rem; }

/* Dashboard */
.dashboard-page { padding-top: var(--header-height, 60px); min-height: 100vh; background: var(--bg-secondary); }
.dashboard-welcome { margin-bottom: 48px; }
.dashboard-welcome .section-title { margin-bottom: 12px; }
.dashboard-welcome .section-subtitle { margin: 0; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }

/* Panel cliente: el contenido siempre ocupa todo el ancho.
   La barra izquierda es drawer superpuesto (como admin): al abrirse flota
   sobre todo incluido el navbar y el contenido no se recorre. */
.client-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  min-height: calc(100vh - var(--header-height, 60px));
  background: var(--bg-secondary);
}

.client-dashboard.sidebar-left-collapsed {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.client-dashboard.sidebar-right-collapsed {
  grid-template-columns: minmax(0, 1fr) 0;
}

.client-dashboard.sidebar-left-collapsed.sidebar-right-collapsed {
  grid-template-columns: minmax(0, 1fr) 0;
}

.client-sidebar,
.client-chat-sidebar {
  background: var(--bg);
  padding: 24px;
  overflow-y: auto;
  transition: width 0.25s ease, padding 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
  position: sticky;
  top: var(--header-height, 60px);
  height: calc(100vh - var(--header-height, 60px));
  overscroll-behavior: contain;
}

.client-sidebar {
  border-right: 1px solid var(--border-light);
  padding: 20px 16px 32px;
  /* Drawer superpuesto estilo admin: fuera del flujo, sobre todo incluido navbar */
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  width: 300px;
  max-width: 86vw;
  z-index: 1001;
  background: var(--bg, #fff);
  overflow-y: auto;
  box-shadow: 8px 0 32px rgba(33, 49, 99, .18);
  transform: translateX(0);
}

/* Tarjetas dentro del drawer: título, status y abajo meta + fecha */
#client-sidebar .quote-card,
#sales-sidebar .quote-card {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 12px 14px;
}
#client-sidebar .quote-card .quote-title,
#sales-sidebar .quote-card .quote-title {
  font-size: 0.92rem;
}
#client-sidebar .quote-status,
#sales-sidebar .quote-status {
  display: flex;
}
#client-sidebar .quote-status .badge,
#sales-sidebar .quote-status .badge {
  font-size: 0.7rem;
}
#client-sidebar .quote-bottom,
#sales-sidebar .quote-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#client-sidebar .quote-bottom .quote-meta,
#sales-sidebar .quote-bottom .quote-meta {
  margin: 0;
  flex: 1;
  min-width: 0;
}
#client-sidebar .quote-bottom .quote-date,
#sales-sidebar .quote-bottom .quote-date {
  flex: none;
}
#client-sidebar .quote-empty,
#sales-sidebar .quote-empty {
  padding: 40px 20px;
}
#client-sidebar .quote-empty .btn,
#sales-sidebar .quote-empty .btn {
  width: 100%;
}

.client-chat-sidebar {
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 16px;
  overflow: hidden;
}

.client-sidebar.collapsed {
  transform: translateX(-105%);
  pointer-events: none;
}

.client-chat-sidebar.collapsed {
  width: 0;
  padding: 24px 0;
  opacity: 0;
  overflow: hidden;
}

.client-sidebar-header,
.client-chat-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Cabecera del drawer: fila simple como el admin, sin márgenes negativos
   que encimaban el contenido */
.client-sidebar-header {
  position: static;
  background: transparent;
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border-light);
}

.client-sidebar-header h2,
.client-chat-sidebar-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  flex: 1;
  margin: 0;
}

.client-sidebar-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 6px;
}

.client-sidebar-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Barra izquierda: el mismo botón hamburguesa se ve como X (cerrar) a la derecha cuando está abierta */
.client-sidebar-header .client-sidebar-toggle {
  order: 2;
  margin-left: auto;
  flex-shrink: 0;
}

.client-sidebar:not(.collapsed) .client-sidebar-header .client-sidebar-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.client-sidebar:not(.collapsed) .client-sidebar-header .client-sidebar-toggle span:nth-child(2) {
  opacity: 0;
}

.client-sidebar:not(.collapsed) .client-sidebar-header .client-sidebar-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.client-floating-toggle {
  position: fixed;
  top: calc(var(--header-height, 60px) + 16px);
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text);
}

.client-floating-toggle.visible {
  display: inline-flex;
}

.client-floating-toggle-left {
  left: 16px;
}

/* Botón del sidebar derecho (chat / chatbot) anclado abajo a la derecha tipo FAB */
.client-floating-toggle-right {
  top: auto;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text);
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.client-floating-toggle-right:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
}

.client-floating-toggle-right svg {
  display: block;
  flex-shrink: 0;
}

/* Botón flotante + Nueva cotización: mismo estilo circular, arriba del chatbot (solo desktop) */
.client-floating-toggle-new {
  top: auto;
  bottom: 92px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.client-floating-toggle-new span {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-2px);
}

.client-floating-toggle-new:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.client-main {
  padding: 20px 40px 40px;
  min-width: 0;
  min-height: calc(100vh - var(--header-height, 60px));
}

.client-welcome {
  margin-bottom: 32px;
}

.client-welcome .section-title {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.client-welcome .section-subtitle {
  margin: 0;
  max-width: 560px;
}

.client-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.client-detail-title {
  flex: 1;
  min-width: 280px;
}

.client-detail-title .section-title {
  font-size: 2.25rem;
  margin-bottom: 8px;
}

.client-detail-title .section-subtitle {
  margin: 0;
}

.client-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Seguimiento a la derecha del título del detalle */
.client-detail-tracking {
  flex: 0 1 400px;
  min-width: 300px;
  max-width: 440px;
}
.client-detail-tracking .tracking {
  margin-bottom: 0;
  padding: 14px 14px 8px;
}
.client-detail-tracking:empty {
  display: none;
}
@media (max-width: 1200px) {
  .client-detail-tracking {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }
}

.client-form-card {
  max-width: 800px;
  margin: 0 auto;
}

.client-detail-grid .formcard {
  max-width: 900px;
  margin: 0 auto;
}

.client-dashboard.sidebar-left-collapsed.sidebar-right-collapsed .client-main > .client-main-view {
  max-width: 900px;
  margin: 0 auto;
}

.client-form-card h3 {
  font-size: 1.15rem;
  margin-bottom: 24px;
}

.client-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.client-form-grid .form-col-span-2 {
  grid-column: span 2;
}

.client-form-grid .form-col-full {
  grid-column: span 4;
}

.client-form-grid label {
  margin-top: 0;
}

.client-form-card .btn-block {
  margin-top: 24px;
}

.btn-back-mobile {
  display: none;
}

.quotes-list { display: grid; gap: 8px; width: 100%; min-width: 0; }
.quote-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; cursor: pointer; transition: box-shadow 0.2s, border-color 0.2s;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; max-width: 100%; min-width: 0;
}
.quote-card:hover { box-shadow: 0 4px 16px rgb(33 49 99 / 0.08); border-color: var(--accent); }
.quote-card.active {
  border-color: var(--accent);
  border-width: 1.5px;
  background: linear-gradient(180deg, rgba(235, 188, 28, 0.10) 0%, rgba(235, 188, 28, 0.04) 100%);
  box-shadow: 0 0 0 2px rgba(235, 188, 28, 0.35), 0 4px 14px rgb(33 49 99 / 0.10);
}
.quote-card.active .quote-title { color: var(--text); }
.quote-card .quote-left { flex: 1; min-width: 0; }
.quote-card .quote-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-card .quote-meta { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote-card .quote-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; max-width: 45%; }
.quote-card .quote-date { font-size: 0.68rem; color: var(--text-muted); }
.quote-card .badge { font-size: 0.68rem; padding: 3px 8px; max-width: 100%; white-space: normal; line-height: 1.3; }
.quote-empty { text-align: center; padding: 32px 16px; background: var(--bg-secondary); border-radius: var(--radius); border: 1px dashed var(--border); }
.quote-empty .quote-meta { margin-bottom: 16px; }
.quote-meta { font-size: 0.85rem; color: var(--text-muted); }

.client-detail-grid {
  display: block;
}

.client-detail-grid .formcard {
  max-width: none;
}

.badge { display: inline-block; padding: 4px 10px; border-radius: 100px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.badge-pendiente { background: #eef0f5; color: #213163; }
.badge-en_negociacion { background: #fdf5d9; color: #7a5f0d; }
.badge-acordada { background: #e4e8f5; color: #213163; }
.badge-pago_habilitado { background: #dcfce7; color: #166534; }
.badge-pagada { background: #213163; color: #ebbc1c; }
.badge-cancelada { background: #fee2e2; color: #991b1b; }
.badge-cancelacion-pendiente { background: #ffedd5; color: #c2410c; }
.badge-alta { background: #dcfce7; color: #166534; }
.badge-baja { background: #fee2e2; color: #991b1b; }
.badge-cat { background: #e4e8f5; color: #213163; }

/* Barra de seguimiento del pedido (estilo Mercado Libre) */
.tracking { margin-bottom: 24px; padding: 20px 16px 8px; background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius); position: relative; z-index: 0; isolation: isolate; }
.tracking-caption { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 20px; }
.tracking-rail { position: relative; height: 4px; background: var(--border); border-radius: 2px; margin: 0 24px; }
.tracking-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 2px; transition: width 0.4s ease; }
.tracking-steps { display: flex; justify-content: space-between; margin-top: -17px; position: relative; z-index: 1; }
.tracking-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.tracking-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; background: var(--bg); border: 2px solid var(--border); color: var(--text-muted); }
.tracking-step.done .tracking-dot { background: var(--text); border-color: var(--text); color: var(--accent); }
.tracking-step.current .tracking-dot { background: var(--accent); border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 4px rgba(235, 188, 28, 0.25); }
.tracking-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-align: center; }
.tracking-step.done .tracking-label, .tracking-step.current .tracking-label { color: var(--text); }

/* Seguimiento horizontal compacto en el panel derecho */
.tracking-side { margin-bottom: 12px; flex-shrink: 0; }
.tracking-side .tracking { margin-bottom: 0; padding: 6px 2px 0; background: transparent; border: none; }
.tracking-side .tracking-caption { margin-bottom: 16px; }
.tracking-side .tracking-rail { margin: 0 20px; }
.tracking-side .tracking-steps { margin-top: -14px; }
.tracking-side .tracking-dot { width: 24px; height: 24px; font-size: 0.7rem; }
.tracking-side .tracking-label { font-size: 0.62rem; }
@media (max-width: 560px) {
  .tracking { padding: 16px 8px 4px; }
  .tracking-rail { margin: 0 16px; }
  .tracking-dot { width: 26px; height: 26px; font-size: 0.7rem; }
  .tracking-label { font-size: 0.65rem; }
}

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; align-items: start; }
.detail-field { margin-bottom: 14px; }
.detail-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); display: block; margin-bottom: 2px; }
.detail-value { font-size: 1rem; }

/* Botón de pago del cliente */
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none; }
.pay-section { margin-top: 16px; }
.pay-hint { font-size: 0.85rem; color: var(--text-secondary); margin-top: 8px; text-align: center; }
.client-detail-inline-actions .btn { white-space: nowrap; }
@media (max-width: 560px) {
  .client-detail-inline-actions { flex-direction: column; }
  .client-detail-inline-actions .btn { width: 100%; }
}

.chat-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; height: 520px;
}
.chat-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { max-width: 80%; padding: 12px 16px; border-radius: 12px; font-size: 0.95rem; }
.chat-bubble.mine { align-self: flex-end; background: var(--text); color: var(--bg); border-bottom-right-radius: 4px; }
.chat-bubble.theirs { align-self: flex-start; background: var(--bg-secondary); color: var(--text); border-bottom-left-radius: 4px; border: 1px solid var(--border); }
.chat-author { font-size: 0.75rem; font-weight: 700; margin-bottom: 4px; opacity: 0.85; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-form input { flex: 1; }
.chat-form button { white-space: nowrap; }

.client-chat-sidebar .chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 14px 10px;
  gap: 14px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.client-chat-sidebar .chat-messages .chat-bubble {
  max-width: 95%;
  padding: 12px 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.client-chat-sidebar .chat-form {
  padding: 10px 0 2px;
  border-top: none;
  background: var(--bg);
  gap: 8px;
  flex-shrink: 0;
}

.client-chat-sidebar .chat-form input {
  min-width: 0;
  padding: 12px 14px;
  font-size: 0.9rem;
}

.client-chat-sidebar .chat-form button {
  flex-shrink: 0;
  padding: 12px 16px;
}

/* Respuestas rápidas del bot: compactas para dejar aire a los mensajes */
.bot-quick-replies {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 2px;
  flex-shrink: 0;
}

.bot-quick-replies .btn {
  padding: 6px 10px;
  font-size: 0.78rem;
  line-height: 1.3;
}

.client-chat-sidebar-header {
  background: var(--bg);
  z-index: 2;
  padding-bottom: 8px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.client-chat-sidebar-header h3 {
  font-size: 1.05rem;
  line-height: 1.25;
}

.client-sidebar-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
  padding-bottom: 12px;
}

/* Contacto */
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contacto-form { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; }
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: 'Manrope', sans-serif; font-size: 1rem; color: var(--text); background: var(--bg); transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.2); }
.contacto-info { display: flex; flex-direction: column; gap: 20px; }
.contacto-info-card {
  display: flex; align-items: center; gap: 16px; padding: 24px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius); transition: var(--transition);
}
.contacto-info-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.contacto-info-icon {
  width: 48px; height: 48px; background: var(--bg-secondary); border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contacto-info-card strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.contacto-info-card a { color: var(--text-secondary); font-size: 0.9rem; }

/* Admin */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 40px; }
.admin-stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.admin-stat-card h3 { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 8px; }
.admin-stat-card .stat-value { font-family: 'Sora', sans-serif; font-size: 2rem; font-weight: 700; }

.admin-table { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-table table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: var(--bg-secondary); padding: 14px 20px; text-align: left; font-size: 0.8rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
}
.admin-table td { padding: 16px 20px; border-top: 1px solid var(--border-light); font-size: 0.9rem; }
.admin-table tr:hover td { background: var(--bg-secondary); }
.admin-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* Footer */
.footer { background: var(--text); color: var(--bg); padding: 16px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr auto auto; gap: 24px; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 24px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.footer-brand .logo-img { height: 32px !important; }
.footer-brand p { color: var(--text-muted); margin-top: 8px; max-width: 320px; font-size: 0.82rem; line-height: 1.45; }
.footer-links { display: grid; grid-template-columns: auto auto; gap: 6px 28px; align-content: center; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; transition: var(--transition); white-space: nowrap; line-height: 1.4; }
.footer-links a:hover { color: var(--bg); }
.footer-contact { display: flex; flex-direction: column; gap: 12px; }
.footer-contact a { color: var(--text-muted); font-size: 0.9rem; transition: var(--transition); }
.footer-contact a:hover { color: var(--bg); }
.footer-social { display: flex; gap: 12px; align-items: center; }
.footer-social a {
  width: 36px; height: 36px; background: rgba(255, 255, 255, 0.1); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.footer-social a:hover { background: rgba(255, 255, 255, 0.2); }
.footer-bottom { padding: 8px 0; }
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; text-align: center; margin: 0; }

/* Toast - notificaciones arriba a la derecha, grandes y llamativas */
.toast {
  position: fixed; top: 76px; right: 24px; left: auto; bottom: auto;
  background: linear-gradient(135deg, #213163 0%, #2e468a 100%);
  color: #fff;
  padding: 16px 18px; border-radius: 14px;
  border: 1px solid rgba(235, 188, 28, 0.55);
  border-left: 6px solid var(--accent, #ebbc1c);
  box-shadow: 0 16px 40px rgba(33, 49, 99, 0.4), 0 0 0 4px rgba(235, 188, 28, 0.15);
  opacity: 0; transform: translateX(120%);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none; z-index: 9999;
  min-width: 340px; max-width: 420px;
  font-size: 1rem; font-weight: 600; line-height: 1.45;
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer;
}
.toast.show { opacity: 1; transform: translateX(0); pointer-events: auto; }
.toast.error { background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%); border-color: #fca5a5; border-left-color: #fecaca; }
.toast.success { background: linear-gradient(135deg, #065f46 0%, #059669 100%); border-color: #6ee7b7; border-left-color: #6ee7b7; }
.toast.info { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); border-color: #bfdbfe; border-left-color: #bfdbfe; }
.toast.quote {
  animation: toastPulse 1.6s ease-in-out infinite;
}
@keyframes toastPulse {
  0%, 100% { box-shadow: 0 16px 40px rgba(33, 49, 99, 0.4), 0 0 0 4px rgba(235, 188, 28, 0.15); }
  50% { box-shadow: 0 16px 40px rgba(33, 49, 99, 0.5), 0 0 0 8px rgba(235, 188, 28, 0.3), 0 0 24px rgba(235, 188, 28, 0.5); }
}
@media (max-width: 640px) {
  .toast { top: 68px; left: 12px; right: 12px; min-width: 0; max-width: none; font-size: 0.95rem; }
}

/* Sidebar and Mobile Components Defaults (Desktop) */
.sidebar-mobile-close { display: none; }
.client-mobile-bar { display: none; }
.client-mobile-detail-actions { display: none; }
.sidebar-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(11, 18, 32, 0.55);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Cabecera izquierda: título en una línea + solo botón ✕ (siempre visible) */
.client-sidebar-header .sidebar-close-always {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: var(--transition);
}
.client-sidebar-header .sidebar-close-always:hover {
  background: var(--border-light);
  color: var(--text);
}
.client-sidebar-header h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive System: 1200px -> 300px */
@media (max-width: 1200px) {
  /* Navigation & Header */
  .mobile-menu-btn {
    display: flex;
    z-index: 160;
  }
  .nav {
    display: none;
    position: fixed;
    top: var(--header-height, 60px);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--border-light);
    padding: 24px;
    flex-direction: column;
    gap: 16px;
    z-index: 150;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    max-height: calc(100vh - var(--header-height, 60px));
    overflow-y: auto;
  }
  .nav.active {
    display: flex;
  }
  .nav-actions {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
  }
  .nav-actions .user-greeting {
    font-size: 0.92rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .nav-actions .user-greeting strong {
    color: var(--text);
  }
  .nav-actions .nav-avatar {
    align-self: center;
    margin: 0 auto;
  }
  .nav-actions .btn {
    width: 100%;
  }

  /* Public Landing Page Adjustments */
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-title {
    font-size: 2.5rem;
  }

  /* Dashboard Layout: Overwrite the 300px desktop grid columns */
  .client-dashboard,
  .client-dashboard.sidebar-left-collapsed,
  .client-dashboard.sidebar-right-collapsed,
  .client-dashboard.sidebar-left-collapsed.sidebar-right-collapsed,
  .sales-dashboard,
  .sales-dashboard.sidebar-left-collapsed,
  .sales-dashboard.sidebar-right-collapsed,
  .sales-dashboard.sidebar-left-collapsed.sidebar-right-collapsed {
    display: block !important;
    grid-template-columns: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: calc(100vh - var(--header-height, 60px));
    position: relative;
    box-sizing: border-box;
  }

  .client-main,
  .sales-main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 24px 20px !important;
    min-height: calc(100vh - var(--header-height, 60px));
  }

  /* Hide desktop floating buttons on mobile - replaced by mobile toolbar */
  .client-floating-toggle {
    display: none !important;
  }

  /* Mobile Toolbar */
  .client-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-height, 60px) + 8px);
    z-index: 40;
  }
  .client-mobile-bar .client-bar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    width: 100%;
  }
  .client-mobile-bar .client-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  /* Fila +Nueva y Soporte debajo del regresar (vista detalle cliente en móvil) */
  .client-mobile-detail-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
  }
  .client-mobile-detail-actions .btn {
    flex: 1;
    justify-content: center;
  }

  /* SOLO móvil cliente: intercambiar botones con el seguimiento.
     Orden: regresar → seguimiento → título → [+Nueva][Soporte] → detalle */
  #client-detail-view {
    display: flex;
    flex-direction: column;
  }
  #client-detail-view .client-detail-header {
    display: contents;
  }
  #client-detail-view .btn-back-mobile {
    order: 1;
    align-self: flex-start;
  }
  #client-detail-view .client-detail-tracking {
    order: 2;
    width: 100%;
  }
  #client-detail-view .client-detail-title {
    order: 3;
    width: 100%;
    flex: none;
    min-width: 0;
  }
  #client-detail-view .client-mobile-detail-actions {
    order: 4;
    width: 100%;
  }
  #client-detail-view .client-detail-grid {
    order: 5;
    width: 100%;
  }

  /* Sidebars as Slide-over Drawers (igual que admin: alto completo sobre el header) */
  .client-sidebar,
  .client-chat-sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    width: min(340px, 86vw);
    max-width: 360px;
    z-index: 1001;
    padding: 20px 16px;
    background: var(--bg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .client-sidebar {
    left: 0;
    border-right: 1px solid var(--border-light);
    transform: translateX(0);
    opacity: 1;
  }
  /* Cabecera simple sin márgenes negativos */
  .client-sidebar-header {
    margin: 0 0 16px;
    padding: 0 0 14px;
  }
  .client-sidebar.collapsed {
    transform: translateX(-105%) !important;
    pointer-events: none;
    opacity: 0;
  }
  .client-chat-sidebar {
    right: 0;
    border-left: 1px solid var(--border-light);
    transform: translateX(0);
    opacity: 1;
  }
  .client-chat-sidebar.collapsed {
    transform: translateX(105%) !important;
    pointer-events: none;
    opacity: 0;
  }

  .sidebar-mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--transition);
  }
  .sidebar-mobile-close:hover {
    background: var(--border-light);
    color: var(--text);
  }

  /* Backdrop for Sidebars (igual que admin: cubre toda la pantalla) */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(11, 18, 32, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  .sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Client Form & Detail */
  .client-form-grid {
    grid-template-columns: 1fr !important;
  }
  .client-form-grid .form-col-span-2,
  .client-form-grid .form-col-full {
    grid-column: span 1 !important;
  }
  .client-detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .client-detail-actions {
    width: 100%;
  }
  .client-detail-actions .btn {
    width: 100%;
  }
  .btn-back-mobile {
    display: inline-flex;
    margin-bottom: 16px;
  }
}

@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; gap: 48px; }
  .hero-title { font-size: 2.75rem; }
  .sobre-mi_grid, .sobre-mi-grid { grid-template-columns: 1fr; gap: 48px; }
  .servicios-grid, .testimonios-grid, .contenido-grid, .valores-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .faq-grid { grid-template-columns: 1fr; }
  .client-main, .sales-main { padding: 22px 18px !important; }
}

@media (max-width: 768px) {
  .hero { padding: 120px 0 80px; }
  .hero-title { font-size: 2.25rem; }
  .hero-actions { flex-direction: column; }
  .hero-stats { flex-direction: column; gap: 24px; }
  .steps, .servicios-grid, .testimonios-grid, .contenido-grid, .valores-grid, .dashboard-grid, .detail-grid, .contacto-grid, .footer-inner { grid-template-columns: 1fr; }
  .section-title { font-size: 1.85rem; }
  .section { padding: 80px 0; }
  .page-section { padding: 120px 0 80px; }
  .cta-title { font-size: 1.75rem; }
  .cta-box { padding: 48px 24px; }
  .admin-stats { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; }
  .sobre-mi-image-card { max-width: 100%; }

  /* Forms & Cards */
  .formcard {
    padding: 24px 18px !important;
  }
  .client-welcome .section-title,
  .client-detail-title .section-title {
    font-size: 1.65rem;
  }
  .tracking {
    padding: 16px 8px 6px;
  }
  .tracking-rail {
    margin: 0 16px;
  }
  .tracking-dot {
    width: 26px;
    height: 26px;
    font-size: 0.72rem;
  }
  .tracking-label {
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .client-main, .sales-main {
    padding: 16px 12px !important;
  }
  .formcard {
    padding: 18px 14px !important;
  }
  .client-welcome .section-title,
  .client-detail-title .section-title {
    font-size: 1.4rem !important;
  }
  .client-welcome .section-subtitle,
  .client-detail-title .section-subtitle {
    font-size: 0.86rem !important;
  }
  .client-mobile-bar {
    padding: 10px 12px;
    gap: 8px;
    top: 84px;
  }
  .client-mobile-bar .client-bar-btn {
    font-size: 0.8rem;
    padding: 7px 10px;
  }
  .client-mobile-bar .btn {
    font-size: 0.8rem;
    padding: 7px 10px;
  }
  #client-mini-info {
    padding: 12px !important;
  }
  #client-mini-info div[style*="display:grid"] {
    grid-template-columns: 1fr !important;
    gap: 6px;
  }
  .photo-upload-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .photo-upload-label {
    height: 96px;
  }
  .photo-placeholder svg {
    width: 24px;
    height: 24px;
  }
  .photo-placeholder span {
    font-size: 0.7rem;
  }
}

@media (max-width: 360px) {
  .client-main, .sales-main {
    padding: 12px 6px !important;
  }
  .formcard {
    padding: 14px 10px !important;
  }
  .client-welcome .section-title,
  .client-detail-title .section-title {
    font-size: 1.25rem !important;
  }
  .client-mobile-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
  }
  .client-mobile-bar .client-bar-btn {
    width: 100%;
    justify-content: center;
  }
  .client-mobile-bar .client-bar-right {
    width: 100%;
    justify-content: space-between;
  }
  .client-mobile-bar .client-bar-right .btn {
    flex: 1;
  }
  .photo-upload-grid {
    gap: 6px;
  }
  .photo-upload-label {
    height: 82px;
  }
  .photo-placeholder svg {
    width: 20px;
    height: 20px;
  }
  .photo-placeholder span {
    font-size: 0.65rem;
  }
  .tracking-dot {
    width: 22px;
    height: 22px;
    font-size: 0.65rem;
  }
  .tracking-label {
    font-size: 0.58rem;
  }
  .quote-card {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}



/* ============================================================
   PHOTO UPLOAD - Quote Form
   ============================================================ */
.photos-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted, #6b7280);
  margin-bottom: 10px;
}

.required-badge {
  background: #fef3c7;
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid #fde68a;
}

.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.photo-upload-slot {
  position: relative;
}

.photo-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.photo-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  height: 120px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  background: #f9fafb;
}

.photo-upload-label:hover {
  border-color: var(--color-gold, #c9a94b);
  background: #fffbeb;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 500;
  pointer-events: none;
}

.photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.photo-check {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #16a34a;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.photo-upload-label.has-photo {
  border-color: #16a34a;
  border-style: solid;
}

.photos-hint {
  font-size: 0.75rem;
  color: #ef4444;
  margin: 0;
  text-align: center;
}

.photos-hint.ready {
  color: #16a34a;
}

.btn-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .photo-upload-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .photo-upload-label {
    height: 90px;
  }
}

/* ============================================================
   CLIENT RANKING - Admin Panel
   ============================================================ */
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.ranking-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb;
  background: #f9fafb;
}

.ranking-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
  color: #111827;
  vertical-align: middle;
}

.ranking-table tr:hover td {
  background: #f9fafb;
}

.categoria-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.categoria-VIP {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.categoria-Frecuente {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.categoria-Regular {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.categoria-Nuevo {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

/* ============================================================
   CATALOGO - SecciÃ³n inicio
   ============================================================ */
#top-productos { scroll-margin-top: 90px; }
/* FAQ "Resolvemos tus dudas" sin fondo gris (transparente) */
#como-funciona .container.section.section-muted { background: transparent; }
/* Por que trabajar con nosotros sin fondo (transparente) */
#sobre-nosotros .container.section.section-muted { background: transparent; }
.catalog-toolbar {
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin: 24px 0;
}
.catalog-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.catalog-filter {
  padding: 8px 16px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--bg); font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
  font-family: 'Manrope', sans-serif;
}
.catalog-filter:hover { border-color: var(--accent); color: var(--text); }
.catalog-filter.active { background: var(--text); color: #fff; border-color: var(--text); }
.catalog-search input {
  padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 0.9rem; min-width: 240px; outline: none; font-family: 'Manrope', sans-serif;
}
.catalog-search input:focus { border-color: var(--accent); }
.catalog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px; margin-top: 8px;
}
.catalog-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: var(--transition); display: flex; flex-direction: column;
}
.catalog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.catalog-img {
  height: 170px; display: flex; align-items: center; justify-content: center;
  position: relative; font-size: 3.5rem;
}
.catalog-emoji { filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15)); }
.catalog-img-skincare { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.catalog-img-shoes { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.catalog-img-tech { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.catalog-img-fashion { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.catalog-img-home { background: linear-gradient(135deg, #dcfce7, #bbf7d0); }
.catalog-img-toys { background: linear-gradient(135deg, #ffedd5, #fed7aa); }
.catalog-img-pets { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.catalog-img-thermo { background: linear-gradient(135deg, #e0f2fe, #bae6fd); }
.catalog-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--text); color: var(--accent);
  font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 100px;
}
.catalog-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.catalog-cat {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent-hover);
}
.catalog-body h3 { font-size: 1.05rem; margin: 0; }
.catalog-body p { font-size: 0.88rem; color: var(--text-secondary); margin: 0; flex: 1; }
.catalog-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; color: var(--text-secondary);
  border-top: 1px solid var(--border-light); padding-top: 12px; margin-top: 4px;
}
.catalog-meta strong { color: var(--text); font-size: 1rem; }
.catalog-moq { font-size: 0.75rem; color: var(--text-muted); }
.catalog-actions { margin-top: 8px; }
.catalog-actions .btn { width: 100%; }
.catalog-empty { text-align: center; color: var(--text-muted); padding: 32px; }

@media (max-width: 768px) {
  .catalog-toolbar { flex-direction: column; align-items: stretch; }
  .catalog-search input { width: 100%; min-width: 0; }
}


/* ==========================================================================
   TOP PRODUCTOS CAROUSEL - REDISE?O PREMIUM & RESPONSIVE
   ========================================================================== */
.top-carousel-wrap {
  position: relative;
  margin-left: calc(-1 * clamp(20px, 4vw, 48px));
  margin-right: calc(-1 * clamp(20px, 4vw, 48px));
  padding: 0 4px;
}

.top-carousel {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 16px clamp(24px, 4vw, 64px) 32px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.top-carousel::-webkit-scrollbar {
  display: none;
}

.top-carousel .catalog-card {
  flex: 0 0 clamp(300px, 32vw, 460px);
  scroll-snap-align: center;
  background: var(--bg);
  border: 1px solid rgba(214, 218, 232, 0.85);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px -6px rgba(33, 49, 99, 0.08), 0 2px 6px rgba(33, 49, 99, 0.03);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.3s ease;
  position: relative;
}

.top-carousel .catalog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 42px -10px rgba(33, 49, 99, 0.16), 0 0 0 2px rgba(235, 188, 28, 0.45);
  border-color: rgba(235, 188, 28, 0.6);
}

.top-carousel .catalog-card.is-prev,
.top-carousel .catalog-card.is-next {
  cursor: pointer;
}

/* La tarjeta lateral se convierte en botón al hover: flecha circular.
   Solo visible mientras la tarjeta tiene .is-prev / .is-next (JS lo quita al salir). */
.top-carousel .catalog-card .top-edge-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.85);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(214, 218, 232, 0.9);
  color: #213163;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -4px rgba(33, 49, 99, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
}

.top-carousel .catalog-card.is-prev .top-edge-hint--prev {
  left: 14px;
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.top-carousel .catalog-card.is-next .top-edge-hint--next {
  right: 14px;
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

@media (hover: none) {
  .top-carousel .catalog-card .top-edge-hint {
    display: none;
  }
}

/* ?rea de imagen */
.top-carousel .catalog-img {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 5rem;
  overflow: hidden;
}

.top-carousel .catalog-img::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 72%);
  filter: blur(10px);
  pointer-events: none;
}

.top-carousel .catalog-emoji {
  position: relative;
  z-index: 2;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
  filter: drop-shadow(0 10px 18px rgba(33, 49, 99, 0.18));
}

.top-carousel .catalog-card:hover .catalog-emoji {
  transform: scale(1.16) translateY(-8px) rotate(-3deg);
  filter: drop-shadow(0 18px 26px rgba(33, 49, 99, 0.28));
}

.top-carousel .catalog-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  background: rgba(33, 49, 99, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--accent);
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(33, 49, 99, 0.25);
  border: 1px solid rgba(235, 188, 28, 0.35);
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Gradients espec?ficos con halo luminoso */
.top-carousel .catalog-img-skincare {
  background: radial-gradient(circle at 75% 25%, rgba(244, 114, 182, 0.35), transparent 65%), linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fbcfe8 100%);
}
.top-carousel .catalog-img-shoes {
  background: radial-gradient(circle at 75% 25%, rgba(96, 165, 250, 0.38), transparent 65%), linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
}
.top-carousel .catalog-img-tech {
  background: radial-gradient(circle at 75% 25%, rgba(129, 140, 248, 0.4), transparent 65%), linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #c7d2fe 100%);
}
.top-carousel .catalog-img-fashion {
  background: radial-gradient(circle at 75% 25%, rgba(251, 191, 36, 0.4), transparent 65%), linear-gradient(135deg, #fefce8 0%, #fef3c7 50%, #fde68a 100%);
}

/* Cuerpo de la tarjeta */
.top-carousel .catalog-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.top-carousel .catalog-cat {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a87900;
  background: rgba(235, 188, 28, 0.14);
  padding: 4px 12px;
  border-radius: 6px;
  width: fit-content;
}

.top-carousel .catalog-body h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 2px 0 0;
}

.top-carousel .catalog-body p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.top-carousel .catalog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f7f8fc;
  border: 1px solid #e5e8f2;
  border-radius: 14px;
  padding: 12px 16px;
  margin-top: 10px;
}

.top-carousel .catalog-meta span strong {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
  font-family: 'Sora', sans-serif;
}

.top-carousel .catalog-moq {
  background: #e8eaf1;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.top-carousel .catalog-actions {
  margin-top: 8px;
}

.top-carousel .catalog-actions .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
  transition: all 0.25s ease;
}

.top-carousel .catalog-actions .btn svg {
  transition: transform 0.25s ease;
}

.top-carousel .catalog-actions .btn:hover svg {
  transform: translateX(4px);
}

/* Sin botones laterales: la navegación es por hover sobre tarjetas laterales.
   (Se eliminan .top-nav-btn / .top-nav-prev / .top-nav-next) */

/* Barra de controles inferior */
.top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
  padding: 0 clamp(24px, 4vw, 64px);
}

.top-counter {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  min-width: 60px;
}

.top-counter-current {
  color: var(--accent-hover);
  font-size: 1.25rem;
  font-weight: 800;
}

.top-counter-sep {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.top-counter-total {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.top-progress {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 380px;
  height: 6px;
  align-items: center;
}

.top-seg {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  border: none;
  background: rgba(33, 49, 99, 0.12);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: height 0.2s ease, background 0.2s ease;
}

.top-seg:hover {
  height: 7px;
  background: rgba(33, 49, 99, 0.22);
}

.top-seg-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ebbc1c, #f59e0b);
  transition: width 0.08s linear;
}

.top-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(214, 218, 232, 0.9);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(33, 49, 99, 0.08);
  transition: all 0.2s ease;
  flex-shrink: 0;
  outline: none;
}

.top-play:hover {
  background: #f8f9fc;
  border-color: var(--accent);
  color: var(--text);
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(33, 49, 99, 0.12);
}

.top-play .icon-play {
  display: none;
}

.top-play.paused .icon-play {
  display: block;
}

.top-play.paused .icon-pause {
  display: none;
}

/* Cursor flotante eliminado: ahora la flecha vive dentro de la tarjeta (.top-edge-hint) */

/* ============================================================
   Lightbox de fotos de cotización (cliente + admin).
   Las miniaturas abren el modal en la misma página.
   ============================================================ */
.foto-thumb {
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  line-height: 0;
}
.foto-thumb:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(33, 49, 99, 0.18);
  border-color: var(--accent);
}
.foto-thumb img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 11px;
}
@media (max-width: 480px) {
  .foto-thumb img { width: 128px; height: 128px; }
}

/* Cuadrícula de fotos: ocupa todo el ancho del contenedor (3 columnas) */
.fotos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.fotos-grid .foto-thumb { width: 100%; }
.fotos-grid .foto-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}
@media (max-width: 480px) {
  .fotos-grid { gap: 8px; }
}

.foto-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.88);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.foto-modal-overlay.hidden { display: none !important; }
.foto-modal-content {
  position: relative;
  max-width: min(920px, 94vw);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.foto-modal-content img {
  max-width: min(920px, 94vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  background: #fff;
}
.foto-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.foto-modal-close:hover { background: rgba(255, 255, 255, 0.28); }
.foto-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.foto-modal-nav:hover { background: rgba(255, 255, 255, 0.28); }
.foto-modal-prev { left: -58px; }
.foto-modal-next { right: -58px; }
@media (max-width: 1100px) {
  .foto-modal-prev { left: 8px; }
  .foto-modal-next { right: 8px; }
}
.foto-modal-counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ============================================================
   Modal de confirmación "Cotización enviada" (verde, auto-cierre)
   ============================================================ */
.sent-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.55);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: sentFadeIn 0.25s ease forwards;
}
.sent-modal-overlay.hidden { display: none !important; }
.sent-modal-content {
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: 20px;
  max-width: 380px;
  width: 100%;
  padding: 36px 28px 30px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(22, 163, 74, 0.25);
  animation: sentPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.sent-modal-content h2 {
  margin: 16px 0 8px;
  font-size: 1.4rem;
  color: #166534;
}
.sent-modal-content p {
  margin: 0;
  font-size: 0.92rem;
  color: #15803d;
}
.sent-check { display: flex; justify-content: center; }
.sent-check svg {
  width: 84px;
  height: 84px;
}
.sent-check-circle {
  fill: none;
  stroke: #16a34a;
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: sentDraw 0.6s ease forwards;
}
.sent-check-mark {
  fill: none;
  stroke: #16a34a;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: sentDraw 0.4s 0.45s ease forwards;
}
@keyframes sentDraw { to { stroke-dashoffset: 0; } }
@keyframes sentFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sentPop {
  from { opacity: 0; transform: scale(0.85) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
