/* ==================================
   PAGE LAYOUT
================================== */

.provider-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 25px 35px 40px;
    background: #f5f7fb;
    box-sizing: border-box;
}

.provider-products-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* ==================================
   HEADER
================================== */

.provider-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.provider-products-header h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: #0d2c54;
    line-height: 1.1;
}

.provider-products-header p {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}
.product-status-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}


/* ==================================
   ADD BUTTON
================================== */

.provider-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 26px;
    background: #4b73f4;
    color: #fff !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    min-width: 180px;
    transition: all .2s ease;
}

.provider-add-button:hover {
    background: #355ee1;
    color: #fff !important;
}

/* ==================================
   TABLE WRAPPER
================================== */

.provider-products-table-wrapper {
    width: 100%;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #dfe5ec;
    overflow: visible;
    border: none;
    box-shadow: 0 2px 14px rgba(0,0,0,.05);
}

/* ==================================
   TABLE
================================== */

.provider-products-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.provider-products-table th {
    padding: 22px 18px;
    text-align: left;
    background: #fff;
    color: #0d2c54;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid #e6ebf1;
}

.provider-products-table td {
    padding: 20px 18px;
    font-size: 15px;
    color: #0d2c54;
    border-bottom: 1px solid #eef2f6;
    vertical-align: middle;
}

.provider-products-table th,
.provider-products-table td {
    border-right: 1px solid #eef2f6;
}

.provider-products-table th:last-child,
.provider-products-table td:last-child {
    border-right: none;
}

.provider-products-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==================================
   IMAGE
================================== */

.provider-products-table img {
    width: 70px;
    height: 55px;
    object-fit: cover;
    border-radius: 6px;
}

/* ==================================
   DESCRIPTION
================================== */

.provider-product-description {
    line-height: 1.6;
    color: #475569;
}

/* ==================================
   COLUMN SIZES
================================== */

.provider-products-table th:nth-child(1),
.provider-products-table td:nth-child(1) {
    width: 120px;
}

.provider-products-table th:nth-child(2),
.provider-products-table td:nth-child(2) {
    width: 200px;
}

.provider-products-table th:nth-child(3),
.provider-products-table td:nth-child(3) {
    width: 130px;
}

.provider-products-table th:nth-child(4),
.provider-products-table td:nth-child(4) {
    width: 150px;
}

.provider-products-table th:nth-child(5),
.provider-products-table td:nth-child(5) {
    width: 110px;
}

.provider-products-table th:nth-child(6),
.provider-products-table td:nth-child(6) {
    width: 110px;
}

.provider-products-table th:nth-child(7),
.provider-products-table td:nth-child(7) {
    width: 140px;
}

.provider-products-table th:nth-child(8),
.provider-products-table td:nth-child(8) {
    width: 40px;
    text-align: center;
}

/* ==================================
   PRODUCT TYPES
================================== */

.product-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 90px;

    padding: 1px;

    border-radius: 999px;

    font-size: 14px;
    font-weight: 600;

    border: 1px solid;
}

/* Digitale */
.product-type-digitale {
    color: #7c3aed !important;
    background: #f3e8ff !important;
    border-color: #d8b4fe;
}

/* Fisico */
.product-type-fisico {
    color: #2563eb !important;
    background: #dbeafe !important;
    border-color: #93c5fd;
}

/* Ibrida */
.product-type-ibrida {
    color: #059669 !important;
    background: #d1fae5 !important;
    border-color: #6ee7b7;
}


/* ==================================
   STATUS
================================== */

.product-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 90px;
    padding: 2px 10px;
    font-size: 14px;
}

.product-status-badge i {
    font-size: 12px;
}

.product-status-completed i {
    color: #22c55e; /* green icon */
}

.product-status-pending i{
    color: #f59e0b; /* orange icon */
}

/* ==================================
   ACTION BUTTONS
================================== */
.provider-products-table th:nth-child(8),
.provider-products-table td:nth-child(8) {
    width: 150px;
    min-width: 150px;
    white-space: nowrap;
}

.provider-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.provider-action-edit,
.provider-action-delete {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 16px;
}

.provider-action-edit {
    color: #5b5cff;
    border: 1px solid #c7c8ff;
    background: #ffffff;
}

.provider-action-edit:hover {
    background: #f3f4ff;
    transform: translateY(-2px);
}

.provider-action-delete {
    color: #ff5a5a;
    border: 1px solid #ffc2c2;
    background: #ffffff;
}

.provider-action-delete:hover {
    background: #fff5f5;
    transform: translateY(-2px);
}

/* ==================================
   SUCCESS MESSAGE
================================== */

.provider-success {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 18px 50px 18px 22px;
    margin-bottom: 30px;

    background: #eaf7ee;
    border: 1px solid #9ad8a8;
    border-radius: 14px;

    color: #0b6b38;
    font-size: 16px;
}

.provider-success-close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);

    background: transparent;
    border: none;

    font-size: 22px;
    line-height: 1;
    cursor: pointer;

    color: #0b6b38;
    padding: 0;
}

.provider-success-close:hover {
    opacity: 0.7;
}

/* ==================================
   MOBILE
================================== */

/* ==================================
   MOBILE
================================== */

/* ==================================
   TABLET + MOBILE
================================== */

@media (max-width: 1000px) {

    .provider-content {
        margin-left: 0;
        padding: 20px 15px;
    }

    .provider-products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .provider-products-header h2 {
        font-size: 26px;
    }

    .provider-add-button {
        width: 100%;
        justify-content: center;
    }

    .provider-products-table-wrapper {
        overflow-x: auto;
        overflow-y: visible;
        border: none;
        -webkit-overflow-scrolling: touch;
    }

    .provider-products-table {
        min-width: 1100px;
    }

    .provider-products-table-wrapper::-webkit-scrollbar {
        height: 8px;
    }

    .provider-products-table-wrapper::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 999px;
    }

    .provider-products-table-wrapper::-webkit-scrollbar-track {
        background: #f1f5f9;
    }

    .provider-actions {
        justify-content: center;
        flex-wrap: nowrap;
    }
}

.provider-content,
.provider-products-wrapper {
    background: transparent !important;
}

.provider-price-extra {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}