/* Fondo general */
body {
    background: #f8f9fc;
    font-family: 'Poppins', sans-serif;
}

/* Navbar con gradiente y sombra suave */
.navbar {
    background: linear-gradient(90deg, #6a11cb, #2575fc);
    border: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.navbar .nav-profile-text p {
    color: #fff !important;
    font-weight: 600;
}

/* Sidebar con glassmorphism */
.sidebar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease-in-out;
}

/* Perfil en el sidebar */
.nav-profile {
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-profile-image img {
    border-radius: 50%;
    border: 3px solid #6a11cb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.widget-card {
    border: none;
    border-radius: 1rem;
    padding: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.widget-card .icon-bg {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 6rem;
    opacity: 0.15;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

.widget-value {
    font-size: 1rem;
    font-weight: 700;
}

/* Colores gradiente */
.bg-sales {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.bg-purchases {
    background: linear-gradient(135deg, #2196f3, #21cbf3);
}

.bg-repairs {
    background: linear-gradient(135deg, #56ab2f, #a8e063);
}

.report-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.report-card .card-header {
    background: linear-gradient(135deg, #3f51b5, #2196f3);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 1.5rem;
}

.report-card .table thead {
    background: #f4f6f9;
}

.report-card .table tbody tr:hover {
    background: #f9f9f9;
}

.filter-card {
    border-radius: 0.75rem;
    background: #fff;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.filter-card h5 {
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.card-glow {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-glow:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Headers con gradientes modernos */
.bg-gradient-primary {
    background: linear-gradient(135deg, #4e73df, #224abe);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #1cc88a, #0f9d58);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f6c23e, #f39c12);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #36b9cc, #117a8b);
}

/* Ajustes del header */
.card-header {
    padding: 14px 18px;
    font-weight: 600;
    font-size: 16px;
    border: none;
}

.card-header i {
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

/* ==========================
   Bootstrap Buttons Override
   ========================== */

/* Primary */
.btn-primary {
    color: #fff !important;
    background: linear-gradient(135deg, #2196f3, #21cbf3) !important;
    border: none !important;
    transition: 0.3s ease-in-out;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1976d2, #2196f3) !important;
}

/* Success */
.btn-success {
    color: #fff !important;
    background: linear-gradient(135deg, #56ab2f, #a8e063) !important;
    border: none !important;
    transition: 0.3s ease-in-out;
}

.btn-success:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

/* Danger */
.btn-danger {
    color: #fff !important;
    background: linear-gradient(135deg, #f00000, #dc281e) !important;
    border: none !important;
    transition: 0.3s ease-in-out;
}

.btn-danger:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

/* Warning */
.btn-warning {
    color: #fff !important;
    background: linear-gradient(135deg, #f7971e, #ffd200) !important;
    border: none !important;
    transition: 0.3s ease-in-out;
}

.btn-warning:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

/* Info */
.btn-info {
    color: #fff !important;
    background: linear-gradient(135deg, #2196f3, #21cbf3) !important;
    border: none !important;
    transition: 0.3s ease-in-out;
}

.btn-info:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

/* Dark */
.btn-dark {
    color: #fff !important;
    background: linear-gradient(135deg, #232526, #414345) !important;
    border: none !important;
    transition: 0.3s ease-in-out;
}

.btn-dark:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

/* Secondary */
.btn-secondary {
    color: #fff !important;
    background: linear-gradient(135deg, #757f9a, #d7dde8) !important;
    border: none !important;
    transition: 0.3s ease-in-out;
}

.btn-secondary:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

/* Light */
.btn-light {
    color: #333 !important;
    background: linear-gradient(135deg, #fdfbfb, #ebedee) !important;
    border: 1px solid #ddd !important;
    transition: 0.3s ease-in-out;
}

.btn-light:hover {
    filter: brightness(0.95);
    transform: translateY(-2px);
}


/* ========== Selects ========== */
select.form-control-sm {
    background-color: #fff;
    appearance: none;
    padding: 10px 12px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='10' height='10' viewBox='0 0 20 20' fill='%23666'%3E%3Cpath d='M5.516 7.548a.625.625 0 0 1 .885 0L10 11.147l3.598-3.599a.625.625 0 0 1 .884.884l-4.04 4.04a.625.625 0 0 1-.884 0l-4.04-4.04a.625.625 0 0 1 0-.884z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

/* Eliminar el borde por defecto de Bootstrap */
.form-control {
    border: 1px solid #ccc;
    /* Agregar un borde sutil */
    border-radius: 4px;
    /* Bordes redondeados */
    background-color: #fff;
    padding: 9px 11px;
    font-size: 14px;
    color: #333;
}

/* Agregar el borde de color al enfocar el campo, al estilo de Material Design */
.form-control:focus {
    border-color: #6200ea;
    /* Color morado de Material Design */
    box-shadow: 0 1px 5px rgba(98, 0, 234, 0.2);
    /* Sombra sutil */
}

/* Opcional: si quieres que el borde tenga un color sutil por defecto */
.form-control::placeholder {
    color: #9e9e9e;
}

/* Categorías estilo pill */
.category-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: #f5f6fa;
    margin: 2px;
    transition: all 0.3s ease;
}

.category-pill:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Marcas */
.marca-link {
    text-decoration: none;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: #f5f6fa;
    margin: 2px;
    transition: all 0.3s ease;
}

.marca-link:hover {
    background: #f0f2f5;
    color: #007bff;
}

/* Cards uniformes */
.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    transition: all 0.3s ease;
    height: 100%;
    /* fuerza a ocupar todo el alto en su grid */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Imagen con tamaño fijo y centrada */
.product-img {
    width: 100%;
    height: 200px;
    /* altura fija para todas */
    object-fit: contain;
    /* mantiene proporción */
    object-position: center;
    /* centra vertical y horizontal */
    padding: 10px;
    /* margen interno para que no se corte */
    background: #f9f9f9;
    /* fondo neutro */
    border-bottom: 1px solid #eee;
}

/* Contenido del card */
.overlay {
    padding: 12px;
    text-align: center;
    flex-grow: 1;
    /* empuja contenido hacia abajo */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Título */
.product-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    min-height: 40px;
    /* asegura mismo espacio en todas */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Precio */
.product-price {
    font-size: 15px;
    font-weight: bold;
    color: #007bff;
    margin: 8px 0;
}

/* Badge de stock */
.badge-stock {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
}


/* Botones degradados */
.btn-gradient-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: #fff;
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    color: #fff;
}

.btn-gradient-danger {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    border: none;
    color: #fff;
}

.btn-gradient-danger:hover {
    background: linear-gradient(135deg, #e63e62, #d43c2a);
    color: #fff;
}

/* ===== Fuente general ===== */
body,
.modal,
.table {
    font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    color: #333;
}

/* ===== MODAL ===== */
.modal-content {
    border-radius: 14px !important;
    border: none !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
}

.modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: #111827;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

/* Botones modernos */
.modal-footer .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: .45rem 1.2rem;
    border: none;
    transition: all 0.2s ease-in-out;
}

.modal-footer .btn-primary {
    background: #3b82f6;
}

.modal-footer .btn-primary:hover {
    background: #2563eb;
}

.modal-footer .btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.modal-footer .btn-secondary:hover {
    background: #d1d5db;
}

/* ===== TABLA PROFESIONAL ===== */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.table thead {
    background: #f9fafb;
}

.table thead th {
    font-weight: 600;
    text-align: left;
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.table tbody tr {
    transition: background 0.2s ease-in-out;
}

.table tbody tr:hover {
    background: #f3f4f6;
}

.table td {
    padding: 14px 16px;
    font-size: 0.9rem;
    color: #4b5563;
    border-top: 1px solid #f1f1f1;
}

/* Bordes redondeados arriba */
.table thead th:first-child {
    border-top-left-radius: 12px;
}
.table thead th:last-child {
    border-top-right-radius: 12px;
}

/* Bordes redondeados abajo */
.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}
.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.fab-btn {
    position: fixed;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    z-index: 1050;

    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: #3b82f6; /* azul moderno */
    color: #fff;
    font-size: 1.4rem;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.25s ease-in-out;
    cursor: pointer;
}

.fab-btn:hover {
    background: #2563eb;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
    transform: translateY(-50%) scale(1.05);
}

.fab-btn:active {
    transform: translateY(-50%) scale(0.95);
}

