/* Sistema de Diseño Rento - Basado en Referencia AlquilaTodo */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --brand-blue: #1D61E7;
  --brand-blue-hover: #154EC2;
  --brand-blue-light: #EFF6FF;
  --brand-blue-bg: #E0F2FE;
  
  --dark-hero-bg: #0F172A;
  --surface-bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --border-color: #E2E8F0;
  
  --text-dark: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-white: #FFFFFF;

  --star-yellow: #F59E0B;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-float: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--surface-bg);
  color: var(--text-dark);
  line-height: 1.5;
  font-size: 0.95rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
}

/* NAVBAR LIMPIA EN FONDO BLANCO */
.navbar {
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
}

.brand-logo .logo-icon {
  color: var(--brand-blue);
  font-size: 1.5rem;
}

.brand-logo span {
  color: var(--text-dark);
}

.brand-logo span strong {
  color: var(--brand-blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 26px;
  height: 26px;
  background: var(--brand-blue);
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
}

/* BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--brand-blue);
  color: #FFFFFF;
  border-color: var(--brand-blue);
}

.btn-primary:hover {
  background-color: var(--brand-blue-hover);
}

.btn-outline {
  background-color: #FFFFFF;
  border-color: var(--border-color);
  color: var(--text-dark);
}

.btn-outline:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

/* HERO SECTION CON IMAGEN DE MOTO Y BARRA DE BÚSQUEDA FLOTANTE */
.hero-full {
  position: relative;
  background: linear-gradient(to right, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.65) 50%, rgba(15, 23, 42, 0.4) 100%), 
              url('https://images.unsplash.com/photo-1558981806-ec527fa84c39?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  color: #FFFFFF;
  padding: 4.5rem 2rem 5.5rem 2rem;
  border-radius: 0;
}

.hero-content {
  max-width: 1280px;
  margin: 0 auto;
}

.hero-headline {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  color: #FFFFFF !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-headline span {
  color: #38BDF8 !important;
}

.hero-subhead {
  font-size: 1.15rem;
  color: #F1F5F9 !important;
  margin-bottom: 2.2rem;
  max-width: 580px;
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* BARRA FLOTANTE DE BÚSQUEDA */
.search-bar-floating {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 0.6rem;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  align-items: center;
  box-shadow: var(--shadow-float);
  max-width: 780px;
  margin-bottom: 2rem;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 1rem;
}

.search-field:first-child {
  border-right: 1px solid var(--border-color);
}

.search-icon {
  color: var(--brand-blue);
  font-size: 1.2rem;
}

.search-input-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dark);
}

.search-input-group input {
  border: none;
  outline: none;
  font-size: 0.88rem;
  color: var(--text-secondary);
  width: 100%;
  font-family: inherit;
  background: transparent;
}

/* INDICADORES DE CONFIANZA ABAJO DE BÚSQUEDA */
.trust-indicators {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.trust-item i {
  color: #60A5FA;
  font-size: 1.3rem;
  margin-top: 0.2rem;
}

.trust-item strong {
  display: block;
  font-size: 0.88rem;
  color: #FFFFFF;
}

.trust-item span {
  font-size: 0.78rem;
  color: #CBD5E1;
}

/* CONTENEDOR DE SECCIONES */
.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

/* MÉTRICAS & TARJETAS DE ESTADÍSTICA (DASHBOARD) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: #FFFFFF;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-icon.blue { background: var(--brand-blue-light); color: var(--brand-blue); }
.stat-icon.green { background: #ECFDF5; color: #059669; }
.stat-icon.amber { background: #FFFBEB; color: #D97706; }
.stat-icon.rose { background: #FEF2F2; color: #DC2626; }

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 0.25rem;
}

/* SECCIÓN MOTOS DISPONIBLES */
.section-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--brand-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.section-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.8rem;
}

.section-title-lg {
  font-size: 1.8rem;
  color: var(--text-dark);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* GRID DE TARJETAS DE MOTOS */
.cards-grid-5 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

.moto-card-ref {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}

.moto-card-ref:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.moto-card-img-box {
  height: 150px;
  background: #F1F5F9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.moto-card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moto-heart-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
}

.moto-badge {
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.badge-available { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
.badge-rented { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.badge-maintenance { background: #FEF2F2; color: #991B1B; border-color: #FCA5A5; }

.moto-card-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.moto-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.moto-card-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.moto-card-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-blue);
  margin-bottom: 0.75rem;
}

.moto-card-price span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.moto-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 0.6rem;
}

.moto-rating {
  color: var(--star-yellow);
  font-weight: 700;
}

/* BANNER AZUL DE LLAMADO A LA ACCIÓN (CTA DUEÑOS) */
.cta-owner-banner {
  background-color: var(--brand-blue-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
}

.cta-owner-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cta-owner-icon {
  width: 48px;
  height: 48px;
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.cta-owner-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
}

.cta-owner-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* FOOTER LIMPIO 4 COLUMNAS */
.footer-ref {
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-color);
  padding: 3.5rem 2rem 2rem 2rem;
  color: var(--text-secondary);
  margin-top: auto;
}

.footer-ref-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-col-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.88rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--brand-blue);
}

.social-icons {
  display: flex;
  gap: 1rem;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* TABLAS Y FORMULARIOS ADAPTADOS */
.table-wrapper {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th {
  background: #F8FAFC;
  padding: 0.85rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.88rem;
}

.form-card {
  background: #FFFFFF;
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  max-width: 580px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #FFFFFF;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-blue);
}

/* MODALES */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #FFFFFF;
  width: 90%;
  max-width: 520px;
  border-radius: var(--radius-md);
  padding: 1.8rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-float);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.8rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* ==========================================================================
   MEDIA QUERIES - DISEÑO RESPONSIVO INTEGRAL
   ========================================================================== */

/* Tablet y Pantallas Medianas (max-width: 1024px) */
@media (max-width: 1024px) {
  .navbar-container {
    padding: 0 1rem;
  }
  
  .footer-ref-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .footer-ref-container > div:first-child {
    grid-column: span 3;
    margin-bottom: 1rem;
  }
}

/* Dispositivos Móviles Grandes y Tablets (max-width: 768px) */
@media (max-width: 768px) {
  /* Navbar */
  .navbar-container {
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .nav-links-wrapper {
    order: 3;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--border-color);
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding: 0.5rem 0;
    gap: 1.2rem;
    white-space: nowrap;
    border: none;
  }

  .nav-actions {
    margin-left: auto;
  }

  /* Hero Section */
  .hero-full {
    padding: 3rem 1.2rem 4rem 1.2rem;
  }

  .hero-headline {
    font-size: 2.3rem;
  }

  .hero-subhead {
    font-size: 1rem;
    margin-bottom: 1.8rem;
  }

  /* Barra de Búsqueda Flotante */
  .search-bar-floating {
    grid-template-columns: 1fr;
    gap: 0.2rem;
    padding: 0.6rem;
  }

  .search-field {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0.8rem;
  }

  .search-field:last-of-type {
    border-bottom: none;
  }

  .search-bar-floating button.btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.8rem;
  }

  /* Trust Indicators */
  .trust-indicators {
    gap: 1.2rem;
    flex-direction: column;
  }

  /* Contenedores Principales */
  .main-content {
    margin: 1.5rem auto;
    padding: 0 1rem;
  }

  /* Columnas y Grillas de Dos Columnas */
  div[style*="display: grid; grid-template-columns: 1.2fr 0.8fr;"],
  div[style*="display: grid; grid-template-columns: 1.1fr 0.9fr;"] {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Banners y Finanzas */
  div[style*="display: flex; justify-content: space-between; align-items: center;"] {
    flex-direction: column;
    align-items: stretch !important;
    text-align: center;
    gap: 1.2rem;
  }

  div[style*="display: flex; align-items: center; gap: 1.8rem;"] {
    flex-direction: column;
    width: 100%;
  }

  div[style*="display: flex; align-items: center; gap: 1.8rem;"] > div,
  div[style*="display: flex; align-items: center; gap: 1.8rem;"] form {
    width: 100%;
  }

  div[style*="display: flex; align-items: center; gap: 1.8rem;"] button {
    width: 100%;
  }

  /* Tablas responsivas con scroll horizontal */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    min-width: 600px;
  }

  /* Footer */
  .footer-ref-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-ref-container > div:first-child {
    grid-column: span 1;
  }
}

/* Pantallas Pequeñas y Celulares (max-width: 480px) */
@media (max-width: 480px) {
  /* Cabecera Dashboard */
  div[style*="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;"] {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  div[style*="display: gap: 0.8rem;"],
  div[style*="display: flex; gap: 0.8rem;"] {
    flex-direction: column;
    margin-top: 1rem;
    width: 100%;
  }
  
  div[style*="display: flex; gap: 0.8rem;"] a,
  div[style*="display: flex; gap: 0.8rem;"] button {
    width: 100%;
  }

  /* Tarjetas de Reservas (Bookings) */
  div[style*="display: grid; grid-template-columns: auto 1fr auto;"] {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 1rem !important;
  }

  div[style*="display: grid; grid-template-columns: auto 1fr auto;"] > div:first-child {
    margin: 0 auto;
  }

  div[style*="display: grid; grid-template-columns: auto 1fr auto;"] div[style*="text-align: right;"] {
    text-align: center !important;
    align-items: center !important;
  }

  /* Modales y Formularios */
  .modal-content {
    padding: 1.2rem;
  }
  
  .form-card {
    padding: 1.2rem;
  }
}

@keyframes pulse-arrow {
  0%, 100% { transform: translateX(0); opacity: 0.4; }
  50% { transform: translateX(4px); opacity: 1; }
}

/* TARJETAS DE RESERVA RESPONSIVAS */
.booking-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

@media (max-width: 1024px) {
  .booking-card {
    grid-template-columns: auto 1fr;
    align-items: flex-start;
  }
  .booking-card > div:last-child {
    grid-column: span 2;
    text-align: left !important;
    align-items: flex-start !important;
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
    margin-top: 0.5rem;
  }
}

@media (max-width: 576px) {
  .booking-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .booking-card > div:last-child {
    grid-column: span 1;
  }
}

