/* MotoRide UI - Estilo moderno tipo app Uber */

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

* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  margin: 0;
  background: #020617;
  color: #e5e7eb;
}

/* HEADER */
header {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  position: sticky;
  top: 0;
  z-index: 20;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

header .logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: radial-gradient(circle at 20% 20%, #22c55e, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: #0b1120;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.75);
}

header h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

header span {
  font-size: 11px;
  opacity: .75;
}

/* NAV */
nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #0b1120;
  background: #22c55e;
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 4px 0 #15803d;
  transition: transform .18s, box-shadow .18s;
}

nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #166534;
}

/* MAIN WRAPPER */
.main-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

/* HERO */
.hero {
  margin-bottom: 10px;
}

.hero h2 {
  margin: 4px 0 6px;
  font-size: 26px;
  letter-spacing: .02em;
}

.hero p {
  margin: 0;
  font-size: 14px;
  color: #9ca3af;
}

.hero-highlights {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-pill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.7);
  color: #bfdbfe;
}

/* FORM CARD / BLOQUES */
.form-card {
  background: radial-gradient(circle at top, #020617, #020617);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  padding: 18px 16px 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.95);
  margin-top: 22px;
}

.form-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

/* GRID FORM */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.form-grid-full {
  grid-column: 1 / -1;
}

label {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 2px;
  display: block;
}

input, textarea, select {
  width: 100%;
  background: #020617;
  border-radius: 10px;
  border: 1px solid rgba(55, 65, 81, 0.95);
  padding: 8px 9px;
  font-size: 13px;
  color: #e5e7eb;
}

textarea {
  resize: vertical;
  min-height: 70px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
}

/* BOTONES */
.btn {
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(120deg, #22c55e, #0ea5e9);
  color: #0b1120;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.6);
  transition: transform .18s, box-shadow .18s, filter .18s;
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 40px rgba(34, 197, 94, 0.9);
  filter: brightness(1.05);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
}

/* ALERTAS */
.alert {
  padding: 9px 11px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 13px;
}

.alert-success {
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.6);
  color: #bbf7d0;
}

.alert-error {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.7);
  color: #fecaca;
}

/* GRID DE MOTOS */
.grid-motos {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

/* Tarjeta moto */
.card-moto {
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020617);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  position: relative;
  opacity: 0;
  transform: translateY(18px) scale(.96);
}

.card-moto.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.card-moto:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 1);
  border-color: rgba(56, 189, 248, 0.8);
}

/* Imagen moto */
.card-img {
  height: 130px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.card-img-badge {
  position: absolute;
  inset: auto auto 8px 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  font-size: 11px;
  color: #e5e7eb;
}

/* Contenido */
.card-body {
  padding: 9px 10px 6px;
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.card-title h3 {
  margin: 0;
  font-size: 15px;
}

/* Estado (punto verde/rojo) */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.status-available {
  background: #22c55e;
}

.status-busy {
  background: #ef4444;
}

.status-pill.available {
  background: rgba(22, 163, 74, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.6);
}

.status-pill.busy {
  background: rgba(248, 113, 113, 0.15);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.7);
}

/* Meta */
.card-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #9ca3af;
}

.card-meta span {
  display: block;
  margin-top: 2px;
}

/* Rating */
.rating-row {
  margin-top: 6px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.stars {
  color: #fbbf24;
  font-size: 13px;
}

/* Footer tarjeta */
.card-footer {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.card-footer .btn {
  width: 100%;
  font-size: 12px;
  padding: 7px 10px;
}

/* MODAL GENERAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 100%;
  max-width: 460px;
  background: #020617;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 16px 16px 14px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.9);
  transform: translateY(16px) scale(.96);
  opacity: 0;
  transition: transform .2s, opacity .2s;
}

.modal-backdrop.show .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
}

.modal-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 20px;
  cursor: pointer;
}

.modal-body {
  font-size: 13px;
}

/* PERFIL DE USUARIO */
.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 20%, #22c55e, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  color: #0b1120;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* HISTORIAL VIAJES */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.history-item {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.9);
  font-size: 13px;
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.history-item-title {
  font-weight: 600;
}

.history-item-meta {
  font-size: 11px;
  color: #9ca3af;
}

/* FOOTER */
.footer {
  margin-top: 40px;
  padding: 15px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
  border-top: 1px solid #1f2937;
  background: #0d1117;
}
.footer a {
  color: #00d4ff;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}
.credits {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.7;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .grid-motos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card-img {
    height: 110px;
  }
}

@media (max-width: 480px) {
  .grid-motos {
    grid-template-columns: 1fr 1fr;
  }

  .card-img {
    height: 95px;
  }

  .hero h2 {
    font-size: 22px;
  }
}
