@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #070e20;
  --bg-surface: #0d1a3f;
  --bg-surface-elevated: #132454;
  --text-primary: #ffffff;
  --text-secondary: #8ab4f8;
  --accent-primary: #00e676;
  --accent-hover: #00c853;
  --accent-gradient: linear-gradient(135deg, #00e676 0%, #00b0ff 100%);
  --accent-orange: #ff9800;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(13, 26, 63, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-glow: 0 0 20px rgba(0, 230, 118, 0.3);
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* Layout */
.sidebar {
  width: 260px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: fixed;
  height: 100vh;
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.brand i {
  color: var(--accent-primary);
  font-size: 1.8rem;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem 3rem;
  max-width: 1400px;
}

/* Responsive Mobile Layout */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: 70px;
    bottom: 0;
    top: auto;
    flex-direction: row;
    padding: 0;
    justify-content: center;
    border-right: none;
    border-top: 1px solid var(--border-color);
    z-index: 999;
  }
  
  .brand {
    display: none; /* Ocultar el logo en modo mobile inferior */
  }
  
  .nav-links {
    flex-direction: row;
    gap: 0;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    margin-top: 0;
  }
  
  .nav-link {
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.65rem;
    padding: 0.5rem;
    text-align: center;
  }
  
  .nav-link i {
    width: 20px;
    height: 20px;
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem;
    padding-bottom: 80px; /* Espacio para la barra de navegación inferior */
  }
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-size: 0.95rem;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.05);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Form Elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.form-group label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-control {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Views Management */
.view {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.view.active {
  display: block;
}

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

/* Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

/* Grid & Cards */
.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.vehicle-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.vehicle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.15);
}

.vehicle-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
}

.vehicle-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.vehicle-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.vehicle-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.vehicle-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Detail View */
.detail-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.detail-gallery {
  flex: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 400px;
}

.detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  flex: 1;
  padding: 2rem;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.spec-item {
  background: rgba(255,255,255,0.03);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.spec-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  letter-spacing: 0.05em;
}

.spec-value {
  font-weight: 500;
  font-size: 1rem;
}

/* PDF Template Hidden */
#pdf-template {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 800px;
  background: white;
  color: black;
  padding: 40px;
  font-family: serif;
}

.boleto-title {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  border-bottom: 2px solid black;
  padding-bottom: 10px;
}

.boleto-section {
  margin-bottom: 20px;
}

.boleto-text {
  font-size: 14px;
  line-height: 1.6;
  text-align: justify;
}

.signature-row {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
}

.signature-box {
  width: 45%;
  text-align: center;
  border-top: 1px solid black;
  padding-top: 10px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Utilities */
.flex-row { display: flex; gap: 1rem; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
