/* Componentes custom Edebé Viáticos */
:root {
  --color-brand: #E30613;       /* Rojo Edebé oficial */
  --color-brand-dark: #B8050F;
  --color-brand-light: #FEE2E2;
  --color-sidebar: #1A1A1A;     /* Negro grafito */
}

[x-cloak] { display: none !important; }

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Scrollbars minimalistas */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Scrollbar oscuro para sidebar */
aside ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
aside ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ===== Tablas ===== */
.tbl-rg {
  @apply w-full text-sm border-separate border-spacing-0;
}
.tbl-rg thead th {
  @apply bg-slate-50 text-slate-600 font-semibold text-xs uppercase tracking-wider
         px-4 py-3 text-left border-b border-slate-200;
}
.tbl-rg tbody td {
  @apply px-4 py-3 border-b border-slate-100 text-slate-700;
}
.tbl-rg tbody tr:hover {
  background: rgba(227, 6, 19, 0.04); /* Hover rojo Edebé sutil */
}

/* ===== Badges de estatus ===== */
.badge {
  @apply inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-[11px] font-medium;
}
.badge-gray    { @apply bg-slate-100 text-slate-700; }
.badge-blue    { @apply bg-blue-100 text-blue-700; }
.badge-amber   { @apply bg-amber-100 text-amber-700; }
.badge-green   { @apply bg-green-100 text-green-700; }
.badge-red     { @apply bg-red-100 text-red-700; }
.badge-purple  { @apply bg-purple-100 text-purple-700; }
.badge-orange  { @apply bg-orange-100 text-orange-700; }

/* ===== Botones =====
   Sistema unificado: gradientes sutiles, sombra coloreada al hover, ligera
   elevación (translateY -1px), feedback "pressed" al click, ícono FA escala
   suavemente. CSS plano (sin @apply) para garantizar que funcione tanto con
   Tailwind compilado como con el Play CDN, sin depender del JIT en stylesheets
   externos. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25rem;
  border: 1px solid transparent;
  background: #fff;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out,
              background-color 150ms ease-out, background-image 150ms ease-out,
              color 150ms ease-out, border-color 150ms ease-out;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(148, 163, 184, 0.5);
}
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn:not(:disabled):active { transform: translateY(0); box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn .fa-solid, .btn .fa-regular, .btn .fa-brands { transition: transform 150ms ease-out; }
.btn:not(:disabled):hover .fa-solid,
.btn:not(:disabled):hover .fa-regular,
.btn:not(:disabled):hover .fa-brands { transform: scale(1.08); }

/* Primario — gradiente rojo Edebé con sombra branded */
.btn-primary {
  color: #fff;
  background-image: linear-gradient(135deg, #E30613 0%, #B8050F 100%);
  box-shadow: 0 1px 2px 0 rgba(227, 6, 19, 0.15), 0 1px 3px -1px rgba(0,0,0,0.1);
  border-color: transparent;
}
.btn-primary:not(:disabled):hover {
  background-image: linear-gradient(135deg, #B8050F 0%, #8E0309 100%);
  box-shadow: 0 6px 14px -3px rgba(227, 6, 19, 0.4), 0 4px 6px -4px rgba(227, 6, 19, 0.3);
}
.btn-primary:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(227, 6, 19, 0.5); }

/* Secundario — fondo blanco, borde refinado, hover suave */
.btn-secondary {
  background: #fff;
  color: #334155;
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}
.btn-secondary:not(:disabled):hover {
  background-image: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 4px 10px -3px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
}

/* Danger — rojo cálido con sombra carmesí */
.btn-danger {
  color: #fff;
  background-image: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 1px 2px 0 rgba(220, 38, 38, 0.15);
}
.btn-danger:not(:disabled):hover {
  background-image: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 6px 14px -3px rgba(220, 38, 38, 0.45);
}
.btn-danger:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(220, 38, 38, 0.5); }

/* Success — verde esmeralda */
.btn-success {
  color: #fff;
  background-image: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 1px 2px 0 rgba(5, 150, 105, 0.15);
}
.btn-success:not(:disabled):hover {
  background-image: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 14px -3px rgba(5, 150, 105, 0.45);
}
.btn-success:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(5, 150, 105, 0.5); }

/* Warning — ámbar (devolver / advertencia) */
.btn-warning {
  color: #fff;
  background-image: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 1px 2px 0 rgba(217, 119, 6, 0.15);
}
.btn-warning:not(:disabled):hover {
  background-image: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 6px 14px -3px rgba(217, 119, 6, 0.45);
}
.btn-warning:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(217, 119, 6, 0.5); }

/* Info — azul (acciones informativas / IA) */
.btn-info {
  color: #fff;
  background-image: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 1px 2px 0 rgba(37, 99, 235, 0.15);
}
.btn-info:not(:disabled):hover {
  background-image: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 6px 14px -3px rgba(37, 99, 235, 0.45);
}
.btn-info:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(37, 99, 235, 0.5); }

/* Ghost — sin fondo, hover sutil; útil para "Cancelar" / acciones terciarias */
.btn-ghost {
  background: transparent;
  color: #475569;
  border-color: transparent;
  box-shadow: none;
}
.btn-ghost:not(:disabled):hover {
  background: #f1f5f9;
  color: #0f172a;
  box-shadow: none;
  transform: none;  /* el ghost no se eleva, queda flat */
}

/* Tamaños */
.btn-sm  { padding: 0.375rem 0.75rem; font-size: 0.75rem;   gap: 0.375rem; line-height: 1rem; }
.btn-lg  { padding: 0.75rem 1.5rem;   font-size: 1rem;      gap: 0.625rem; line-height: 1.5rem; }
.btn-xs  { padding: 0.25rem 0.5rem;   font-size: 0.6875rem; gap: 0.25rem;  line-height: 0.875rem; border-radius: 0.375rem; }

/* Botón solo-ícono (cuadrado) */
.btn-icon          { padding: 0.5rem; aspect-ratio: 1 / 1; }
.btn-icon.btn-sm   { padding: 0.375rem; }

/* ===== Cards ===== */
.card {
  @apply bg-white rounded-xl border border-slate-200 shadow-sm;
}
.card-body { @apply p-6; }
.card-header { @apply px-6 py-4 border-b border-slate-200; }

/* ===== KPI cards ===== */
.kpi {
  @apply card p-4 sm:p-5 transition hover:shadow-md;
}
.kpi-icon {
  @apply w-11 h-11 rounded-xl flex items-center justify-center text-lg;
}

/* ===== Badges con emoji ===== */
.badge-emoji {
  @apply text-base mr-1 leading-none;
}

/* ===== Form inputs ===== */
.input {
  @apply w-full px-3 py-2 border border-slate-300 rounded-lg text-sm bg-white
         focus:outline-none focus:ring-2 focus:ring-brand-500/30 focus:border-brand-500;
}
.label {
  @apply block text-sm font-medium text-slate-700 mb-1;
}

/* ===== Timeline ===== */
.timeline { @apply relative; }
.timeline::before {
  content: "";
  @apply absolute left-4 top-0 bottom-0 w-0.5 bg-slate-200;
}
.timeline-item { @apply relative pl-12 pb-6; }
.timeline-dot {
  @apply absolute left-2 top-1 w-5 h-5 rounded-full ring-4 ring-white flex items-center justify-center text-[10px];
}

/* ===== Tabs ===== */
.tabs-rg {
  @apply flex gap-1 border-b border-slate-200 mb-6;
}
.tab-rg {
  @apply px-4 py-3 text-sm font-medium text-slate-600 hover:text-slate-900 border-b-2 border-transparent transition;
}
.tab-rg.active {
  @apply text-brand-600 border-brand-600;
}
