/* Paleta de Colores Admin */
:root {
  --admin-blue: #4a69bd;
  --admin-dark: #1e293b;
  --admin-bg: #f8f9fa;
  --success: #22c55e;
  --danger: #ef4444;
  --border: #e2e8f0;

  --admin-dark: #1e293b;
  --admin-blue: #3b82f6;
  --sidebar-width: 260px;
  --bg-light: #f1f5f9;
  --text-muted: #64748b;
  --danger: #ef4444;
  --success: #22c55e;
}

body {
  background-color: var(--admin-bg);
  color: var(--admin-dark);
  margin: 0;
  font-family: "Segoe UI", Roboto, sans-serif;
}

/* Barra de navegacion*/

/* Contenedor Principal */
.admin-layout-wrapper {
  display: flex;
  min-height: 100vh;
}

/* BARRA LATERAL (SIDEBAR) */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--admin-dark);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  /* Mantiene el menú fijo al hacer scroll */
  height: 100vh;
}

.sidebar-brand {
  padding: 30px 20px;
  text-align: center;
  border-bottom: 1px solid #334155;
}

.sidebar-brand h2 {
  font-size: 1.2rem;
  margin-top: 10px;
  letter-spacing: 1px;
}

.sidebar-nav {
  list-style: none;
  padding: 20px;
  flex-grow: 1;
}

.sidebar-nav li {
  margin-bottom: 8px;
}

.sidebar-nav li a {
  color: #cbd5e1;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.sidebar-nav li a i {
  width: 20px;
}

.sidebar-nav li a:hover {
  background: #334155;
  color: white;
}

.nav-spacer {
  height: 20px;
  border-top: 1px solid #334155;
  margin: 20px 0;
}

.nav-logout {
  color: #fca5a5 !important;
}

.nav-logout:hover {
  background: #7f1d1d !important;
}

/* ÁREA DE CONTENIDO */
.admin-main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  /* Deja espacio para la barra fija */
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: white;
  padding: 15px 40px;
  display: flex;
  justify-content: flex-end;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-view-port {
  padding: 40px;
}

/* Estilos para las Vistas (Cards y Tablas) */
.card-panel {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.admin-view-header {
  margin-bottom: 30px;
}

.btn-back {
  text-decoration: none;
  color: var(--admin-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* FIN BARRA DE NAVEGACION*/

/* Contenedores */
.admin-container {
  padding: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Tarjetas y Tablas */
.card-panel {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: #f1f5f9;
  padding: 15px;
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 2px solid var(--border);
}

.admin-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

/* Badges de Stock */
/* public/css/admin.css */

.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-block;
  text-align: center;
  min-width: 90px;
}

/* COMPLETADO: Verde suave */
.badge-success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* CANCELADO: Rojo suave */
.badge-danger {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* PENDIENTE: Amarillo/Naranja suave */
.badge-warning {
  background-color: #fef9c3;
  color: #854d0e;
  border: 1px solid #fef08a;
}

/* Inputs y Formularios */
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--admin-dark);
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--admin-blue);
  box-shadow: 0 0 0 3px rgba(74, 105, 189, 0.1);
}

/* Botones */
.btn-admin {
  cursor: pointer;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  transition: transform 0.1s;
}

.btn-admin:active {
  transform: scale(0.98);
}

/* Botón de Acción */
/* public/css/admin.css */

.btn-admin-sm {
  background-color: var(--admin-blue) !important;
  color: white !important;
  text-decoration: none !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-admin-sm:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.wa-link {
  color: #25d366 !important;
  font-size: 1.5rem;
  text-decoration: none !important;
  margin-left: 12px;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s;
}

.wa-link:hover {
  transform: scale(1.2) rotate(10deg);
  color: #128c7e;
}

/* Estilo para el mensaje flotante */
.toast-msg {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #166534;
  /* Verde oscuro */
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}