/* ===== Mi Gestor de Facturas – Custom Styles ===== */

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

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
}

/* ── Loader ── */
.loader-ring {
  display: inline-block;
  width: 56px;
  height: 56px;
  border: 5px solid #e0e7ff;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Animaciones de entrada ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeIn 0.3s ease both; }

/* ── Tabla ── */
.invoice-table tbody tr:hover { background: #eef2ff40; }

/* ── Badge estado ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
}
.badge-green  { background: #dcfce7; color: #16a34a; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-gray   { background: #f1f5f9; color: #94a3b8; }
.badge-red    { background: #fee2e2; color: #dc2626; }

/* ── Botones ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4f46e5;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover  { background: #4338ca; }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #4f46e5;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: 14px;
  border: 1.5px solid #c7d2fe;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-outline:hover { background: #eef2ff; }

.btn-drive {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1a73e8;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(26,115,232,0.35);
}
.btn-drive:hover   { background: #1558b0; box-shadow: 0 6px 20px rgba(26,115,232,0.4); }
.btn-drive.connected { background: #1e8e3e; box-shadow: 0 4px 14px rgba(30,142,62,0.35); }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
  animation: fadeIn 0.2s ease both;
}

.modal-card {
  background: #fff;
  border-radius: 2rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.18);
  position: relative;
  animation: fadeIn 0.25s ease both;
}

/* ── Drive Files Panel ── */
.drive-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  transition: background 0.15s;
  cursor: pointer;
}
.drive-file-item:hover { background: #f1f5f9; }

/* ── Número de resumen ── */
.stat-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #f1f5f9;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 100;
  background: #1e293b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 14px 22px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: fadeIn 0.3s ease both;
  max-width: 340px;
}
.toast.success { background: #16a34a; }
.toast.error   { background: #dc2626; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .stat-card { padding: 20px; }
  .modal-card { padding: 1.5rem; border-radius: 1.5rem; }
}
