/* ###########################################################################
   Products / services
############################################################################ */

.products-container{
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px;
    box-sizing: border-box;
}


.products-header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}


.products-header-title{
    display: flex;
    align-items: center;
    gap: 16px;
}


.products-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 15px;
    background: var(--jl-brand-primary);
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 8px 20px rgba(29, 89, 51, 0.22);
}


.products-title-content{
    min-width: 0;
}


.products-title-content .page-title{
    margin: 0 0 4px 0;
    color: var(--jl-brand-text);
    font-size: 25px;
    font-weight: 700;
}


.products-title-content .page-description{
    margin: 0;
    color: #687c73;
    font-size: 14px;
    line-height: 1.5;
}


/* ###########################################################################
   Toolbar
############################################################################ */

.products-toolbar{
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
}


.products-toolbar .btn-primary{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
    padding: 13px 20px;
    border: none;
    border-radius: 12px;
    background: var(--jl-brand-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(29, 89, 51, 0.25);
}


.products-toolbar .btn-primary:hover{
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(29, 89, 51, 0.35);
}


/* ###########################################################################
   Search
############################################################################ */

.products-filters{
    margin-bottom: 16px;
}


.products-search{
    position: relative;
    width: 100%;
}


.products-search > i{
    position: absolute;
    top: 50%;
    left: 17px;
    transform: translateY(-50%);
    color: #a4bcae;
    font-size: 14px;
    pointer-events: none;
}


.products-search input{
    width: 100%;
    height: 48px;
    padding: 0 18px 0 46px;
    border: 1px solid #dce9df;
    border-radius: 12px;
    background: #ffffff;
    color: var(--jl-brand-text);
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}


.products-search input::placeholder{
    color: #a4bcae;
}


.products-search input:focus{
    border-color: var(--jl-brand-primary);
    box-shadow: 0 0 0 4px rgba(29, 89, 51, 0.1);
}


/* ###########################################################################
   Table
############################################################################ */

.products-table-container{
    width: 100%;
    overflow-x: auto;
    border: 1px solid #dce9df;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(29, 89, 51, 0.05);
}


.products-table{
    width: 100%;
    min-width: 1020px;
    border-collapse: collapse;
}


.products-table thead{
    background: #f9fcfa;
}


.products-table th{
    padding: 17px 18px;
    border-bottom: 1px solid #dce9df;
    color: #687c73;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-align: left;
    text-transform: uppercase;
}


.products-table th:nth-child(2),
.products-table th:nth-child(3),
.products-table th:nth-child(4),
.products-table th:nth-child(5),
.products-table th:nth-child(6),
.products-table th:nth-child(7){
    text-align: center;
}


.products-table td{
    padding: 17px 18px;
    border-bottom: 1px solid #eaf5ee;
    color: var(--jl-brand-text);
    font-size: 14px;
    vertical-align: middle;
}


.products-table tbody tr{
    transition: background 0.2s ease;
}


.products-table tbody tr:hover{
    background: #f9fcfa;
}


.products-table tbody tr:last-child td{
    border-bottom: none;
}


.products-no-results{
    display: none;
}


/* ###########################################################################
   Product identification
############################################################################ */

.product-identification{
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 230px;
}


.product-list-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 11px;
    background: #eaf5ee;
    color: var(--jl-brand-primary);
    font-size: 15px;
}


.product-identification-text{
    min-width: 0;
}


.product-name{
    margin-bottom: 4px;
    color: var(--jl-brand-text);
    font-weight: 600;
}


.product-code{
    overflow: hidden;
    max-width: 260px;
    color: #687c73;
    font-family: monospace;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ###########################################################################
   Common columns
############################################################################ */

.product-centered-column,
.product-price-column,
.product-module-column{
    text-align: center;
}


.product-price{
    color: var(--jl-brand-text);
    font-weight: 600;
    white-space: nowrap;
}


.product-module{
    display: inline-block;
    padding: 6px 9px;
    border: 1px solid #dce9df;
    border-radius: 8px;
    background: #f8f7fa;
    color: #687c73;
    font-size: 11px;
    white-space: nowrap;
}


.product-module-empty{
    color: #879e91;
    font-size: 12px;
}


/* ###########################################################################
   Badges
############################################################################ */

.product-type,
.product-menu-status,
.product-status{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 78px;
    padding: 7px 11px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}


.product-type-product{
    border: 1px solid #e8f4ed;
    background: #eaf5ee;
    color: var(--jl-brand-primary);
}


.product-type-service{
    border: 1px solid #c8e3fc;
    background: #eef7ff;
    color: #2979b8;
}


.product-menu-visible{
    border: 1px solid #c9e8d9;
    background: #f0fbf6;
    color: #20845b;
}


.product-menu-hidden{
    border: 1px solid #dce9df;
    background: #f7f6f9;
    color: #687c73;
}


.product-status-active{
    border: 1px solid #b9efd3;
    background: #ecfdf5;
    color: #16935b;
}


.product-status-inactive{
    border: 1px solid #ffd1d7;
    background: #fff1f2;
    color: #dc4c5b;
}


.product-menu-status i,
.product-status i{
    font-size: 10px;
}


/* ###########################################################################
   Actions
############################################################################ */

.product-actions{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


.product-action-button{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #dce9df;
    border-radius: 10px;
    background: #ffffff;
    color: #687c73;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}


.product-action-button:hover{
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(29, 89, 51, 0.1);
}


.product-edit:hover{
    border-color: var(--jl-brand-primary);
    background: #eaf5ee;
    color: var(--jl-brand-primary);
}


.product-status-action:hover{
    border-color: #f0a83a;
    background: #fff8e9;
    color: #db8c12;
}


/* ###########################################################################
   Footer / empty states
############################################################################ */

.products-footer{
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 0 20px;
    margin-top: 14px;
    border: 1px solid #dce9df;
    border-radius: 12px;
    background: #ffffff;
    box-sizing: border-box;
}


#productsCount{
    color: #687c73;
    font-size: 13px;
}


.products-empty,
.products-search-empty{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 45px 20px;
    color: #687c73;
    text-align: center;
}


.products-empty i,
.products-search-empty i{
    font-size: 28px;
    color: #a4bcae;
}


.products-search-empty{
    margin-top: 16px;
    border: 1px dashed #e8f4ed;
    border-radius: 14px;
    background: #f9fcfa;
}


.displayNone{
    display: none !important;
}


/* ###########################################################################
   Responsive
############################################################################ */

@media (max-width: 700px){

    .products-container{
        padding: 20px 14px;
    }

    .products-header-title{
        align-items: flex-start;
    }

    .products-toolbar{
        justify-content: stretch;
    }

    .products-toolbar .btn-primary{
        width: 100%;
    }

}


/* ###########################################################################
   Product create / edit form
############################################################################ */

.product-form-container{
    width: 100%;
    max-width: 1100px;
    min-width: 0;
    flex: 0 1 100%;
    margin: 0 auto;
    padding: 30px;
    box-sizing: border-box;
    overflow: visible;
}


.product-form-header{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}


.product-form-header-main{
    display: flex;
    align-items: center;
    min-width: 0;
}


.product-form-back-button{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    margin-right: 14px;
    padding: 0;
    border: 1px solid #dce9df;
    border-radius: 11px;
    background: #ffffff;
    color: #687c73;
    cursor: pointer;
    transition: all 0.2s ease;
}


.product-form-back-button:hover{
    border-color: var(--jl-brand-primary);
    background: #eaf5ee;
    color: var(--jl-brand-primary);
    transform: translateX(-2px);
}


.product-form-header-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    margin-right: 16px;
    border-radius: 15px;
    background: var(--jl-brand-primary);
    color: #ffffff;
    font-size: 18px;
    box-shadow: 0 8px 20px rgba(29, 89, 51, 0.22);
}


.product-form-header-text{
    min-width: 0;
}


.product-form-header-text h1{
    margin: 0 0 4px 0;
    color: var(--jl-brand-text);
    font-size: 25px;
    font-weight: 700;
}


.product-form-header-text p{
    margin: 0;
    color: #687c73;
    font-size: 14px;
    line-height: 1.5;
}


.product-form-current-status{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}


.product-form-status-active{
    border: 1px solid #b9efd3;
    background: #ecfdf5;
    color: #16935b;
}


.product-form-status-inactive{
    border: 1px solid #ffd1d7;
    background: #fff1f2;
    color: #dc4c5b;
}


.product-form{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
}


.product-form-card{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 24px;
    margin-bottom: 18px;
    border: 1px solid #dce9df;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(29, 89, 51, 0.05);
}


.product-form-card-header{
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid #eaf5ee;
}


.product-form-card-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 11px;
    background: #eaf5ee;
    color: var(--jl-brand-primary);
    font-size: 15px;
}


.product-form-card-header h2{
    margin: 0 0 3px 0;
    color: var(--jl-brand-text);
    font-size: 16px;
    font-weight: 700;
}


.product-form-card-header p{
    margin: 0;
    color: #687c73;
    font-size: 12px;
    line-height: 1.5;
}


.product-form-grid{
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}


.product-form-group{
    display: flex;
    flex-direction: column;
    min-width: 0;
}


.product-form-group-full{
    grid-column: 1 / -1;
}


.product-form-group > label{
    margin-bottom: 8px;
    color: var(--jl-brand-text);
    font-size: 12px;
    font-weight: 600;
}


.product-form-group > label > span{
    color: #dc4c5b;
}


.product-form-group input,
.product-form-group select,
.product-form-group textarea{
    width: 100%;
    border: 1px solid #dce9df;
    border-radius: 11px;
    background: #ffffff;
    color: var(--jl-brand-text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}


.product-form-group input,
.product-form-group select{
    height: 46px;
    padding: 0 14px;
}


.product-form-group textarea{
    min-height: 120px;
    padding: 13px 14px;
    line-height: 1.55;
    resize: vertical;
}


.product-form-group input:focus,
.product-form-group select:focus,
.product-form-group textarea:focus{
    border-color: var(--jl-brand-primary);
    box-shadow: 0 0 0 4px rgba(29, 89, 51, 0.1);
}


.product-form-group input.error,
.product-form-group select.error,
.product-form-group textarea.error{
    border-color: #dc4c5b;
    box-shadow: 0 0 0 4px rgba(220, 76, 91, 0.08);
}


.product-form-group small{
    margin-top: 7px;
    color: #879e91;
    font-size: 11px;
    line-height: 1.45;
}


.product-price-input{
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    height: 46px;
    border: 1px solid #dce9df;
    border-radius: 11px;
    background: #ffffff;
    overflow: hidden;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}


.product-price-input:focus-within{
    border-color: var(--jl-brand-primary);
    box-shadow: 0 0 0 4px rgba(29, 89, 51, 0.1);
}


.product-price-input > span{
    display: flex;
    align-items: center;
    align-self: stretch;
    padding: 0 13px;
    border-right: 1px solid #dce9df;
    background: #f9fcfa;
    color: #687c73;
    font-size: 12px;
    font-weight: 600;
}


.product-price-input input{
    width: 0;
    min-width: 0;
    flex: 1 1 0;
    height: 44px;
    border: none;
    border-radius: 0;
    box-shadow: none !important;
}


.product-icon-input{
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 10px;
}


.product-icon-input > input{
    width: 0;
    min-width: 0;
    flex: 1 1 0;
}


.product-icon-picker-wrapper{
    position: relative;
    flex: 0 0 46px;
}


.product-icon-preview{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    padding: 0;
    border: 1px solid #e8f4ed;
    border-radius: 11px;
    background: #eaf5ee;
    color: var(--jl-brand-primary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}


.product-icon-preview:hover,
.product-icon-preview[aria-expanded="true"]{
    border-color: var(--jl-brand-primary);
    background: #eaf5ee;
    color: var(--jl-brand-primary);
    box-shadow: 0 0 0 4px rgba(29, 89, 51, 0.1);
}


.product-icon-picker{
    position: absolute;
    top: calc(100% + 9px);
    left: 0;
    z-index: 50;
    display: none;
    width: 330px;
    height: 330px;
    padding: 13px;
    border: 1px solid #e8f4ed;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 16px 45px rgba(29, 89, 51, 0.18);
    box-sizing: border-box;
}


.product-icon-picker.open{
    display: flex;
    flex-direction: column;
}


.product-icon-picker::before{
    content: "";
    position: absolute;
    top: -6px;
    left: 16px;
    width: 11px;
    height: 11px;
    border-top: 1px solid #e8f4ed;
    border-left: 1px solid #e8f4ed;
    background: #ffffff;
    transform: rotate(45deg);
}


.product-icon-picker-header{
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 28px;
    margin-bottom: 9px;
}


.product-icon-picker-header strong{
    color: var(--jl-brand-text);
    font-size: 12px;
    font-weight: 700;
}


.product-icon-picker-close{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #687c73;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}


.product-icon-picker-close:hover{
    background: #f9fcfa;
    color: #687c73;
}


.product-icon-picker-search{
    position: relative;
    margin-bottom: 10px;
}


.product-icon-picker-search > i{
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #a4bcae;
    font-size: 11px;
    pointer-events: none;
}


.product-icon-picker-search input{
    width: 100%;
    height: 38px;
    padding: 0 11px 0 33px;
    border: 1px solid #dce9df;
    border-radius: 9px;
    background: #f9fcfa;
    color: var(--jl-brand-text);
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
}


.product-icon-picker-search input:focus{
    border-color: var(--jl-brand-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(29, 89, 51, 0.09);
}


.product-icon-picker-grid{
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    min-height: 0;
    padding-right: 4px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #a4bcae transparent;
}


.product-icon-picker-grid::-webkit-scrollbar{
    width: 6px;
}


.product-icon-picker-grid::-webkit-scrollbar-track{
    background: transparent;
}


.product-icon-picker-grid::-webkit-scrollbar-thumb{
    border-radius: 20px;
    background: #a4bcae;
}


.product-icon-picker-item{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    height: 53px;
    padding: 5px 3px;
    border: 1px solid #eaf5ee;
    border-radius: 9px;
    background: #ffffff;
    color: #687c73;
    cursor: pointer;
    transition: all 0.16s ease;
}


.product-icon-picker-item:hover{
    border-color: #dce9df;
    background: #f9fcfa;
    color: var(--jl-brand-primary);
    transform: translateY(-1px);
}


.product-icon-picker-item.selected{
    border-color: #a4d4ba;
    background: #eaf5ee;
    color: var(--jl-brand-primary);
    box-shadow: inset 0 0 0 1px rgba(29, 89, 51, 0.12);
}


.product-icon-picker-item i{
    font-size: 15px;
}


.product-icon-picker-item span{
    display: block;
    width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 8px;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.product-icon-picker-empty{
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    color: #879e91;
    font-size: 12px;
    text-align: center;
}


.product-form-switch{
    display: flex !important;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    margin: 0 !important;
    cursor: pointer;
}


.product-form-switch input{
    position: absolute;
    opacity: 0;
    pointer-events: none;
}


.product-form-switch-control{
    position: relative;
    width: 44px;
    height: 24px;
    flex: 0 0 44px;
    border-radius: 50px;
    background: #dce9df;
    transition: background 0.2s ease;
}


.product-form-switch-control::after{
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(29, 89, 51, 0.18);
    transition: transform 0.2s ease;
}


.product-form-switch input:checked + .product-form-switch-control{
    background: var(--jl-brand-primary);
}


.product-form-switch input:checked + .product-form-switch-control::after{
    transform: translateX(20px);
}


.product-form-switch input:focus-visible + .product-form-switch-control{
    box-shadow: 0 0 0 4px rgba(29, 89, 51, 0.12);
}


.product-form-switch-text{
    display: flex;
    flex-direction: column;
    min-width: 0;
}


.product-form-switch-text strong{
    color: var(--jl-brand-text);
    font-size: 12px;
    font-weight: 600;
}


.product-form-switch-text small{
    margin: 2px 0 0 0;
}


.product-form-info{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    margin-top: 22px;
    border: 1px solid #e8f4ed;
    border-radius: 11px;
    background: #f9fcfa;
    color: var(--jl-brand-primary);
    font-size: 12px;
    line-height: 1.5;
}


.product-form-info i{
    margin-top: 2px;
    color: var(--jl-brand-primary);
}


.product-form-actions{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 2px;
}


.product-form-cancel-button,
.product-form-save-button{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 11px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}


.product-form-cancel-button{
    border: 1px solid #dce9df;
    background: #ffffff;
    color: #687c73;
}


.product-form-cancel-button:hover{
    border-color: #a4bcae;
    background: #f9fcfa;
}


.product-form-save-button{
    border: none;
    background: var(--jl-brand-primary);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(29, 89, 51, 0.22);
}


.product-form-save-button:hover{
    transform: translateY(-2px);
    box-shadow: 0 11px 25px rgba(29, 89, 51, 0.3);
}


.product-form-save-button:disabled,
.product-form-cancel-button:disabled{
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}


@media (max-width: 760px){

    .product-icon-picker{
        width: min(330px, calc(100vw - 48px));
        height: 320px;
    }


    .product-form-container{
        padding: 20px 14px;
    }


    .product-form-header{
        align-items: flex-start;
    }


    .product-form-current-status{
        display: none;
    }


    .product-form-grid{
        grid-template-columns: 1fr;
    }


    .product-form-group-full{
        grid-column: auto;
    }


    .product-form-actions{
        flex-direction: column-reverse;
    }


    .product-form-cancel-button,
    .product-form-save-button{
        width: 100%;
    }

}

/* Fase 8.2 — modelo de cobrança no catálogo. */
.jl-product-billing-label{display:block;font-size:11px;color:#687c73;margin-top:4px;white-space:normal}
