/* ===========================
   ADMIN DASHBOARD — ZENDY PRO
=========================== */

:root{
  --zendy-black: #020617;
  --zendy-dark: #0b1220;
  --zendy-blue: #0f172a;
  --zendy-green: #22c55e;
  --zendy-green-dark: #16a34a;
  --zendy-light: #0b1220;
  --zendy-text: #e5e7eb;
  --zendy-muted: #94a3b8;
}

/* ================= RESET BOOTSTRAP AZUL ================= */

.bg-primary,
.text-primary,
.btn-primary,
.border-primary{
  background: linear-gradient(135deg,var(--zendy-green),var(--zendy-green-dark)) !important;
  border: none !important;
  color:#fff !important;
}

.btn-primary:hover{
  filter: brightness(1.1);
}

/* ================= BODY ================= */

body{
  background: radial-gradient(circle at top, #0f172a, #020617);
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--zendy-text);
}

/* ================= SIDEBAR ================= */

.sidebar{
  width:260px;
  min-height:100vh;
  background: linear-gradient(180deg,#020617,#020617);
  color: var(--zendy-text);
  position:fixed;
  left:0;
  top:0;
  display:flex;
  flex-direction:column;
  border-right:1px solid rgba(255,255,255,.06);
}

/* BRAND */
.sidebar .brand{
  padding:20px;
  font-size:18px;
  font-weight:700;
  background: linear-gradient(135deg,#020617,#020617);
  border-bottom:1px solid rgba(255,255,255,.08);
}

/* USER BOX */
.sidebar .user-box{
  padding:16px 20px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.sidebar .user-box strong{
  color:#fff;
}

.sidebar .user-box small{
  font-size:12px;
  color: var(--zendy-green);
}

/* LINKS */
.sidebar a{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 22px;
  color:#cbd5e1;
  text-decoration:none;
  font-size:14px;
  transition:all .25s ease;
  border-left:3px solid transparent;
}

.sidebar a:hover{
  background: rgba(255,255,255,.05);
  color:#fff;
}

/* ACTIVE */
.sidebar a.active{
  background: linear-gradient(90deg,rgba(34,197,94,.25),transparent);
  color:#fff;
  border-left:3px solid var(--zendy-green);
}

/* LOGOUT */
.sidebar a:last-child{
  margin-top:auto;
  color:#fca5a5;
}

.sidebar a:last-child:hover{
  background:rgba(239,68,68,.15);
}

/* ================= MAIN ================= */

.main{
  margin-left:260px;
  padding:24px;
}

/* ================= TOPBAR ================= */

.topbar{
  background: linear-gradient(135deg,#020617,#0b1220);
  padding:16px 20px;
  border-radius:14px;
  margin-bottom:22px;
  box-shadow:0 10px 30px rgba(0,0,0,.5);
  border:1px solid rgba(255,255,255,.06);
}

/* ================= ERP HEADERS ================= */

.erp-header{
  background: linear-gradient(135deg,#0ea5e9,#2563eb);
  color:#fff;
  padding:16px 20px;
  border-radius:14px;
  font-weight:600;
  margin-bottom:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
}

/* ================= CARDS ================= */

.card{
  border-radius:16px;
  box-shadow:0 12px 40px rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.06);
  background:#020617;
  color:var(--zendy-text);
}

.card-header{
  background: linear-gradient(135deg,#0ea5e9,#2563eb) !important;
  color:#fff !important;
  font-weight:600;
  border-bottom:1px solid rgba(255,255,255,.08);
}

/* ================= ALERTS ================= */

.alert-danger{
  background:rgba(239,68,68,.15);
  border-left:5px solid #ef4444;
  color:#fecaca;
}

/* ================= SEMÁFORO ================= */

.progress{
  background:#020617;
  border-radius:10px;
}

.progress-bar.bg-success{
  background: linear-gradient(135deg,#22c55e,#16a34a) !important;
}

.progress-bar.bg-warning{
  background: linear-gradient(135deg,#facc15,#f59e0b) !important;
}

.progress-bar.bg-danger{
  background: linear-gradient(135deg,#ef4444,#dc2626) !important;
}

/* ================= MINI CARDS ================= */

.erp-card{
  background: linear-gradient(180deg,#020617,#020617);
  border-radius:18px;
  padding:22px;
  box-shadow:0 20px 50px rgba(0,0,0,.55);
  position:relative;
  transition:.25s;
  border:1px solid rgba(255,255,255,.06);
}

.erp-card:hover{
  transform:translateY(-6px);
  box-shadow:0 30px 70px rgba(0,0,0,.7);
}

.erp-card-icon{
  font-size:32px;
  margin-bottom:10px;
  color: var(--zendy-green);
}

.erp-card-body strong{
  font-size:16px;
  color:#f8fafc;
}

.erp-card-body small{
  color:#94a3b8;
}

.erp-card-link{
  position:absolute;
  inset:0;
}

/* ================= TABLES ================= */

.table{
  color:var(--zendy-text);
}

.table thead{
  background:#020617;
  color:#fff;
}

.table tbody tr{
  border-color:rgba(255,255,255,.06);
}

.table-hover tbody tr:hover{
  background:rgba(56,189,248,.08);
}

/* ================= SCROLL ================= */

.sidebar-menu{
  flex:1;
  overflow-y:auto;
  scrollbar-width: thin;
  scrollbar-color: var(--zendy-green) transparent;
}

.sidebar-menu::-webkit-scrollbar{
  width:6px;
}

.sidebar-menu::-webkit-scrollbar-thumb{
  background: var(--zendy-green);
  border-radius:10px;
}

.sidebar-menu::-webkit-scrollbar-track{
  background: transparent;
}

/* ================= SELECCIÓN ================= */

::selection{
  background: var(--zendy-green);
  color:#020617;
}

::-moz-selection{
  background: var(--zendy-green);
  color:#020617;
}

/* Evitar selección en UI */
.sidebar,
.erp-header,
.card,
.progress,
.erp-card{
  user-select:none;
}
/* ===============================
   FIX TABLAS Y CONTENEDORES BLANCOS
=============================== */

/* Contenedor principal */
.erp-wrapper,
.table-responsive {
  background: #020617 !important;
  border-radius: 16px;
}

/* Tabla */
.table {
  background: transparent !important;
  color: #e5e7eb;
}

/* Cabecera */
.table thead,
.table thead th {
  background: #020617 !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Filas */
.table tbody tr {
  background: transparent !important;
  border-color: rgba(255,255,255,.06);
}

/* Hover */
.table-hover tbody tr:hover {
  background: rgba(56,189,248,.08) !important;
}

/* Quitar blancos heredados */
.bg-light,
.table-light {
  background: #020617 !important;
  color: #ffffff !important;
}

/* Celdas */
.table td,
.table th {
  background: transparent !important;
  color: #e5e7eb;
}

/* Bordes */
.table-bordered > :not(caption) > * {
  border-color: rgba(255,255,255,.08);
}

/* Estados */
.badge.bg-warning {
  background: linear-gradient(135deg,#facc15,#f59e0b) !important;
  color:#020617 !important;
}

.badge.bg-success {
  background: linear-gradient(135deg,#22c55e,#16a34a) !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg,#ef4444,#dc2626) !important;
}

/* Fila anulada (opcional, elegante) */
.table-danger {
  background: rgba(239,68,68,.15) !important;
}
/* ===============================
   FIX SCROLL GENERAL (NO ROMPE HEADER)
=============================== */

html, body {
  height: 100%;
  overflow: hidden;
}

/* Área principal con scroll */
.main {
  height: 100vh;
  overflow-y: auto;
  padding-bottom: 40px;
}

/* Scroll suave */
.main {
  scroll-behavior: smooth;
}

/* Mantener sidebar fijo */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
}
/* ===============================
   SIDEBAR USER ERP
=============================== */
.sidebar-user{
  padding: 25px 15px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-user .avatar{
  width: 90px;
  height: 90px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #1e88e5;
}

.sidebar-user .avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user .user-info strong{
  display:block;
  color:#fff;
  font-size:15px;
}

.sidebar-user .role{
  font-size:12px;
  color:#9ecbff;
}
/* ===============================
   SIDEBAR - HEADER ADMIN (PRO)
=============================== */

.sidebar{
  background: linear-gradient(180deg,#0b1220,#0f172a);
}

.brand{
  font-size: 18px;
  font-weight: 700;
  padding: 18px 20px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* bloque usuario */
.sidebar-user{
  padding: 30px 15px 25px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* avatar grande como ERP */
.sidebar-user .avatar{
  width: 110px;
  height: 110px;
  margin: 0 auto 12px;
  border-radius: 50%;
  overflow: hidden;
  background: #0b1220;
  border: 4px solid #1e88e5;
  box-shadow: 0 0 0 4px rgba(30,136,229,.15);
}

.sidebar-user .avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* nombre */
.sidebar-user .user-info strong{
  display:block;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-top: 6px;
}

/* rol */
.sidebar-user .role{
  display:block;
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: .4px;
  color: #9ecbff;
}

/* menú más separado del header */
.sidebar-menu{
  padding-top: 12px;
}

/* links */
.sidebar-menu a{
  padding: 12px 20px;
  font-size: 14px;
  color: #cfd8ff;
}

.sidebar-menu a.active,
.sidebar-menu a:hover{
  background: linear-gradient(90deg,#1e88e5,#1565c0);
  color:#fff;
  border-radius: 8px;
  margin: 0 8px;
}

/* botón salir */
.logout{
  margin: 15px;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  background:#1a2236;
  color:#ffb4b4;
}

.logout:hover{
  background:#2a344d;
}
.sidebar-menu a.active{
  position: relative;
}

.sidebar-menu a.active::before{
  content:'';
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:4px;
  background:#22c55e;
  border-radius:0 4px 4px 0;
}
/* ===============================
   TIPOGRAFÍA ERP
=============================== */
body{
  font-family:'Inter','Segoe UI',sans-serif;
}

/* ===============================
   MENÚ SIDEBAR PROFESIONAL
=============================== */
.sidebar-menu a{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 20px;
  font-size:14px;
  font-weight:500;
  color:#cfd8e3;
  transition:.15s ease;
}

.sidebar-menu a i{
  width:18px;
  text-align:center;
  font-size:15px;
  color:#b6c2d9;
}

.sidebar-menu a:hover,
.sidebar-menu a.active{
  background:rgba(255,255,255,.06);
  color:#ffffff;
  border-radius:8px;
  margin:0 8px;
}

.sidebar-menu a.active i,
.sidebar-menu a:hover i{
  color:#ffffff;
}

/* ===============================
   USUARIO
=============================== */
.sidebar-user strong{
  font-size:15px;
  font-weight:600;
}

.sidebar-user .role{
  font-size:12px;
  color:#9aa9c4;
}

/* ===============================
   LOGOUT
=============================== */
.logout{
  display:flex;
  align-items:center;
  gap:10px;
  margin:15px;
  padding:10px;
  border-radius:8px;
  color:#ffb4b4;
}

.logout:hover{
  background:#2a344d;
}
.reporte-card{
  max-width: 500px;
  background: #0f172a;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  color: #e5e7eb;
}
.reporte-card h2{
  text-align: center;
  margin-bottom: 20px;
}
.reporte-card label{
  display: block;
  margin-bottom: 6px;
}
.reporte-card input{
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  margin-bottom: 20px;
}
.reporte-card button{
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #dc2626;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.reporte-card button:hover{
  background: #b91c1c;
}
/* ===== DASHBOARD STYLE COMO LA IMAGEN ===== */

.dashboard-container{
  background: radial-gradient(circle at top, #0f172a, #020617);
  padding: 40px 30px;
  border-radius: 18px;
}

.dashboard-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap:24px;
}

.dashboard-card{
  background:#ffffff;
  border-radius:16px;
  padding:22px 16px;
  text-align:center;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  transition:.25s ease;
  position:relative;
}

.dashboard-card:hover{
  transform:translateY(-6px);
  box-shadow:0 16px 40px rgba(0,0,0,.35);
}

/* icono */
.dashboard-card i{
  font-size:42px;
  color:#2563eb;
  margin-bottom:12px;
}

/* titulo */
.dashboard-card strong{
  display:block;
  font-size:15px;
  font-weight:600;
  color:#111827;
}

/* subtitulo */
.dashboard-card small{
  display:block;
  font-size:12px;
  color:#6b7280;
  margin-top:2px;
}

/* link ocupa toda la card */
.dashboard-card a{
  position:absolute;
  inset:0;
}/* ===============================
   DASHBOARD MODO CLARO (como la imagen blanca)
=============================== */

.dashboard-container{
  background: #f5f6f8 !important;
}

.dashboard-grid{
  gap:20px;
}

.dashboard-card{
  background:#ffffff !important;
  border:1px solid #e5e7eb;
  box-shadow:0 2px 6px rgba(0,0,0,.08);
}

.dashboard-card i{
  color:#111827 !important; /* iconos negros */
}

.dashboard-card strong{
  color:#111827 !important;
}

.dashboard-card small{
  color:#6b7280 !important;
}

/* quitar efecto oscuro del body SOLO en dashboard */
.erp-wrapper{
  background:#ffffff !important;
}
/* HEADER NEGRO */
.erp-header{
  background: #020617 !important;   /* negro */
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
/* ===============================
   MODO CLARO PARA TABLAS (FACTURAS)
=============================== */

/* fondo general */
body{
  background:#f5f6f8 !important;
  color:#111827 !important;
}

/* contenedor */
.erp-wrapper{
  background:#ffffff !important;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
}

/* tabla */
.table{
  background:#ffffff !important;
  color:#111827 !important;
}

/* encabezado tabla */
.table thead,
.table thead th{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border-bottom:1px solid #e5e7eb;
}

/* filas */
.table tbody tr{
  background:#ffffff !important;
  color:#111827 !important;
}

/* hover */
.table-hover tbody tr:hover{
  background:#f9fafb !important;
}

/* celdas */
.table td,
.table th{
  background:#ffffff !important;
  color:#111827 !important;
}

/* textos secundarios */
small, span{
  color:#374151 !important;
}

/* quitar colores oscuros heredados */
.bg-dark,
.table-dark{
  background:#ffffff !important;
  color:#111827 !important;
}

/* inputs y buscador */
.form-control{
  background:#ffffff !important;
  color:#111827 !important;
  border:1px solid #d1d5db;
}

/* botones mantener color */
.btn-success, .btn-danger, .btn-warning{
  color:#fff !important;
}
/* ===============================
   SIDEBAR NEGRA + TEXTO BLANCO
=============================== */

/* fondo sidebar */
.sidebar{
  background: #000000 !important;
  color: #ffffff !important;
  border-right: 1px solid rgba(255,255,255,.1);
}

/* header marca */
.sidebar .brand{
  background: #000000 !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

/* usuario */
.sidebar-user{
  background:#000000 !important;
}

.sidebar-user .user-info strong,
.sidebar-user .role{
  color:#ffffff !important;
}

/* links */
.sidebar-menu a{
  color:#ffffff !important;
}

/* iconos */
.sidebar-menu a i{
  color:#ffffff !important;
}

/* hover */
.sidebar-menu a:hover{
  background: rgba(255,255,255,.08) !important;
  color:#ffffff !important;
}

/* activo */
.sidebar-menu a.active{
  background: rgba(255,255,255,.12) !important;
  color:#ffffff !important;
  border-left:4px solid #22c55e;
}

/* botón salir */
.logout{
  background:#111111 !important;
  color:#ffffff !important;
}

.logout:hover{
  background:#222222 !important;
}

/* scrollbar verde */
.sidebar-menu::-webkit-scrollbar-thumb{
  background:#22c55e;
}
/* ===============================
   FORZAR TEXTOS BLANCOS EN HEADERS
=============================== */

/* barra superior (Boletas, Facturas, etc) */
.erp-header{
  color: #ffffff !important;
}

/* icono del header */
.erp-header i{
  color:#ffffff !important;
}

/* títulos de secciones */
.section-title{
  color:#ffffff !important;
}

/* títulos generales */
h1, h2, h3, h4, h5, h6{
  color:#ffffff !important;
}

/* textos dentro del header oscuro */
.erp-header span,
.erp-header strong{
  color:#ffffff !important;
}

/* buscador */
.form-control::placeholder{
  color:#cbd5e1;
}
/* ===============================
   HEADER NEGRO + CONTENIDO BLANCO
=============================== */

/* BARRA SUPERIOR (Facturas, Boletas, Clientes, etc) */
.erp-header,
.topbar{
  background: #020617 !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

/* texto del header */
.erp-header *,
.topbar *{
  color:#ffffff !important;
}

/* botón dentro del header */
.erp-header .btn{
  color:#ffffff !important;
}

/* CONTENEDOR DE LA TABLA Y FORMULARIOS */
.erp-wrapper{
  background:#ffffff !important;
  color:#111827 !important;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
}

/* tabla clara */
.table{
  background:#ffffff !important;
  color:#111827 !important;
}

.table thead th{
  background:#f3f4f6 !important;
  color:#111827 !important;
}

/* filas */
.table tbody tr{
  background:#ffffff !important;
}

/* hover */
.table-hover tbody tr:hover{
  background:#f9fafb !important;
}

/* inputs */
.form-control{
  background:#ffffff !important;
  color:#111827 !important;
  border:1px solid #d1d5db;
}
/* ===============================
   SIDEBAR TRANSLÚCIDO (GLASS EFFECT)
=============================== */

.sidebar{
  background: rgba(0,0,0,0.55) !important; /* negro translúcido */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-right: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 0 20px rgba(0,0,0,.6);
}

/* BRAND */
.sidebar .brand{
  background: rgba(0,0,0,0.4) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.15);
}

/* USER BOX */
.sidebar-user{
  background: rgba(255,255,255,0.05) !important;
  backdrop-filter: blur(10px);
  border-radius: 12px;
  margin: 10px;
}

/* AVATAR */
.sidebar-user .avatar{
  background: rgba(255,255,255,0.1) !important;
  backdrop-filter: blur(6px);
  border: 3px solid rgba(34,197,94,.7);
  box-shadow: 0 0 0 4px rgba(34,197,94,.15);
}

/* LINKS */
.sidebar-menu a{
  background: transparent !important;
  color:#ffffff !important;
  border-radius: 10px;
  margin: 4px 8px;
  transition: all .25s ease;
}

/* HOVER */
.sidebar-menu a:hover{
  background: rgba(255,255,255,.12) !important;
}

/* ACTIVE */
.sidebar-menu a.active{
  background: rgba(34,197,94,.18) !important;
  border-left: 4px solid #22c55e;
}

/* LOGOUT */
.logout{
  background: rgba(255,255,255,.08) !important;
  backdrop-filter: blur(8px);
  border-radius: 10px;
}

.logout:hover{
  background: rgba(255,255,255,.15) !important;
}

/* SCROLLBAR */
.sidebar-menu::-webkit-scrollbar{
  width:6px;
}
.sidebar-menu::-webkit-scrollbar-thumb{
  background: rgba(34,197,94,.8);
  border-radius:10px;
}

/* HEADER SUPERIOR TRANSLÚCIDO */
.erp-header,
.topbar{
  background: rgba(0,0,0,0.65) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.1);
  color:#fff !important;
}


