:root{
    --bg:#F7F7FB;/*Fondo general*/
    --surface:#FFFFFF;/*Fondo de los componentes*/
    --primary:#3E5C42;
    --primary-dark:#4B3FCB;
    --primary-soft:#E9F0EA;/*Fondo cuadros, tabla encabezado*/
    --mint:#00D9B5;/*9BBE4A   00D9B5 Color contraste botones y borde tarjetas del movil*/
    --text:#1F2136;
    --text-muted:#8A8DA0;
    --border:#ECEBF5;
    --shadow: 0 10px 30px -12px rgba(62,92,66,.25);
    --topbar-h: 68px;


    --azul:#0D6EFD;/*Color placa en aves*/    
    --celeste:#0DCAF0;/*Macho*/
    --rosado:#D63384;/*Hembra*/
    --verde:#198754;/*Estado: Vivo*/
    --rojo:#DC3545;/*Estado: Muerto*/
    --gris:#6C757D;/*Estado:  Descarte*/
    --azulos:#0242A2;/*Estado: Vendido*/
    --morado:#6F42C1;/*Estado:  Mona/Chata*/
    --naranja:#FD7E14;/*Estado: Shop*/
    --verdecl:#0EED86;/*Estado: Prestado*/
    --verdoso:#9FED0E;/*Estado: Obsequio*/
    --amarillo:#FFFF07;/*Estado: Garantia*/    

    --hover-bg:rgba(0,217,181,.10);/* Al pasar el mouse o hacer clic en tablas y tarjetas */    
    --hover-shadow:rgba(0,217,181,.35);/* Sombra al hacer hover */

    --report:#7C3AED;/*Boton Color Reporte Naranja=F59E0B*/
    --report-light:#A78BFA;/*Boton Color Reporte Naranja=FBBF24*/

    /*Reportes de Inventario*/
    --report-success:#22c55e;
    --report-info:#3b82f6;
    --report-warning:#f59e0b;
    --report-danger:#ef4444;
    --report-morado:#7C3AED;

  }

  *{ box-sizing:border-box; }

  body{
    margin:0;
    font-family:'Inter', sans-serif;
    background:var(--bg);
    color:var(--text);
    -webkit-font-smoothing:antialiased;
  }

  .text-justify{
    text-align: justify;
  }

  .brand{ font-family:'Space Grotesk', sans-serif; font-weight:700; letter-spacing:-.02em; }
  a{ text-decoration:none; }

  /* ===================== TOP BAR (full width) ===================== */
  .topbar{
    position: sticky;
    top:0;
    z-index: 1030;
    height: var(--topbar-h);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 1rem;
    padding: 0 1.25rem;
    background: rgba(247,247,251,.75);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid var(--border);
  }

  /*.logo-mark{
    width:36px; height:36px;
    border-radius:10px;
    background: linear-gradient(135deg, var(--primary), var(--mint));
    display:flex; align-items:center; justify-content:center;
    color:#fff; font-size:1.05rem;
    box-shadow: var(--shadow);
    flex-shrink:0;
  }*/

  .logo-mark{
    width:60px;
    height:60px;
    background:#fff;
    border-radius:18px;
    padding:8px;
    box-shadow:0 8px 20px rgba(62,92,66,.18);
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .logo-mark img{
      width:100%;
      height:100%;
      object-fit:contain;
      transition:.3s;
  }

  .logo-mark:hover img{
      transform:scale(1.08);
  }

  .topbar-title{ font-size:1.1rem; white-space:nowrap; }
  .topbar-title span{ color:var(--primary); }

  /* --- Desktop horizontal nav (center) --- */
  .desktop-nav{
    display:none;
    align-items:center;
    gap:.25rem;
    background: var(--surface);
    border:1px solid var(--border);
    border-radius: 999px;
    padding:.3rem;
    margin: 0 auto;
  }
  @media (min-width: 992px){ .desktop-nav{ display:flex; } }

  .dnav-item{
    position:relative;
    display:flex; align-items:center; gap:.45rem;
    padding: .5rem 1rem;
    border-radius:999px;
    border:none; background:transparent;
    font-size:.85rem; font-weight:600;
    color:var(--text-muted);
    cursor:pointer;
    white-space:nowrap;
    transition: color .2s ease;
  }
  .dnav-item i{ font-size:1rem; transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
  .dnav-item .dpill{
    position:absolute; inset:0; border-radius:999px;
    background: var(--primary-soft);
    opacity:0; transform:scale(.85);
    transition: opacity .25s ease, transform .25s cubic-bezier(.34,1.56,.64,1);
    z-index:-1;
  }
  .dnav-item:hover{ color:var(--text); }
  .dnav-item:hover .dpill{ opacity:1; transform:scale(1); }
  .dnav-item.active{ color:var(--primary); }
  .dnav-item.active .dpill{ opacity:1; transform:scale(1); }
  .dnav-item.active i{ transform: translateY(-1px) scale(1.05); }

  .dnav-item .badge-dot{
    position:absolute; top:2px; right:6px;
    width:7px; height:7px; border-radius:50%;
    background:#FF6B6B; border:1.5px solid var(--surface);
  }

  /* --- "Más" dropdown (desktop) --- */
  .dmore-wrap{ position:relative; }
  .dmore-panel{
    position:absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px) scale(.96);
    width: 300px;
    background: var(--surface);
    border:1px solid var(--border);
    border-radius:18px;
    box-shadow: 0 18px 44px -12px rgba(31,33,54,.2);
    padding: .75rem;
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:.4rem;
    opacity:0; visibility:hidden;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    z-index:1040;
  }
  .dmore-wrap.show .dmore-panel{
    opacity:1; visibility:visible; transform: translateX(-50%) translateY(0) scale(1);
  }
  .dmore-opt{
    display:flex; flex-direction:column; align-items:center; gap:.35rem;
    border:none; background:transparent;
    padding:.6rem .3rem; border-radius:14px;
    font-size:.7rem; font-weight:600; color:var(--text);
    transition: background .18s ease, transform .18s ease;
  }
  .dmore-opt i{
    font-size:1.15rem; color:var(--primary);
    width:38px; height:38px; border-radius:12px;
    background:var(--primary-soft);
    display:flex; align-items:center; justify-content:center;
  }
  .dmore-opt:hover{ background:var(--bg); transform: translateY(-2px); }

  /* --- profile trigger (shared) --- */
  .profile-trigger{ position:relative; flex-shrink:0; }
  .avatar-btn{
    width:42px; height:42px; border-radius:50%; padding:0;
    border: 2px solid var(--surface);
    outline: 2px solid transparent;
    background: linear-gradient(135deg, #FFD166, #FF7A7A);
    display:flex; align-items:center; justify-content:center;
    cursor:pointer;
    transition: outline-color .25s ease, transform .25s ease;
    overflow:hidden;
  }
  .avatar-btn img{ width:100%; height:100%; object-fit:cover; }
  .avatar-btn:hover, .avatar-btn:focus-visible{ outline-color: var(--primary-soft); transform: scale(1.05); }
  .status-dot{
    position:absolute; bottom:0; right:0;
    width:11px; height:11px; border-radius:50%;
    background:var(--mint); border:2px solid var(--surface);
  }
  .profile-menu{
    position:absolute; top: calc(100% + 12px); right:0; width: 230px;
    background: var(--surface); border-radius: 16px; border:1px solid var(--border);
    box-shadow: 0 18px 40px -10px rgba(31,33,54,.18); padding: .5rem;
    opacity:0; visibility:hidden;
    transform: translateY(-8px) scale(.97); transform-origin: top right;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
    z-index: 1040;
  }
  .profile-trigger:hover .profile-menu,
  .profile-trigger:focus-within .profile-menu,
  .profile-trigger.show .profile-menu{ opacity:1; visibility:visible; transform: translateY(0) scale(1); }
  .profile-menu .pm-head{ display:flex; gap:.6rem; align-items:center; padding:.6rem .6rem .8rem; border-bottom:1px solid var(--border); margin-bottom:.35rem; }
  .profile-menu .pm-head img{ width:38px; height:38px; border-radius:50%; object-fit:cover; }
  .pm-name{ font-weight:600; font-size:.88rem; line-height:1.1;overflow-wrap:break-word;word-break:break-word; }
  .pm-email{ font-size:.75rem; color:var(--text-muted);white-space:normal;overflow-wrap:break-word;word-break:break-word; }
  .pm-item{
    display:flex; align-items:center; gap:.65rem; padding:.55rem .6rem; border-radius:10px;
    font-size:.86rem; color:var(--text); transition: background .15s ease, padding-left .15s ease;
  }
  .pm-item i{ font-size:1rem; color:var(--primary); width:18px; text-align:center; }
  .pm-item:hover{ background: var(--primary-soft); padding-left:.8rem; color:var(--text); }
  .pm-item.danger, .pm-item.danger i{ color:#E5484D; }
  .pm-item.danger:hover{ background:#FDEDED; }

  /* mobile-only avatar quick actions button next to it (hidden on desktop) */
  .mobile-only{ display:inline-flex; }
  @media (min-width: 992px){ .mobile-only{ display:none !important; } }
  .desktop-only{ display:none; }
  @media (min-width: 992px){ .desktop-only{ display:inline-flex; } }

  /* ===================== LAYOUT / CONTENT ===================== */
  .page{ max-width: 1300px; margin: 0 auto; padding: 1.5rem 1.25rem 6.5rem; }
  @media (min-width: 992px){ .page{ padding-bottom: 2.5rem; } }

  .hello-card{
    background: linear-gradient(135deg, var(--primary), #8B7CFF);
    border-radius: 22px; padding: 1.75rem;
    color:#fff; box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap;
  }
  .hello-card h4{ font-family:'Space Grotesk',sans-serif; margin-bottom:.35rem; }
  .hello-card p{ opacity:.85; font-size:.9rem; margin-bottom:0; max-width: 460px; }
  .hello-card .cta{
    background:#fff; color:var(--primary-dark); border:none;
    padding:.65rem 1.3rem; border-radius:999px; font-weight:700; font-size:.85rem;
    transition: transform .2s ease;
  }
  .hello-card .cta:hover{ transform: translateY(-2px); }

  .stat-card{
    background:var(--surface); border:1px solid var(--border); border-radius:18px;
    padding:1.1rem; height:100%;
    transition: transform .2s ease, box-shadow .2s ease;
  }
  .stat-card:hover{ transform: translateY(-3px); box-shadow: 0 14px 30px -14px rgba(31,33,54,.18); }
  .stat-card .ic{
    width:42px; height:42px; border-radius:12px;
    display:flex; align-items:center; justify-content:center;
    background:var(--primary-soft); color:var(--primary); font-size:1.1rem; margin-bottom:.7rem;
  }
  .stat-card .val{ font-family:'Space Grotesk',sans-serif; font-size:1.5rem; font-weight:700; }
  .stat-card .lbl{ font-size:.8rem; color:var(--text-muted); }
  .stat-card .delta{ font-size:.75rem; font-weight:700; color:var(--mint); }

  .panel-card{
    background:var(--surface); border:1px solid var(--border); border-radius:18px;
    padding:1.25rem; height:100%;
  }
  .panel-card h6{ font-family:'Space Grotesk',sans-serif; margin-bottom:1rem; }
  .row-item{
    display:flex; align-items:center; gap:.75rem;
    padding:.6rem 0; border-bottom:1px solid var(--border);
  }
  .row-item:last-child{ border-bottom:none; }
  .row-item .ic{
    width:38px; height:38px; border-radius:10px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center;
    background:var(--primary-soft); color:var(--primary);
  }
  .row-item .t{ font-weight:600; font-size:.87rem; }
  .row-item .s{ font-size:.76rem; color:var(--text-muted); }

  /* ===================== BOTTOM NAV (mobile only) ===================== */
  .bottom-dock-wrap{
    position: fixed;
    left:0; right:0; bottom: 0;
    z-index: 1030;
    padding: 0 .7rem calc(env(safe-area-inset-bottom, 0) + .7rem);
    pointer-events:none;
  }
  @media (min-width: 992px){ .bottom-dock-wrap{ display:none; } }

  .bottom-dock{
    pointer-events:auto; position:relative;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border); border-radius: 22px;
    box-shadow: 0 14px 34px -10px rgba(31,33,54,.22);
    padding: .45rem; display:flex; align-items:center; justify-content:space-between; gap:.15rem;
    max-width: 480px; margin: 0 auto;
  }

  .nav-item{
    position:relative; flex:1; display:flex; flex-direction:column;
    align-items:center; justify-content:center; gap:.15rem;
    padding: .5rem .2rem; border:none; background:transparent;
    color:var(--text-muted); border-radius:16px; font-size:.64rem; font-weight:600;
    cursor:pointer; transition: color .25s ease, transform .18s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-item i{ font-size:1.25rem; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
  .nav-item .pill{
    position:absolute; inset: 0; border-radius:16px; background: var(--primary-soft);
    transform: scale(.6); opacity:0;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s ease; z-index:-1;
  }
  .nav-item.active{ color:var(--primary); }
  .nav-item.active .pill{ transform: scale(1); opacity:1; }
  .nav-item.active i{ transform: translateY(-2px) scale(1.08); }
  .nav-item:active i{ transform: scale(.85); }

  .nav-item.fab{ color:#fff; }
  .nav-item.fab .ic-wrap{
    width:46px; height:46px; border-radius:50%;
    background: linear-gradient(135deg, var(--primary), var(--mint));
    display:flex; align-items:center; justify-content:center;
    box-shadow: 0 10px 22px -6px rgba(108,92,231,.55);
    margin-top:-22px; transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  }
  .nav-item.fab:active .ic-wrap{ transform: scale(.88) rotate(90deg); }
  .nav-item.fab span{ margin-top:2px; color:var(--text-muted); }
  .nav-item .badge-dot{
    position:absolute; top:6px; right: 18%; width:7px; height:7px; border-radius:50%;
    background:#FF6B6B; border:1.5px solid var(--surface);
  }

  .more-panel{
    pointer-events:auto; max-height:0; opacity:0; overflow:hidden;
    max-width:480px; margin: 0 auto;
    transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .3s ease, margin-top .35s ease;
  }
  .more-panel.open{ max-height: 600px; opacity:1; margin-top:.6rem; }
  .more-panel-inner{
    background: var(--surface); border:1px solid var(--border); border-radius:20px;
    box-shadow: 0 14px 34px -10px rgba(31,33,54,.18); padding: .9rem;
    display:grid; grid-template-columns: repeat(4, 1fr); gap:.6rem;
  }
  .more-opt{
    display:flex; flex-direction:column; align-items:center; gap:.35rem;
    border:none; background:transparent; padding:.5rem .2rem; border-radius:14px;
    font-size:.64rem; font-weight:600; color:var(--text);
    transition: background .18s ease, transform .18s ease;
    opacity:0; transform: translateY(10px); animation: popIn .35s ease forwards;
  }
  .more-opt i{
    font-size:1.15rem; color:var(--primary); width:38px; height:38px; border-radius:12px;
    background:var(--primary-soft); display:flex; align-items:center; justify-content:center;
  }
  .more-opt:hover{ background:var(--bg); transform: translateY(-2px); }
  .more-panel.open .more-opt:nth-child(1){ animation-delay:.05s; }
  .more-panel.open .more-opt:nth-child(2){ animation-delay:.10s; }
  .more-panel.open .more-opt:nth-child(3){ animation-delay:.15s; }
  .more-panel.open .more-opt:nth-child(4){ animation-delay:.20s; }
  .more-panel.open .more-opt:nth-child(5){ animation-delay:.25s; }
  .more-panel.open .more-opt:nth-child(6){ animation-delay:.30s; }
  .more-panel.open .more-opt:nth-child(7){ animation-delay:.35s; }
  .more-panel.open .more-opt:nth-child(8){ animation-delay:.40s; }
  @keyframes popIn{ to{ opacity:1; transform:translateY(0); } }

  @media (prefers-reduced-motion: reduce){
    *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
  }

  /* ===================== MODERN TABLE ===================== */

.table-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 30px -15px rgba(31,33,54,.12);
}

.table-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:1rem 1.25rem;
  border-bottom:1px solid var(--border);
}

.table-header h6{
  margin:0;
  font-family:'Space Grotesk',sans-serif;
}

.nova-table{
  width:100%;
  border-collapse:collapse;
}

.nova-table thead{
  background:var(--primary-soft);
}

.nova-table th{
  padding:1rem;
  font-size:.8rem;
  font-weight:700;
  color:var(--primary);
  text-transform:uppercase;
  letter-spacing:.5px;
}

.nova-table td{
  padding:1rem;
  font-size:.9rem;
  border-top:1px solid var(--border);
}

.nova-table tbody tr{
  transition:.2s ease;
}

.nova-table tbody tr:hover{
  background:#fafaff;
}

.user-info{
  display:flex;
  align-items:center;
  gap:.75rem;
}

.user-avatar{
  width:40px;
  height:40px;
  border-radius:50%;
  object-fit:cover;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  padding:.35rem .75rem;
  border-radius:999px;
  font-size:.75rem;
  font-weight:600;
}

.status-active{
  background:#E9FFF8;
  color:#00A884;
}

.status-pending{
  background:#FFF8E7;
  color:#C88900;
}

.status-inactive{
  background:#FFEAEA;
  color:#D64545;
}

.action-btn{
  width:36px;
  height:36px;
  border:none;
  border-radius:10px;
  background:var(--primary-soft);
  color:var(--primary);
  transition:.2s;
}

.action-btn:hover{
  transform:translateY(-2px);
  background:var(--primary);
  color:white;
}

/* ===================== MOBILE CARDS ===================== */

@media(max-width:768px){

  .nova-table thead{
    display:none;
  }

  .nova-table,
  .nova-table tbody,
  .nova-table tr,
  .nova-table td{
    display:block;
    width:100%;
  }

  .nova-table tr{
    background:white;
    border:1px solid var(--border);
    border-radius:14px;
    margin-bottom:1rem;
    padding:.85rem 1rem;
    box-shadow:0 8px 20px -15px rgba(31,33,54,.15);
  }

  .nova-table td{
    display:flex;
    flex-direction:column;      /* clave: etiqueta arriba, valor(es) debajo */
    align-items:flex-start;
    text-align:left;
    border:none;
    border-bottom:1px solid var(--border);
    padding:.6rem 0;
  }

  .nova-table td:last-child{
    border-bottom:none;
    padding-bottom:0;
  }

  .nova-table td::before{
    content:attr(data-label);
    font-size:.72rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.4px;
    color:var(--primary);
    margin-bottom:.35rem;
  }

  /* Si una celda trae varios datos (imagen, badges, texto con <br>)
     quedan uno debajo del otro, ya ordenados */
  .nova-table td > img{
    margin-bottom:.3rem;
  }

  .nova-table td.text-center{
    align-items:center;
    text-align:center;
  }

  /* Fila de acciones: botones en línea y centrados, sin etiqueta */
  .nova-table td[data-label="Acciones"]{
    flex-direction:row;
    justify-content:center;
    gap:.5rem;
  }

  .nova-table td[data-label="Acciones"]::before{
    display:none;
  }
}

.nova-btn-primary{
    display:flex;
    align-items:center;
    gap:.6rem;
    border:none;
    padding:.75rem 1.25rem;
    border-radius:14px;
    font-size:.85rem;
    font-weight:700;
    color:#fff;

    background:linear-gradient(
        135deg,
        var(--primary),
        var(--mint)
    );

    box-shadow:
        0 10px 25px -8px rgba(108,92,231,.45);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.nova-btn-primary:hover{
    transform:translateY(-3px);
    box-shadow:
        0 16px 30px -8px rgba(108,92,231,.55);
}

.nova-btn-primary:active{
    transform:scale(.97);
}

.nova-btn-primary i{
    font-size:1rem;
}

.nova-btn-report{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:.6rem;
    border:none;
    padding:.75rem 1.25rem;
    border-radius:14px;
    font-size:.85rem;
    font-weight:700;
    color:#fff;
    background:linear-gradient(
        135deg,
        var(--report),
        var(--report-light)
    );
    box-shadow:
        0 10px 25px -8px rgba(37,99,235,.35);
    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.nova-btn-report:hover{
    transform:translateY(-3px);
    box-shadow:
        0 16px 30px -8px rgba(37,99,235,.50);
}

.nova-btn-report:active{
    transform:scale(.97);
}

.nova-btn-report i{
    font-size:1rem;
}



/* ==========================
   NOVA DATATABLE
========================== */

.dataTables_wrapper{
    padding:1rem;
}

.dataTables_filter input{
    border:1px solid var(--border) !important;
    border-radius:12px !important;
    padding:.55rem .8rem !important;
    background:white;
}

.dataTables_filter input:focus{
    box-shadow:none !important;
    border-color:var(--primary) !important;
}

.dataTables_length select{
    border-radius:12px !important;
    border:1px solid var(--border) !important;
}

table.dataTable{
    margin-top:1rem !important;
    border-collapse:separate !important;
    border-spacing:0 10px !important;
}

table.dataTable thead th{
    border:none !important;
    background:var(--primary-soft);
    color:var(--primary);
    font-size:.8rem;
    text-transform:uppercase;
    letter-spacing:.5px;
    font-weight:700;
}

table.dataTable tbody tr{
    background:white;
    box-shadow: 0 8px 20px -15px rgba(31,33,54,.15);
}

table.dataTable tbody td{
    border-top:none !important;
    padding:1rem !important;
    vertical-align:middle;
}

/* Hover Tabla al pasar el mouse*/
table.dataTable tbody tr:hover td{
    background: var(--hover-bg) !important;
}

.dataTables_paginate .paginate_button{
    border-radius:10px !important;
    margin:0 3px !important;
}

.page-item.active .page-link{
    background:var(--primary);
    border-color:var(--primary);
}

.page-link{
    color:var(--primary);
    border:none;
}

.page-link:hover{
    background:var(--primary-soft);
    color:var(--primary);
}

/* Responsive */

@media(max-width:768px){

    .dataTables_wrapper .row{
        gap:1rem;
    }

    .dataTables_filter{
        width:100%;
    }

    .dataTables_filter input{
        width:100% !important;
        margin-left:0 !important;
    }

}



/*==================================================
LOGIN
==================================================*/

.login-body{
    min-height:100vh;
}

.login-overlay{
    width:100%;
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:25px;
    /*background:rgba(20,20,20,.35);Oscurecer Fondo*/
}

.login-card{
    width:100%;
    max-width:400px;
    background:rgba(255,255,255,.90);
    backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.25);
    border-radius:24px;
    padding:28px 32px;
    box-shadow:0 20px 50px rgba(0,0,0,.18);
    animation:loginIn .75s cubic-bezier(.175,.885,.32,1.15);
    transform-origin:center;
}

/*Efecto de animación Login Card*/
@keyframes loginIn{
    0%{
        opacity:0;
        transform:translateY(40px) scale(.92);
        filter:blur(8px);
    }

    60%{
        opacity:1;
        transform:translateY(-8px) scale(1.02);
        filter:blur(0);
    }

    100%{
        opacity:1;
        transform:translateY(0) scale(1);
        filter:blur(0);
    }

}

.login-logo{
    display:flex;
    justify-content:center;
    margin-bottom:15px;
}

.login-logo img{
    width:170px;
    animation:logoIn .9s ease .25s both;
}

/*Animación del logo*/
@keyframes logoIn{
    from{
        opacity:0;
        transform:scale(.7) rotate(-8deg);
    }

    to{
        opacity:1;
        transform:scale(1) rotate(0);
    }
}

.login-card h2{
    text-align:center;
    font-family:'Space Grotesk',sans-serif;
    color:var(--primary);
    margin-bottom:5px;
    animation:fadeUp .7s ease .35s both;
}

.login-card p{
    text-align:center;
    color:var(--text-muted);
    margin-bottom:35px;
    animation:fadeUp .7s ease .35s both;
}

.nova-input{
    position:relative;
    margin-bottom:15px;
    animation:fadeUp .6s ease .45s both;
}

.nova-input i{
    position:absolute;
    left:18px;
    top:50%;
    transform:translateY(-50%);
    color:var(--primary);
    font-size:18px;
}

.nova-input input{
    width:100%;
    height:48px;
    border:1px solid var(--border);
    border-radius:14px;
    padding-left:50px;
    padding-right:15px;
    font-size:.95rem;
    background:#fff;
    transition:all .25s ease;
}

.nova-input input:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(62,92,66,.10);
}

.nova-input:focus-within i{
    color:var(--mint);
}

.login-btn{
  width:100%;
  justify-content:center;
  height:48px;
  border-radius:14px;
  margin-top:5px;
  font-size:.95rem;
  animation:fadeUp .6s ease .65s both;
}

.nova-alert{
    margin-top:18px;
    border-radius:12px;
    padding:12px 15px;
    font-size:.85rem;
    border:none;
}

.nova-alert.success{
    background:#E9F8EE;
    color:#2E7D32;
}

.nova-alert.danger{
    background:#FDECEC;
    color:#C62828;
}

.nova-alert.warning{
    background:#FFF8E1;
    color:#B26A00;
}

.nova-alert h6{
    margin-bottom:.35rem;
    font-family:'Space Grotesk',sans-serif;
}

.nova-alert i{
    opacity:.9;
}

.nova-alert .btn-close{
    font-size:.8rem;
}

@media(max-width:576px){
    .login-card{
        padding:30px 22px;
    }
    .login-logo img{
        width:130px;
    }
}

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(18px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}

/*==================================================
QUITAR COLOR AZUL DE LOS ENLACES
==================================================*/
.stat-card a{
    color:inherit;
    text-decoration:none;
    font-weight:600;
}

.stat-card a:hover{
    color:inherit;
    text-decoration:underline;
}


/*==================================================
ICONOS DASHBOARD
==================================================*/
.svg-icon{
    width:90%;
    height:90%;
    object-fit:contain;
    transition:.3s ease;
}

/*.stat-card:hover .svg-icon{
    transform:scale(1.15);
}*Movimiento iconos de dashboard*/

.svg-icon{
    filter: brightness(0) saturate(100%)
            invert(28%) sepia(17%) saturate(652%)
            hue-rotate(76deg)
            brightness(95%)
            contrast(92%);
}


/*==================================================
IMAGENES TABLA REPRODUCTOR
==================================================*/
.img-column{
    width:100px !important;
    min-width:100px;
    max-width:100px;
    text-align:center;
}

.img-column img{
    width:80px;
    height:80px;
    object-fit:cover;
    border-radius:10px;
}


/*==================================================
BADGES
==================================================*/
.badge-pill{
    display:inline-block;
    padding:.45em .80em;
    font-size:.75rem;
    font-weight:700;
    line-height:1;
    text-align:center;
    white-space:nowrap;
    vertical-align:middle;
    border-radius:50rem;
    transition:.2s ease-in-out;
}

.badge-custom{
    display:inline-block;
    padding:.45em .80em;
    font-size:.75rem;
    font-weight:700;
    line-height:1;
    border-radius:5px;   /* Solo esquinas redondeadas */
}

.badge-azul{
    background:var(--azul);
    color:#fff;
}

.badge-celeste{
    background:var(--celeste);
    color:#fff;
}

.badge-rosado{
    background:var(--rosado);
    color:#fff;
}

.badge-verde{
    background:var(--verde);
    color:#fff;
}

.badge-rojo{
    background:var(--rojo);
    color:#fff;
}

.badge-gris{
    background:var(--gris);
    color:#fff;
}

.badge-azulos{
    background:var(--azulos);
    color:#fff;
}

.badge-morado{
    background:var(--morado);
    color:#fff;
}

.badge-naranja{
    background:var(--naranja);
    color:#fff;
}

.badge-verdecl{
    background:var(--verdecl);
    color:#fff;
}

.badge-verdoso{
    background:var(--verdoso);
    color:#fff;
}

.badge-amarillo{
    background:var(--amarillo);
    color:#fff;
}



/*==================================================
VISOR DE GALLOS
==================================================*/
.thumbnail2 {
  max-width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  display: block;
  margin-left: 0;
}

@media (min-width: 768px) {
  .thumbnail2 {
    width: 100%;
  }
}

.thumbnail2:hover {
    transform: scale(1.1);
    cursor: pointer;
}

#imageModal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

#imageModal img {
    max-width: 80%;
    max-height: 80%;
}

#imageModal span {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}





/*=====================================================
REPORTES DE ENTRENAMIENTO
=====================================================*/
.report-card{
    padding:1.5rem;
    border-bottom:1px solid var(--border);
    background:#fff;
}

.report-title{
    display:flex;
    align-items:center;
    gap:.6rem;
    margin-bottom:1.2rem;
    font-weight:700;
    color:var(--primary);
    font-size:1rem;
}

.report-box{
    border:1px solid var(--border);
    border-radius:16px;
    padding:1.25rem;
    background:#fafafa;
    height:100%;
    transition:.25s;
}

.report-box:hover{
    border-color:var(--primary);
    box-shadow:0 8px 20px -15px rgba(0,0,0,.12);
}

.report-box h6{
    font-weight:700;
    margin-bottom:1rem;
    color:var(--primary);
}

.report-box label{
    font-weight:600;
    font-size:.85rem;
    margin-bottom:.4rem;
}

.report-box input{
    border-radius:12px;
}

@media(max-width:768px){
    .report-card{
        padding:1rem;
    }
}













/*====================================================
=            SELECT2 ESTILO BOOTSTRAP 5              =
====================================================*/
.select2-container{
    width:100% !important;
}

.select2-container--default .select2-selection--single{
    height:37px !important;             /* mismo alto que los input */
    min-height:37px;
    border:1px solid #ced4da !important;
    border-radius:6px !important;
    background:#fff;
    display:flex !important;
    align-items:center;
    padding:0 .85rem;
    transition:.25s;
}

.select2-container--default .select2-selection__rendered{
    line-height:35px !important;
    padding-left:0 !important;
    color:#212529;
    font-size:1rem;
}

.select2-container--default .select2-selection__placeholder{
    color:#6c757d;
}

.select2-container--default .select2-selection__arrow{
    height:35px !important;
    right:12px !important;
}

.select2-container--default.select2-container--focus
.select2-selection--single{
    border-color:var(--primary) !important;
    box-shadow:0 0 0 .25rem rgba(62,92,66,.15) !important;
}

.select2-dropdown{
    border-radius:16px !important;
    border:1px solid #ced4da !important;
    overflow:hidden;
}

.select2-search__field{
    border-radius:10px !important;
}

.select2-results__option{
    padding:.7rem 1rem;
}






/* ===================== TARJETAS RESULTADOS (MÓVIL) ===================== */
/* ===================== PARA CELULAR ===================== */

.mobile-only-cards{
  display:none;
}

@media(max-width:768px){
  #table_id, #table_id1, #table_id2, #table_id3, #table_id4, #table_id5, #table_id6{
    display:none;
  }
  .mobile-only-cards{
    display:block;
  }
}

.result-card{
  background:var(--surface);
  border:2px solid var(--mint);
  border-radius:16px;
  padding:1rem 1.1rem;
  margin-bottom:1rem;
  width:100%;
  box-sizing:border-box;
  box-shadow:0 8px 20px -15px rgba(31,33,54,.15);
  transition:
        background .25s ease,
        border-color .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
  cursor:pointer;
}

.result-card:hover{
    background:var(--hover-bg);
    border-color:var(--mint);
    transform:translateY(-3px);
    box-shadow:
        0 14px 30px -14px var(--hover-shadow);
}

.result-card .rc-row{
  display:flex;
  align-items:flex-start;
  gap:.75rem;
  padding:.6rem 0;
  border-bottom:1px solid var(--border);
}

.result-card .rc-row:last-child{
  border-bottom:none;
}

.result-card .rc-label{
  flex:0 0 38%;
  max-width:38%;
  font-size:.72rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.4px;
  color:var(--primary);
}

.result-card .rc-value{
  flex:1 1 62%;
  font-size:.88rem;
  color:var(--text);
  word-break:break-word;
  text-align:left;
}

/* si el valor tiene <br>, deja un pequeño espacio entre líneas */
.result-card .rc-value br{
  content:"";
  display:block;
  margin-top:.35rem;
}

.result-card .rc-value img{
  width:60px;
  height:60px;
  object-fit:cover;
  border-radius:10px;
  display:block;
  margin-bottom:.35rem;
}

.result-card .rc-actions{
  display:flex;
  justify-content:center;
  gap:.6rem;
  padding-top:.85rem;
}



/*=====================================
CARD RESUMEN UNIVERSAL
=====================================*/
.summary-card{
    /* Variables (colores por defecto) */
    --summary-color1:#22c55e;
    --summary-color2:#16a34a;
    --summary-shadow:rgba(34,197,94,.25);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:1.5rem;
    margin-bottom:1.5rem;
    border-radius:22px;
    background:linear-gradient(
        135deg,
        var(--summary-color1),
        var(--summary-color2)
    );
    color:#fff;
    box-shadow:
        0 15px 35px var(--summary-shadow);
    overflow:hidden;
    position:relative;
}

.summary-card::after{
    content:"";
    position:absolute;
    right:-30px;
    top:-30px;
    width:140px;
    height:140px;
    border-radius:50%;
    background:rgba(255,255,255,.08);
}

.summary-icon{
    width:90px;
    height:90px;
    border-radius:50%;
    background:rgba(255,255,255,.15);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:2.6rem;
    backdrop-filter:blur(6px);
}

.summary-info{
    text-align:right;
    z-index:2;
}

.summary-info small{
    display:block;
    text-transform:uppercase;
    letter-spacing:1px;
    font-size:.9rem;
    opacity:.9;
}

.summary-info h2{
    margin:.15rem 0;
    font-size:2.4rem;
    font-weight:700;
}

.summary-info span{
    opacity:.9;
    font-size:.9rem;
}

/* COLORES */
.summary-success{
    --summary-color1:#22c55e;
    --summary-color2:#16a34a;
    --summary-shadow:rgba(34,197,94,.30);
}

.summary-danger{
    --summary-color1:#ef4444;
    --summary-color2:#dc2626;
    --summary-shadow:rgba(239,68,68,.30);
}

.summary-warning{
    --summary-color1:#f59e0b;
    --summary-color2:#d97706;
    --summary-shadow:rgba(245,158,11,.30);
}

.summary-primary{
    --summary-color1:var(--primary);
    --summary-color2:var(--primary-dark);
    --summary-shadow:rgba(62,92,66,.28);
}

.summary-info-card{
    --summary-color1:#0ea5e9;
    --summary-color2:#0284c7;
    --summary-shadow:rgba(14,165,233,.30);
}

@media(max-width:768px){
  .summary-card{
    flex-direction:column;
    text-align:center;
    gap:18px;
  }

  .summary-info{
    text-align:center;
  }
}




/*=====================================
CARD INVENTARIO
=====================================*/
.table-card{
    background: var(--surface);
    border:1px solid var(--border);
    border-radius:24px;
    padding:2rem;
    margin:1.8rem;
    box-shadow:0 18px 40px rgba(31,33,54,.08);
}

@media(max-width:768px){
  .table-card{
    margin:1rem;
    padding:1.2rem;
  }
}

.report-widget{
    background:var(--surface);
    border-radius:22px;
    padding:1.6rem;
    border:1px solid var(--border);
    box-shadow:0 15px 35px rgba(0,0,0,.06);
    transition:.30s;
    position:relative;
    overflow:hidden;
    height:100%;
}

.report-widget:hover{
    transform:translateY(-8px);
    box-shadow:0 20px 45px rgba(0,0,0,.12);
}

.report-widget::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:5px;
    background:var(--report-color);
}

.report-success{
    --report-color:var(--report-success);
}

.report-info{
    --report-color:var(--report-info);
}

.report-warning{
    --report-color:var(--report-warning);
}

.report-danger{
    --report-color:var(--report-danger);
}

.report-morado{
    --report-color:var(--report-morado);
}

.report-widget-icon{
    width:75px;
    height:75px;
    margin:auto;
    margin-bottom:18px;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:2rem;
    background:color-mix(in srgb,var(--report-color) 15%,white);
    color:var(--report-color);
    transition:.3s;
}

.report-widget:hover .report-widget-icon{
    transform:rotate(12deg) scale(1.1);
}

.report-widget-body{
    text-align:center;
}

.report-widget-body h6{
    font-weight:700;
    color:var(--text);
    margin-bottom:.5rem;
}

.report-widget-value{
    font-size:2.3rem;
    font-weight:800;
    color:var(--report-color);
    margin-bottom:.2rem;
}

.report-widget-body small{
    display:block;
    color:var(--text-muted);
    margin-bottom:1.2rem;
}

@media(max-width:768px){
.report-widget{
    padding:1.3rem;
}

.report-widget-value{
    font-size:2rem;
}
}






/*=====================================
TABS PARA CONFIGURACIÓN
=====================================*/
#configTabs{
    gap:.6rem;
    flex-wrap:wrap;
}

#configTabs .nav-link{
    border:1px solid var(--border);
    background:var(--surface);
    color:var(--text);
    border-radius:14px;
    padding:.75rem 1.3rem;
    font-weight:600;
    transition:.25s;
}

#configTabs .nav-link:hover{
    background:var(--primary-soft);
    color:var(--primary);
    border-color:var(--primary);
    transform:translateY(-2px);
}

#configTabs .nav-link.active{
    background:linear-gradient(135deg,var(--primary),var(--primary-dark));
    color:#fff;
    border-color:transparent;
    box-shadow:0 10px 25px rgba(62,92,66,.25);
}

.tab-content{
    margin-top:1.5rem;
}





/*=====================================
SHOP
=====================================*/
.shop-card{
    transition:.35s;
    border-radius:22px;
}

.shop-card:hover{
    transform:translateY(-8px);
    box-shadow:0 20px 45px rgba(0,0,0,.15);
}

.shop-img{
    width:100%;
    height:320px;
    object-fit:cover;
    cursor:pointer;
    transition:.35s;
}

.shop-img:hover{
    transform:scale(1.08);
}




.shop-logo{
    width:350px;
    max-width:90%;
    transition:.35s;
    filter:drop-shadow(0 15px 30px rgba(0,0,0,.18));
}

.shop-logo:hover{
    transform:scale(1.06);
}

.shop-title{
    font-size:2.6rem;
    font-weight:800;
    letter-spacing:1px;
}





/* =========================================
   DATATABLES - FILAS ALTERNADAS
   ========================================= */
#table_id tbody tr:nth-child(odd) {
    background-color: var(--surface) !important;
}
#table_id tbody tr:nth-child(even) {
    background-color: var(--primary-soft) !important;
}
/* Las celdas deben ser transparentes
   para que se vea el color de la fila */
#table_id tbody tr td {
    background-color: transparent !important;
}
#cardsContainer .result-card:nth-child(odd) {
    background-color: var(--surface) !important;
}

#cardsContainer .result-card:nth-child(even) {
    background-color: var(--primary-soft) !important;
}




/* =========================================================
   MODAL PUBLICIDAD
========================================================= */
.publicidad-modal .modal-dialog {
    transition: transform .35s ease;
}
.publicidad-modal .modal-content {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface);
    box-shadow:
        0 25px 70px rgba(31, 33, 54, .30);
}
/* ================= HEADER ================= */
.publicidad-header {
    border: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(
        135deg,
        var(--primary),
        #56765b
    );
    color: #fff;
}
.publicidad-header .modal-title {
    font-weight: 700;
    font-size: 1.05rem;
}
.publicidad-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: .9;
}
.publicidad-header .btn-close:hover {
    opacity: 1;
}
/* ================= BODY ================= */
.publicidad-body {
    padding: 0;
    background: #000;
    position: relative;
}
/* ================= IMAGEN ================= */
.publicidad-imagen {
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: contain;
    display: block;
}
/* ================= LINK ================= */
.publicidad-link {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: pointer;
}
.publicidad-link .publicidad-imagen {
    transition:
        transform .5s ease,
        filter .5s ease;
}
.publicidad-link:hover .publicidad-imagen {
    transform: scale(1.025);
    filter: brightness(.75);
}
/* ================= OVERLAY ================= */
.publicidad-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: rgba(31, 33, 54, .35);
    transition: opacity .3s ease;
    pointer-events: none;
}
.publicidad-link:hover .publicidad-overlay {
    opacity: 1;
}
.publicidad-overlay span {
    padding: .75rem 1.25rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, .95);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,.20);
}
/* ================= FOOTER ================= */
.publicidad-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: .9rem 1.25rem;
}
.publicidad-footer .btn {
    border-radius: 12px;
    font-weight: 600;
    padding: .6rem 1rem;
}
/* ================= ANIMACIÓN ================= */
.publicidad-modal.show .modal-content {
    animation: publicidadEntrada .45s cubic-bezier(.34,1.56,.64,1);
}
@keyframes publicidadEntrada {
    0% {
        opacity: 0;
        transform: scale(.85) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
/* ================= MOBILE ================= */
@media (max-width: 575.98px) {
    .publicidad-modal .modal-dialog {
        margin: .75rem;
    }
    .publicidad-modal .modal-content {
        border-radius: 18px;
    }
    .publicidad-header {
        padding: .85rem 1rem;
    }
    .publicidad-header .modal-title {
        font-size: .95rem;
    }
    .publicidad-imagen {
        max-height: 70vh;
    }
    .publicidad-footer {
        padding: .75rem;
        gap: .5rem;
    }
    .publicidad-footer .btn {
        flex: 1;
    }
}






/* =========================================
   CARRUSEL DE USUARIOS
========================================= */

.usuarios-carrusel {
    width: 100%;
    overflow: hidden;
    padding: 15px 0;
    position: relative;
}

.usuarios-track {
    display: flex;
    width: max-content;
    gap: 18px;
    animation: moverUsuarios 60s linear infinite;
}

.usuario-item {
    flex: 0 0 auto;
    width: 90px;
    text-align: center;
}

.usuario-item img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary);
    background: var(--surface);
    padding: 3px;
    box-shadow: 0 8px 20px rgba(31,33,54,.15);
    transition: transform .3s ease;
}

.usuario-item:hover img {
    transform: scale(1.12);
}

.usuario-info {
    margin-top: 6px;
    font-size: .65rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Movimiento infinito */
@keyframes moverUsuarios {

    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

}

/* Pausar al colocar el mouse */
.usuarios-carrusel:hover .usuarios-track {
    animation-play-state: paused;
}

/* =========================================
   MÓVIL
========================================= */

@media (max-width: 576px) {

    .usuarios-carrusel {
        padding: 10px 0;
    }

    .usuarios-track {
        gap: 12px;
        animation-duration: 60s;
    }

    .usuario-item {
        width: 75px;
    }

    .usuario-item img {
        width: 60px;
        height: 60px;
    }

    .usuario-info {
        font-size: .58rem;
    }

}