/* ═══════════════════════════════════════════════════════════════════════════
   LIVING VIAJANDO · SISTEMA DE DISEÑO PREMIUM
   Paleta: Azul marino #0A2F5C · Rosa/Fucsia #C8184A · Blanco #FFFFFF
   Tipografía: Inter (UI) + Playfair Display (headings premium)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --lv-navy:        #0A2F5C;
  --lv-navy-light:  #1A4A8A;
  --lv-navy-dark:   #071E3D;
  --lv-rose:        #C8184A;
  --lv-rose-light:  #E8335E;
  --lv-rose-pale:   #FCE8EE;
  --lv-white:       #FFFFFF;
  --lv-off-white:   #F8F9FC;
  --lv-gray-50:     #F5F6FA;
  --lv-gray-100:    #EEF0F6;
  --lv-gray-200:    #DDE1ED;
  --lv-gray-300:    #C4CAD9;
  --lv-gray-400:    #9AA3B8;
  --lv-gray-500:    #6B7590;
  --lv-gray-600:    #4A5168;
  --lv-gray-700:    #343B52;
  --lv-gray-800:    #1E2333;
  --lv-success:     #1A7A4A;
  --lv-success-bg:  #E6F4EC;
  --lv-warning:     #B45309;
  --lv-warning-bg:  #FEF3CD;
  --lv-error:       #B91C1C;
  --lv-error-bg:    #FEE2E2;
  --lv-info:        #1A4A8A;
  --lv-info-bg:     #EEF4FF;

  --sidebar-w:      260px;
  --header-h:       64px;
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --shadow-xs:      0 1px 3px rgba(10,47,92,0.08);
  --shadow-sm:      0 2px 8px rgba(10,47,92,0.10);
  --shadow-md:      0 4px 20px rgba(10,47,92,0.12);
  --shadow-lg:      0 8px 40px rgba(10,47,92,0.16);
  --shadow-xl:      0 16px 64px rgba(10,47,92,0.20);
  --transition:     0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--lv-gray-700);
  background: var(--lv-gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SCROLLBAR ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--lv-gray-200); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--lv-gray-300); }

/* ── LOGIN ──────────────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, var(--lv-navy-dark) 0%, var(--lv-navy) 50%, #0D3A6E 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  position: relative;
  z-index: 1;
}

.login-brand {
  text-align: center;
  margin-bottom: 56px;
}

.login-logo {
  height: 60px;
  filter: brightness(0) invert(1);
  margin-bottom: 24px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.login-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--lv-white);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.login-brand-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.5px;
  font-weight: 400;
}

.login-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 340px;
}

.login-features li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  line-height: 1.5;
}

.login-features li i {
  color: var(--lv-rose-light);
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  width: 18px;
}

.login-right {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: var(--lv-white);
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--lv-navy);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.login-card-subtitle {
  color: var(--lv-gray-400);
  font-size: 14px;
  margin-bottom: 36px;
}

.login-demo-banner {
  background: var(--lv-info-bg);
  border: 1px solid var(--lv-gray-200);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 28px;
  font-size: 12.5px;
  color: var(--lv-navy);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.login-demo-banner i { color: var(--lv-navy-light); margin-top: 1px; }

/* ── LAYOUT PRINCIPAL ──────────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--lv-navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
  box-shadow: var(--shadow-lg);
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo-img {
  height: 30px;
  width: auto;
  display: block;
  object-fit: contain;
}

.sidebar-logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.30);
  padding: 16px 20px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  color: var(--lv-white);
  background: rgba(255,255,255,0.08);
}

.nav-item.active {
  color: var(--lv-white);
  background: rgba(200,24,74,0.20);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--lv-rose);
  border-radius: 0 2px 2px 0;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--lv-rose);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lv-rose), var(--lv-rose-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 12.5px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,0.40); text-transform: capitalize; }

.btn-logout {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
  font-size: 13px;
}
.btn-logout:hover { color: var(--lv-rose-light); }

/* ── MAIN CONTENT ──────────────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--header-h);
  background: var(--lv-white);
  border-bottom: 1px solid var(--lv-gray-100);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
  box-shadow: var(--shadow-xs);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--lv-gray-400);
  flex: 1;
}

.topbar-breadcrumb span.current {
  color: var(--lv-navy);
  font-weight: 600;
}

.topbar-breadcrumb i { font-size: 10px; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-content {
  flex: 1;
  padding: 28px;
}

/* ── FORMULARIOS ───────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lv-gray-600);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.form-label.required::after { content: ' *'; color: var(--lv-rose); }

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--lv-gray-200);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  color: var(--lv-gray-700);
  background: var(--lv-white);
  transition: all var(--transition);
  font-family: inherit;
  outline: none;
}

.form-control:focus {
  border-color: var(--lv-navy-light);
  box-shadow: 0 0 0 3px rgba(26,74,138,0.10);
}

.form-control:disabled {
  background: var(--lv-gray-50);
  color: var(--lv-gray-400);
  cursor: not-allowed;
}

.form-control.error { border-color: var(--lv-error); }
.form-error-msg { font-size: 11.5px; color: var(--lv-error); margin-top: 4px; }
.form-hint { font-size: 11.5px; color: var(--lv-gray-400); margin-top: 4px; }

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7590' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

textarea.form-control { resize: vertical; min-height: 90px; }

.form-row { display: grid; gap: 16px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* ── BOTONES ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--lv-navy);
  color: white;
  border-color: var(--lv-navy);
}
.btn-primary:hover:not(:disabled) {
  background: var(--lv-navy-light);
  border-color: var(--lv-navy-light);
  box-shadow: 0 4px 12px rgba(10,47,92,0.25);
  transform: translateY(-1px);
}

.btn-rose {
  background: var(--lv-rose);
  color: white;
  border-color: var(--lv-rose);
}
.btn-rose:hover:not(:disabled) {
  background: var(--lv-rose-light);
  border-color: var(--lv-rose-light);
  box-shadow: 0 4px 12px rgba(200,24,74,0.25);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--lv-navy);
  border-color: var(--lv-gray-200);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--lv-navy);
  background: var(--lv-gray-50);
}

.btn-ghost {
  background: transparent;
  color: var(--lv-gray-500);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--lv-gray-100); color: var(--lv-gray-700); }

.btn-danger {
  background: var(--lv-error);
  color: white;
  border-color: var(--lv-error);
}
.btn-danger:hover:not(:disabled) { background: #9B1111; }

.btn-sm { padding: 5px 12px; font-size: 12.5px; gap: 5px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }
.btn-icon.btn-sm { width: 30px; height: 30px; padding: 5px; }

/* ── CARDS ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--lv-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--lv-gray-100);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-sm); }

.card-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-body { padding: 20px 24px; }
.card-footer {
  padding: 12px 24px 16px;
  border-top: 1px solid var(--lv-gray-100);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--lv-navy);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  color: var(--lv-rose);
  font-size: 14px;
}

.card-subtitle { font-size: 12.5px; color: var(--lv-gray-400); margin-top: 2px; }

/* ── STAT CARDS ────────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--lv-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--lv-gray-100);
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-icon.navy { background: rgba(10,47,92,0.10); color: var(--lv-navy); }
.stat-icon.rose { background: rgba(200,24,74,0.10); color: var(--lv-rose); }
.stat-icon.success { background: var(--lv-success-bg); color: var(--lv-success); }
.stat-icon.warning { background: var(--lv-warning-bg); color: var(--lv-warning); }

.stat-label { font-size: 12px; color: var(--lv-gray-400); font-weight: 500; letter-spacing: 0.3px; margin-bottom: 4px; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--lv-navy); letter-spacing: -1px; line-height: 1; }
.stat-sub { font-size: 12px; color: var(--lv-gray-400); margin-top: 4px; }
.stat-trend { font-size: 11.5px; font-weight: 600; }
.stat-trend.up { color: var(--lv-success); }
.stat-trend.down { color: var(--lv-error); }

/* ── TABLAS ─────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--lv-gray-400);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: var(--lv-gray-50);
  border-bottom: 1px solid var(--lv-gray-100);
  white-space: nowrap;
}

.table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--lv-gray-100);
  color: var(--lv-gray-700);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--lv-gray-50); }

.table-actions { display: flex; align-items: center; gap: 4px; }

/* ── BADGES / ESTADOS ──────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.badge-borrador     { background: var(--lv-gray-100); color: var(--lv-gray-500); }
.badge-en_preparacion { background: #FEF9C3; color: #854D0E; }
.badge-generado     { background: #DBEAFE; color: #1D4ED8; }
.badge-revisado     { background: #E0F2FE; color: #0369A1; }
.badge-enviado      { background: var(--lv-info-bg); color: var(--lv-navy); }
.badge-aceptado     { background: var(--lv-success-bg); color: var(--lv-success); }
.badge-rechazado    { background: var(--lv-error-bg); color: var(--lv-error); }
.badge-archivado    { background: var(--lv-gray-100); color: var(--lv-gray-400); }
.badge-activo       { background: var(--lv-success-bg); color: var(--lv-success); }
.badge-validada     { background: var(--lv-success-bg); color: var(--lv-success); }
.badge-pendiente_validacion { background: var(--lv-warning-bg); color: var(--lv-warning); }

.badge-tipo-familia     { background: #FEF3C7; color: #92400E; }
.badge-tipo-pareja      { background: var(--lv-rose-pale); color: var(--lv-rose); }
.badge-tipo-corporativo { background: #DBEAFE; color: #1E40AF; }
.badge-tipo-senior      { background: #DCFCE7; color: #166534; }
.badge-tipo-solitario   { background: #F3E8FF; color: #7E22CE; }
.badge-tipo-grupo       { background: #E0F2FE; color: #0369A1; }

.badge-rol-administrador { background: var(--lv-navy); color: white; }
.badge-rol-agente { background: #DBEAFE; color: #1E40AF; }
.badge-rol-lector { background: var(--lv-gray-100); color: var(--lv-gray-500); }
.badge-rol-ingeniero { background: #F3E8FF; color: #7E22CE; }

/* ── ALERTAS ───────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  border-left: 3px solid;
}
.alert i { margin-top: 1px; flex-shrink: 0; font-size: 14px; }
.alert-info    { background: var(--lv-info-bg);    color: var(--lv-navy);     border-color: var(--lv-navy); }
.alert-success { background: var(--lv-success-bg); color: var(--lv-success);  border-color: var(--lv-success); }
.alert-warning { background: var(--lv-warning-bg); color: var(--lv-warning);  border-color: var(--lv-warning); }
.alert-danger  { background: var(--lv-error-bg);   color: var(--lv-error);    border-color: var(--lv-error); }
.alert-ai      { background: #F0F4FF; color: #3730A3; border-color: #6366F1; }

/* ── PAGE HEADERS ──────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--lv-navy);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--lv-gray-400);
  margin-top: 3px;
  font-weight: 400;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── SEARCH BAR ────────────────────────────────────────────────────────────── */
.search-bar {
  position: relative;
}
.search-bar i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lv-gray-400);
  font-size: 13px;
}
.search-bar input {
  padding-left: 34px;
  min-width: 240px;
}

/* ── FILTROS ───────────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  background: var(--lv-gray-100);
  border: 1px solid var(--lv-gray-200);
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--lv-gray-600);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
}
.filter-chip:hover { background: var(--lv-gray-200); }
.filter-chip.active { background: var(--lv-navy); color: white; border-color: var(--lv-navy); }

/* ── TABS ───────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--lv-gray-100);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--lv-gray-400);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab-btn:hover { color: var(--lv-navy); background: var(--lv-gray-50); }
.tab-btn.active {
  color: var(--lv-navy);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--lv-rose);
  border-radius: 2px 2px 0 0;
}

/* ── MODAL ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,30,61,0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal {
  background: var(--lv-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}

.modal-sm { max-width: 420px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }

.modal-header {
  padding: 22px 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--lv-gray-100);
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--lv-navy);
}
.modal-close {
  background: none;
  border: none;
  color: var(--lv-gray-400);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: color var(--transition);
  line-height: 1;
}
.modal-close:hover { color: var(--lv-navy); }
.modal-body { padding: 24px 28px; }
.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--lv-gray-100);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── TIMELINE / LOG ────────────────────────────────────────────────────────── */
.timeline { padding: 4px 0; }
.timeline-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}
.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 1px;
  background: var(--lv-gray-100);
}
.timeline-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  z-index: 1;
}
.timeline-icon.navy { background: var(--lv-navy); color: white; }
.timeline-icon.rose { background: var(--lv-rose); color: white; }
.timeline-icon.success { background: var(--lv-success); color: white; }
.timeline-icon.gray { background: var(--lv-gray-200); color: var(--lv-gray-500); }
.timeline-content { flex: 1; padding-top: 4px; }
.timeline-title { font-size: 13.5px; font-weight: 600; color: var(--lv-gray-700); }
.timeline-meta { font-size: 12px; color: var(--lv-gray-400); margin-top: 2px; }

/* ── EMPTY STATE ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--lv-gray-400);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--lv-gray-500); margin-bottom: 8px; }
.empty-state p { font-size: 13.5px; margin-bottom: 20px; }

/* ── LOADER ─────────────────────────────────────────────────────────────────── */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--lv-gray-100);
  border-top-color: var(--lv-navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* ── TOAST / NOTIFICACIONES ────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 500;
  min-width: 280px;
  max-width: 400px;
  animation: slideIn 0.3s ease;
  position: relative;
}

@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.toast-success { background: var(--lv-success); color: white; }
.toast-error   { background: var(--lv-error); color: white; }
.toast-info    { background: var(--lv-navy); color: white; }
.toast-warning { background: var(--lv-warning); color: white; }
.toast i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }

/* ── AVATAR ─────────────────────────────────────────────────────────────────── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--lv-navy), var(--lv-navy-light));
  color: white;
  flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 10px; }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }

/* ── PRESUPUESTO VISUAL ────────────────────────────────────────────────────── */
.budget-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--lv-navy);
  letter-spacing: 0.5px;
}

.price-highlight {
  font-size: 28px;
  font-weight: 800;
  color: var(--lv-navy);
  letter-spacing: -1px;
}

.price-per-person {
  font-size: 13px;
  color: var(--lv-gray-400);
  margin-left: 6px;
  font-weight: 400;
}

/* ── PROGRESS BAR ──────────────────────────────────────────────────────────── */
.progress-bar {
  height: 6px;
  background: var(--lv-gray-100);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--lv-navy), var(--lv-navy-light));
  transition: width 0.5s ease;
}

/* ── DASHBOARD GRID ────────────────────────────────────────────────────────── */
.dashboard-grid { display: grid; gap: 20px; }
.dashboard-stats-grid { grid-template-columns: repeat(4, 1fr); }
.dashboard-main-grid { grid-template-columns: 1fr 1fr 1fr; }
.dashboard-half { grid-column: span 2; }
.dashboard-full { grid-column: 1 / -1; }

/* ── PDF / DOCUMENTO ───────────────────────────────────────────────────────── */
.pdf-preview {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Inter', sans-serif;
}

.pdf-header {
  background: var(--lv-navy);
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdf-logo { height: 36px; filter: brightness(0) invert(1); }

.pdf-header-info { text-align: right; }
.pdf-header-info h2 { color: white; font-size: 18px; font-weight: 700; }
.pdf-header-info p { color: rgba(255,255,255,0.6); font-size: 12px; margin-top: 4px; }

.pdf-strip {
  height: 4px;
  background: linear-gradient(90deg, var(--lv-rose) 0%, var(--lv-rose-light) 50%, var(--lv-rose) 100%);
}

.pdf-body { padding: 32px 36px; }

.pdf-section { margin-bottom: 28px; }
.pdf-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--lv-rose);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--lv-gray-100);
}

.pdf-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pdf-info-item label { font-size: 11px; color: var(--lv-gray-400); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; display: block; margin-bottom: 3px; }
.pdf-info-item span { font-size: 14px; color: var(--lv-gray-700); font-weight: 500; }

.pdf-day-item {
  border-left: 3px solid var(--lv-rose);
  padding: 10px 14px;
  margin-bottom: 10px;
  background: var(--lv-gray-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.pdf-day-label { font-size: 11px; font-weight: 700; color: var(--lv-rose); text-transform: uppercase; letter-spacing: 0.5px; }
.pdf-day-title { font-size: 14px; font-weight: 600; color: var(--lv-navy); }
.pdf-day-desc { font-size: 13px; color: var(--lv-gray-500); margin-top: 4px; }

.pdf-price-box {
  background: var(--lv-navy);
  color: white;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pdf-price-box .price-label { font-size: 13px; opacity: 0.7; }
.pdf-price-box .price-value { font-size: 32px; font-weight: 800; letter-spacing: -1px; }

.pdf-closing {
  background: var(--lv-gray-50);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 13px;
  color: var(--lv-gray-600);
  font-style: italic;
  line-height: 1.7;
  border-left: 3px solid var(--lv-rose);
}

.pdf-footer {
  background: var(--lv-gray-50);
  border-top: 1px solid var(--lv-gray-100);
  padding: 14px 36px;
  text-align: center;
  font-size: 11px;
  color: var(--lv-gray-400);
}

/* ── ACTIVIDADES ───────────────────────────────────────────────────────────── */
.activity-card {
  background: var(--lv-white);
  border: 1px solid var(--lv-gray-100);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all var(--transition);
  cursor: pointer;
}
.activity-card:hover {
  border-color: var(--lv-navy-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.activity-card.selected {
  border-color: var(--lv-rose);
  background: var(--lv-rose-pale);
}

.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.act-category-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}
.act-cultural { background: #EFF6FF; color: #2563EB; }
.act-aventura { background: #FFF7ED; color: #EA580C; }
.act-gastronomia { background: #FFF1F2; color: var(--lv-rose); }
.act-naturaleza { background: #F0FDF4; color: #16A34A; }
.act-bienestar { background: #FAF5FF; color: #9333EA; }

/* ── CLIENTE CARD ──────────────────────────────────────────────────────────── */
.client-card {
  background: var(--lv-white);
  border: 1px solid var(--lv-gray-100);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--transition);
  cursor: pointer;
}
.client-card:hover { border-color: var(--lv-gray-200); box-shadow: var(--shadow-sm); }

/* ── UTILIDADES ─────────────────────────────────────────────────────────────── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-sm { font-size: 12.5px; } .text-xs { font-size: 11.5px; }
.text-muted { color: var(--lv-gray-400); }
.text-navy { color: var(--lv-navy); }
.text-rose { color: var(--lv-rose); }
.text-success { color: var(--lv-success); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── SECCIÓN INFO LIST ──────────────────────────────────────────────────────── */
.info-list { display: flex; flex-direction: column; gap: 0; }
.info-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--lv-gray-100);
  gap: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 12px; color: var(--lv-gray-400); font-weight: 600; min-width: 140px; flex-shrink: 0; }
.info-value { font-size: 13.5px; color: var(--lv-gray-700); font-weight: 500; }

/* ── SERVICIOS CHECKLIST ───────────────────────────────────────────────────── */
.service-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lv-gray-50);
  border: 1px solid var(--lv-gray-200);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  color: var(--lv-gray-600);
  font-weight: 500;
}
.service-tag i { color: var(--lv-success); font-size: 11px; }
.services-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── NUMERACIÓN PRESUPUESTO ────────────────────────────────────────────────── */
.budget-ref-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lv-navy);
  color: white;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ── KANBAN / PIPELINE ──────────────────────────────────────────────────────── */
.pipeline-bar {
  display: flex;
  height: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  gap: 2px;
}
.pipeline-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: white;
  transition: flex var(--transition);
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .dashboard-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-main-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-half { grid-column: span 1; }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); }
  .sidebar.open { transform: translateX(0); width: 260px; --sidebar-w: 260px; }
  .main-content { margin-left: 0; }
  .page-content { padding: 16px; }
  .dashboard-stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
}

/* ── LOGO CORPORATIVO ────────────────────────────────────────────────────────── */
.lv-logo {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.login-logo-img {
  height: 70px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 24px rgba(200,24,74,0.35));
}

.login-card-logo {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto 4px;
}

/* sidebar-logo-img se usa en inline style dentro del contenedor blanco */

.pdf-logo {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* ── PRINT / PDF EXPORT ─────────────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .page-header-actions, .btn-rose, .btn-outline,
  .btn-primary, .alert-ai, .filter-bar, .table-actions,
  #lv-toasts, .nav-item, button:not(.pdf-print-btn) {
    display: none !important;
  }

  .app-layout { display: block; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }

  body { background: white; }

  .pdf-preview {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  .pdf-header {
    background: var(--lv-navy) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pdf-strip {
    background: linear-gradient(90deg, var(--lv-rose), var(--lv-rose-light)) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pdf-client-bar {
    background: linear-gradient(135deg, var(--lv-navy), var(--lv-navy-light)) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pdf-price-box {
    background: linear-gradient(135deg, var(--lv-navy), var(--lv-rose)) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    size: A4;
    margin: 0;
  }
}

/* ── SIDEBAR LOGO WRAPPER ───────────────────────────────────────────────────── */
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 8px;
}

.sidebar-logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
  margin-top: 4px;
  text-transform: uppercase;
}

/* ── LOGIN PAGE LOGO WRAPPER ────────────────────────────────────────────────── */
.login-logo-wrap {
  display: flex;
  justify-content: center;
  padding: 20px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 20px;
}

.login-logo-img-bg {
  padding: 12px 24px;
  background: white;
  border-radius: var(--radius-md);
}

/* ── CLASES FALTANTES LOGIN ─────────────────────────────────────────────────── */
.login-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.5px;
  font-weight: 400;
  text-align: center;
  margin-top: 12px;
}

.login-version {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 40px;
  letter-spacing: 0.5px;
}

.login-card-sub {
  font-size: 13px;
  color: var(--lv-gray-400);
  text-align: center;
  margin-bottom: 20px;
}
