/**
 * Estilos personalizados para el Sistema B2B de AnimalsCenter
 */

/* Ajustes generales */
body {
    font-family: "Signika", sans-serif;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    min-height: 100vh;
}
#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100vw;
  min-height: 100vh;
  object-fit: cover;
  z-index: -1;
}

.bg-venta{
    background-color:#0d6efd;
}

.btn-venta{
    color:white;
    background:linear-gradient(45deg, #4080df, #0d6efd);
    border-color:#0d6efd;   
}

.btn-venta:hover{
    color: white;
    background: linear-gradient(45deg, #0a5eda, #0d6efd);
    border-color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.login-card {
  background-color: rgba(255, 255, 255, 0.95); /* Fondo blanco con transparencia */
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

/* Colores personalizados */
:root {
    --primary-color: #52439b;
    --secondary-color: #004494;
    --accent-color: #ff9d00;
    --text-color: #333333;
    --light-gray: #f7f9fc;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mejoras de navegación */
.navbar-brand img {
    max-height: 50px;
}

.nav-item {
    margin-right: 5px;
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.nav-link i {
    margin-right: 5px;
}

/* Tarjetas y contenedores */
.card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: all 0.2s ease-in-out;
    border: none;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Login específico */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 0;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 0;
}

.login-header {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 12px 12px 0 0;
}

.login-body {
    padding: 2rem;
}

.login-logo {
    max-width: 80%;
    margin-bottom: 1.5rem;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.login-form .form-control {
    height: 50px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding-left: 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

.login-form .btn-login {
    height: 50px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-footer {
    text-align: center;
    padding: 1rem;
    color: #6c757d;
    font-size: 0.875rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0 0 12px 12px;
}

/* Badges y estados */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge-stock {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.badge-stock.low {
    background-color: #ffebee;
    color: #c62828;
}

.badge-stock.medium {
    background-color: #fff8e1;
    color: #ff8f00;
}

/* Tooltips y popover personalizados */
.custom-tooltip {
    position: relative;
    cursor: help;
}

.custom-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}

.custom-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent;
    z-index: 1000;
}

/* Dashboard widgets */
.stat-card {
    border-left: 4px solid;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.stat-primary {
    border-left-color: var(--primary-color);
}

.stat-card.stat-success {
    border-left-color: #0e9f6e;
}

.stat-card.stat-info {
    border-left-color: #3f83f8;
}

.stat-card.stat-warning {
    border-left-color: var(--accent-color);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Tablas */
.table-container {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-top: none;
    position: sticky;
    top: 0;
    z-index: 10;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(0, 86, 179, 0.05);
    transform: translateY(-1px);
}

.table td {
    vertical-align: middle;
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Mejoras para el responsive de tablas */
.table-responsive {
    border-radius: 8px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Paginación */
.pagination {
    margin-bottom: 0;
}

.page-item:first-child .page-link {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.page-item:last-child .page-link {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.page-link {
    color: var(--primary-color);
    padding: 0.5rem 0.8rem;
    margin: 0 2px;
    border: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 1;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.page-item.disabled .page-link {
    color: #adb5bd;
    background-color: transparent;
}

/* Botones y acciones */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
}

.btn i {
    margin-right: 0.5rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #30c451);
    border-color: #28a745;
}

.btn-success:hover {
    background: linear-gradient(45deg, #218838, #28a745);
    border-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-info {
    color: white;
    background: linear-gradient(45deg, #17a2b8, #20c1d8);
    border-color: #17a2b8;
}

.btn-info:hover {
    color: white;
    background: linear-gradient(45deg, #138496, #17a2b8);
    border-color: #117a8b;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Animaciones para botones de acción */
.btn-action {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    transition: all 0.2s ease;
}

.btn-action i {
    margin: 0;
    font-size: 0.9rem;
}

.btn-action:hover {
    transform: translateY(-2px) rotate(5deg);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Filtros y búsqueda */
.filtros-card {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.filtros-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.filtros-form .form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0.6rem 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.filtros-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.15);
}

.filtros-form .form-label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    color: var(--secondary-color);
}

.filtros-form .input-group .btn {
    z-index: 0;
}

.filtros-form .date-input {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%230056b3" class="bi bi-calendar" viewBox="0 0 16 16"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
}

/* Formularios */
.form-label {
    font-weight: 500;
}

.form-control:focus {
    border-color: #3f83f8;
    box-shadow: 0 0 0 0.25rem rgba(63, 131, 248, 0.25);
}

/* Paginación */
.pagination .page-link {
    color: #1a56db;
}

.pagination .page-item.active .page-link {
    background-color: #1a56db;
    border-color: #1a56db;
    color: #dee2e6;
}

/* Pie de página */
footer {
    border-top: 1px solid #eaeaea;
    color: #666;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Ayudantes de utilidad */
.cursor-pointer {
    cursor: pointer;
}

.font-weight-semibold {
    font-weight: 600;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 50rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
}

.status-badge.badge-success {
    background-color: #def7ec;
    color: #0e9f6e;
}

.status-badge.badge-warning {
    background-color: #feecdc;
    color: #ff5a1f;
}

.status-badge.badge-danger {
    background-color: #fde8e8;
    color: #e02424;
}
