/* Carforros - styles.css */

/* ── Inputs ──────────────────────────────────────────────── */
.input-field {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  background: white;
  color: #1e293b;
}
.input-field:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.12);
}
.input-sm {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.625rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  outline: none;
  background: white;
  color: #1e293b;
  transition: border-color 0.15s;
}
.input-sm:focus { border-color: #667eea; }

.label-sm {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.25rem;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.badge-pendiente  { background:#fef3c7; color:#92400e; }
.badge-enviado    { background:#dbeafe; color:#1e40af; }
.badge-entregado  { background:#d1fae5; color:#065f46; }
.badge-novedad    { background:#fee2e2; color:#991b1b; }
.badge-carro      { background:#ede9fe; color:#4c1d95; }
.badge-moto       { background:#fce7f3; color:#9d174d; }

/* ── Cards de ventas ─────────────────────────────────────── */
.venta-card {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s;
}
.venta-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* ── Modales ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.modal-box {
  background: white;
  border-radius: 1.25rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  padding: 0.875rem 1.25rem;
  border-radius: 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  animation: toastIn 0.3s ease;
  max-width: calc(100vw - 2.5rem);
}
@keyframes toastIn {
  from { transform: translateX(80px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.toast-success { background: #10b981; color: white; }
.toast-error   { background: #ef4444; color: white; }
.toast-warn    { background: #f59e0b; color: white; }
.toast-info    { background: #667eea; color: white; }

/* ── Nav activo ──────────────────────────────────────────── */
.nav-btn.active {
  background: rgba(255,255,255,0.2) !important;
  border-left: 3px solid white;
}

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 1rem; height: 1rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
}
.empty-state i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }

/* ── Responsive sidebar ──────────────────────────────────── */
@media (max-width: 767px) {
  #viewApp { display: flex; flex-direction: column; }
}


/* Tabs de ventas */
#ventasTabs button { transition: all .15s; }
#ventasTabs button.tab-active {
  background: white;
  color: #667eea;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
