/* =========================
   RESET + BASE
========================= */
* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  margin: 0;
  padding: 24px;
  background: #f4f6f9;
  color: #2c3e50;
}

h1,
h2 {
  margin-top: 0;
}

/* =========================
   NAV / LINKS
========================= */
a {
  text-decoration: none;
  color: #3498db;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   CARDS
========================= */
.card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 24px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* =========================
   TABLES
========================= */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

thead {
  background: #2c3e50;
  color: #fff;
}

th,
td {
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

tbody tr:nth-child(even) {
  background: #f8f9fa;
}

tbody tr:hover {
  background: #eef3f7;
}

/* =========================
   BUTTONS
========================= */
button {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.btn-primary {
  background: #3498db;
  color: #fff;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
}

.btn-success {
  background: #2ecc71;
  color: #fff;
}

.btn-warning {
  background: #f39c12;
  color: #fff;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================
   INPUTS
========================= */
input,
select {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 13px;
}

/* =========================
   BADGES
========================= */

.badge-admin {
  background: #8e44ad;
  color: #fff;
}

.badge-operador {
  background: #7f8c8d;
  color: #fff;
}

/* =========================
   STATUS
========================= */
.status-active {
  color: #2ecc71;
  font-weight: 600;
}

.status-inactive {
  color: #e74c3c;
  font-weight: 600;
}

/* =========================
   FEEDBACK
========================= */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #2c3e50;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   PEDIDO DETALLE
============================ */

.pedido-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.pedido-grid .total {
  font-size: 1.1rem;
  color: #0f172a;
}

/* ============================
   BADGES DE STATUS
============================ */

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-paid {
  background: #dcfce7;
  color: #166534;
}

.badge-ready_to_ship {
  background: #e0f2fe;
  color: #075985;
}



/* ============================
   ENVÍO CARD
============================ */

#envioInfo {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  max-width: 500px;
}


/* ===== Loader ===== */
.loader {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #555;
}

.loader.hidden {
  display: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #ddd;
  border-top: 3px solid #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-paid {
  background: #e6f7ed;
  color: #1f9254;
}

.status-pending {
  background: #fff7e6;
  color: #b26a00;
}

.status-cancelled {
  background: #fdecea;
  color: #b42318;
}

.status-fulfilled {
  background: #e6f0ff;
  color: #1d4ed8;
}