﻿/* ==========================================
   📦 INVENTORY VIEW (Index)
   ========================================== */

#modalCrearProducto {
    z-index: 1055;
}

/* ===============================
   HEADER
   =============================== */

.inventory-top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.inventory-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.settings-subtitle-link {
    color: #0073e6;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

    .settings-subtitle-link:hover {
        text-decoration: underline;
    }

/* Botón verde */
.inventory-primary-btn {
    background: #00c853;
    border: 1px solid #00c853;
    color: #fff;
    border-radius: 14px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: filter .2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

    .inventory-primary-btn:hover {
        filter: brightness(0.95);
    }

/* Botón blanco */
.inventory-secondary-btn {
    background: #fff;
    border: 1px solid #d0d7e2;
    color: #222;
    border-radius: 14px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

    .inventory-secondary-btn:hover {
        background: #f3f7fc;
    }

/* ===============================
   TOOLBAR
   =============================== */

.inventory-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.inventory-pricelist {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inventory-label {
    font-size: 13px;
    color: #777;
    font-weight: 600;
}

.inventory-select {
    border: 1px solid #d0d7e2;
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 14px;
    background: #fff;
    color: #222;
    min-width: 280px;
}

.inventory-active-filters {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.inventory-filters-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.inventory-filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 260px;
    background: #e8f7f1;
    border: 1px solid #ccefe0;
    color: #1b6b4b;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.10);
}

.chip-close {
    background: #f3fff9;
    border: 1px solid #bfe8d6;
    cursor: pointer;
    font-size: 14px;
    color: #1b6b4b;
    width: 34px;
    height: 34px;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.10);
}

    .chip-close:hover {
        filter: brightness(0.97);
    }

.inventory-filter-btn {
    background: #5fbec0;
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 12px 26px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
    transition: filter .15s ease;
}

    .inventory-filter-btn:hover {
        filter: brightness(0.95);
    }

.inventory-section-gap {
    margin-top: 10px;
}

/* ===============================
   PANEL BLANCO (tabla + filtros + paginación)
   =============================== */

.inventory-table-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-top: 10px;
}

/* ===============================
   FILTER BAR
   =============================== */

.inventory-filters-bar {
    display: none;
    padding: 16px 16px 12px;
    border-bottom: 1px solid #e6eaef;
    background: #ffffff;
}

    .inventory-filters-bar.open {
        display: block;
    }

.filters-bar-top {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    padding-bottom: 10px;
    font-size: 14px;
}

.filters-top-btn {
    background: none;
    border: none;
    color: #111;
    font-weight: 700;
    cursor: pointer;
}

    .filters-top-btn:hover {
        text-decoration: underline;
    }

.filters-bar-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 14px;
    align-items: center;
}

.filter-input {
    width: 100%;
    height: 40px;
    border: 1px solid #d0d7e2;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    color: #222;
    outline: none;
    background: #fff;
    box-sizing: border-box;
}

    .filter-input:focus {
        border-color: #8bb7ff;
        box-shadow: 0 0 0 3px rgba(139,183,255,0.25);
    }

.filter-select {
    height: 40px;
    border: 1px solid #d0d7e2;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background: #fff;
    color: #222;
}

/* ===============================
   TABLA
   =============================== */

.inventory-table {
    width: 100%;
    margin-top: 0;
}

    .inventory-table .col-check {
        width: 44px;
    }

    .inventory-table .col-actions {
        width: 220px;
        text-align: right;
        white-space: nowrap;
    }

.inventory-link {
    color: #0073e6;
    text-decoration: none;
    font-weight: 600;
}

    .inventory-link:hover {
        text-decoration: underline;
    }

.inventory-table tbody tr {
    border-bottom: 1px solid #e6eaef;
}

    .inventory-table tbody tr:last-child {
        border-bottom: none;
    }

.inventory-table tbody td {
    border-bottom: none !important;
}

/* ===============================
   ACCIONES: pill con íconos
   =============================== */

.actions-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #e2e6ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

    .actions-pill .settings-edit-btn,
    .actions-pill .settings-delete-btn {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        min-width: auto !important;
    }

    .actions-pill .action-icon {
        cursor: pointer;
        font-size: 16px;
        color: #666;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 10px;
        transition: background .15s ease, color .15s ease;
    }

        .actions-pill .action-icon:hover {
            background: #f3f7fc;
            color: #0073e6;
        }

    .actions-pill .action-warning:hover {
        background: #fff4d6;
        color: #9a6a00;
    }

    .actions-pill .action-danger:hover {
        background: #fff5f5;
        color: #c0392b;
    }

    .actions-pill .action-icon[disabled] {
        opacity: 0.5 !important;
        cursor: not-allowed !important;
        pointer-events: none !important;
    }

/* ===============================
   PAGINACIÓN
   =============================== */

.inventory-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 16px 18px;
    margin-top: 0;
    opacity: 1 !important;
    color: inherit !important;
}

.page-btn {
    padding: 8px 18px;
    border-radius: 12px;
    border: none;
    background: #fff;
    color: #0073e6;
    font-weight: 500;
    cursor: pointer;
    width: auto;
    height: auto;
    display: inline-flex;
    box-shadow: none;
    margin: 0;
}

    .page-btn:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.page-info {
    font-size: 13px;
    color: #555;
}

/* ===============================
   Badge (tipo de contacto, etc)
   =============================== */

.badge-info {
    background: #17a2b8;
    color: white;
}

.status-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.text-muted {
    color: #aaa;
}

/* ===============================
   RESPONSIVE: Tabla scroll horizontal en móvil
   =============================== */

@media (max-width: 980px) {
    .filters-bar-fields {
        grid-template-columns: 1fr 1fr;
    }

    .inventory-select {
        min-width: 220px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .inventory-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-input {
        max-width: 100% !important;
    }

    .card-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .simple-table {
        min-width: 600px;
    }

    .inventory-pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .simple-table th,
    .simple-table td {
        font-size: 11px;
        padding: 6px 4px;
    }
}


