/* ==========================================================
   QUẢN LÝ SẢN PHẨM
========================================================== */

.product-manage {
    width: auto;
    max-width: none;

    margin-left: 100px;
    margin-right: 100px;

    padding: 20px 0;

    box-sizing: border-box;

    color: #333;
}


/* ==========================================================
   TIÊU ĐỀ
========================================================== */

.product-manage-title {
    width: 100%;
    margin: 0 0 20px 0;
}

.product-manage-title h2 {
    margin: 0;

    color: rgb(29, 60, 88) !important;

    font-size: 22px;
    font-weight: bold;

    line-height: 1.4;
}


/* ==========================================================
   THÔNG BÁO
========================================================== */

.manage-message {
    width: 100%;

    margin: 0 0 15px 0;
    padding: 10px 12px;

    box-sizing: border-box;

    border-radius: 3px;

    font-size: 14px;
    line-height: 1.5;
}

.manage-message.success {
    background: #e7f5e7 !important;
    color: #287828 !important;
}

.manage-message.error {
    background: #fdeaea !important;
    color: #a00000 !important;
}


/* ==========================================================
   LAYOUT
========================================================== */

.product-manage-layout {
    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        380px;

    gap: 20px;

    align-items: start;

    box-sizing: border-box;
}


/* ==========================================================
   PANEL
========================================================== */

.product-list-panel,
.product-edit-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;

    padding: 15px;

    box-sizing: border-box;

    background: #fff !important;

    border: 1px solid #ddd;
    border-radius: 4px;

    color: #333 !important;
}


/* =====================================================
   ĐƠN VỊ TÍNH
===================================================== */

.unit-select {
    position: relative;
    width: 100%;
}

.unit-select input {
    width: 100%;
    box-sizing: border-box;
}

.unit-dropdown {
    display: none;

    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    background: #fff;

    border: 1px solid #ccc;
    border-top: none;

    max-height: 220px;
    overflow-y: auto;

    z-index: 9999;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);

    text-align: left;
}

.unit-option {
    padding: 9px 12px;

    cursor: pointer;

    background: #fff;

    font-size: 14px;
    
    text-align: left;
}

.unit-option:hover {
    background: #f0f0f0;
}

/* ==========================================================
   PANEL CHỈNH SỬA
========================================================== */

.product-edit-panel {
    position: sticky;
    top: 20px;
}


/* ==========================================================
   PANEL TITLE
========================================================== */

.panel-title {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 15px;

    box-sizing: border-box;
}

.panel-title h3 {
    margin: 0;
    padding: 0;

    color: rgb(29, 60, 88) !important;

    font-size: 17px;
    font-weight: bold;

    line-height: 1.4;
}

.stock-summary {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    margin: 10px 0 15px;
    padding: 9px 0;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    box-sizing: border-box;
    overflow: hidden;
}

.stock-summary-item {
    flex: 1 1 180px;
    min-width: 0;
    text-align: left;
    white-space: normal;
    padding: 0 15px;
    box-sizing: border-box;
}

.stock-summary-item + .stock-summary-item {
    border-left: 1px solid #ddd;
}

.stock-summary-label {
    font-size: 13px;
    color: #666;
}

.stock-summary-value {
    font-size: 16px;
    font-weight: 600;
    color: rgb(68, 129, 187);
    margin-left: 4px;
}

/* ==========================================================
   BUTTON CHUNG
========================================================== */

.product-manage .btn-filter {
    width: 50px;
}

.product-manage button,
.product-manage .btn-add-product,
.product-manage .btn-filter,
.product-manage .btn-save,
.product-manage .btn-cancel,
.product-manage .btn-edit,
.product-manage .btn-delete {
    box-sizing: border-box;

    font-family: inherit;

    font-size: 14px;
    line-height: 1.4;

    text-decoration: none;

    cursor: pointer;
}


/* ==========================================================
   BUTTON THÊM / LỌC / LƯU
========================================================== */

.btn-add-product,
.btn-filter,
.btn-save {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 7px 12px;

    border: none;
    border-radius: 3px;

    background: rgb(68, 129, 187) !important;

    color: #fff !important;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.btn-add-product:hover,
.btn-filter:hover,
.btn-save:hover {
    background: rgb(31, 97, 173) !important;

    color: #fff !important;
}


/* ==========================================================
   BUTTON HỦY
========================================================== */

.btn-cancel, .inline-v3-cancel {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 7px 12px;

    border: none;
    border-radius: 3px;

    background: #eee !important;

    color: #444 !important;

    white-space: nowrap;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.btn-cancel:hover,
.inline-v3-cancel:hover {
    background: #ddd !important;
    color: #222 !important;
}

/* ==========================================================
   BUTTON EXPORT
========================================================== */

.export-btn {
    display: inline-block;
    padding: 6px 12px;
    margin-left: 5px;
    background: #198754;
    color: #fff;
    border: 1px solid #198754;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.export-btn:hover {
    background: #157347;
    border-color: #146c43;
    color: #fff;
}


/* ==========================================================
   BUTTON SỬA
========================================================== */

.btn-edit {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 5px;

    border: none;

    background: transparent !important;

    color: rgb(68, 129, 187) !important;
}

.btn-edit:hover {
    background: transparent !important;

    color: rgb(31, 97, 173) !important;
}


/* ==========================================================
   BUTTON XÓA
========================================================== */

.btn-delete {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 5px;

    border: none;

    background: transparent !important;

    color: #c33 !important;
}

.btn-delete:hover {
    background: transparent !important;

    color: #900 !important;
}


/* ==========================================================
   BỘ LỌC
========================================================== */

.product-filter {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 15px;

    flex-wrap: wrap;

    box-sizing: border-box;
}


/* ==========================================================
   Ô TÌM KIẾM
========================================================== */

.filter-search {
    flex: 1 1 220px;

    min-width: 180px;

    box-sizing: border-box;
}


/* ==========================================================
   FILTER ITEM
========================================================== */

.filter-item {
    flex: 0 1 160px;

    min-width: 140px;

    box-sizing: border-box;
}


/* ==========================================================
   LIMIT
========================================================== */

.limit-input {
    flex: 0 0 70px;

    width: 70px;
    min-width: 70px;
}


/* ==========================================================
   INPUT / SELECT FILTER
========================================================== */

.product-filter input,
.product-filter select {
    width: 100%;
    height: 34px;

    min-width: 0;

    padding: 0 8px;

    box-sizing: border-box;

    border: 1px solid #ccc;
    border-radius: 3px;

    background: #fff !important;

    color: #333 !important;

    font-family: inherit;
    font-size: 14px;

    outline: none;
}

.product-filter input:focus,
.product-filter select:focus {
    border-color: rgb(68, 129, 187);

    box-shadow: 0 0 0 2px rgba(68, 129, 187, 0.08);
}

.product-filter input::placeholder {
    color: #888 !important;
    opacity: 1;
}

.product-filter select option {
    background: #fff !important;
    color: #333 !important;
}


/* ==========================================================
   NÚT RESET FILTER
   CHỈ ICON XOAY
========================================================== */

.product-filter .btn-reset-filter {
    width: 34px;
    height: 34px;

    min-width: 34px;
    max-width: 34px;

    flex: 0 0 34px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    box-sizing: border-box;

    border: 1px solid #ccc;
    border-radius: 3px;

    background: #fff !important;

    color: rgb(68, 129, 187) !important;

    cursor: pointer;

    overflow: hidden;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}


/*
   QUAN TRỌNG:
   span mới là phần xoay.
   button và border hoàn toàn không xoay.
*/

.product-filter .btn-reset-filter span {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 20px;
    height: 20px;

    font-size: 20px;
    line-height: 1;

    transform: rotate(0deg);

    transform-origin: center center;

    transition: transform 0.35s ease;
}

.product-filter .btn-reset-filter:hover {
    background: #f5f8fb !important;

    border-color: rgb(68, 129, 187);

    color: rgb(31, 97, 173) !important;
}

.product-filter .btn-reset-filter:hover span {
    transform: rotate(180deg);
}

.product-filter .btn-reset-filter:active span {
    transform: rotate(360deg);
}

.product-filter .btn-reset-filter:focus {
    outline: none;

    border-color: rgb(68, 129, 187);

    box-shadow: 0 0 0 2px rgba(68, 129, 187, 0.08);
}


/* ==========================================================
   BẢNG
========================================================== */

.product-table-wrapper {
    display: block;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;

    box-sizing: border-box;
}

.product-table {
    width: 100%;
    max-width: none;
    min-width: 1050px;

    border-collapse: collapse;

    table-layout: fixed;

    background: #fff;

    color: #333 !important;

    font-size: 14px;
}


/* ==========================================================
   TABLE CELL
========================================================== */
.product-table th,
.product-table td {
    padding: 8px;

    border-bottom: 1px solid #ddd;

    text-align: left;
    vertical-align: middle;

    box-sizing: border-box;

    min-width: 0;
    max-width: none;

    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}


/* STT */
.product-table th:first-child,
.product-table td:first-child {
    width: 48px;
    min-width: 48px;
    max-width: 48px;

    text-align: center;

    white-space: nowrap;

    padding-left: 6px;
    padding-right: 6px;
}


/* TÊN SẢN PHẨM */
.product-table th:nth-child(2),
.product-table td:nth-child(2) {
    width: 250px;
    max-width: 250px;

    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;

    padding-left: 6px;
    padding-right: 6px;
}

.product-table td:nth-child(2) .product-name {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.product-table td:nth-child(2) .product-name span {
    min-width: 0;

    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: normal;

    text-overflow: unset;
    overflow: visible;
}

.product-table th:nth-child(8),
.product-table td:nth-child(8),
.product-table th:nth-child(9),
.product-table td:nth-child(9)  {
    text-align: center !important;
}


/* ==========================================================
   TABLE HEADER
========================================================== */

.product-table th {
    background: #f5f5f5 !important;

    color: rgb(29, 60, 88) !important;

    font-weight: bold;

    white-space: normal;
    overflow-wrap: anywhere;
}


/* ==========================================================
   TABLE DATA
========================================================== */

.product-table td {
    background: #fff;

    color: #333 !important;
}

.product-table tbody tr:hover td {
    background: #f8fbfd !important;

    color: #333 !important;
}


/* ==========================================================
   TÊN SẢN PHẨM
========================================================== */

.product-name {
    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 0;
    max-width: 100%;
    width: 100%;

    box-sizing: border-box;

    color: #333 !important;
}

.product-name img {
    width: 45px;
    height: 45px;

    min-width: 45px;

    flex: 0 0 45px;

    object-fit: contain;

    background: #fff;

    border: 1px solid #eee;
}

.product-name span {
    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    color: #333 !important;
}


/* ==========================================================
   STATUS
========================================================== */

.status {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 3px 8px;

    border-radius: 10px;

    font-size: 12px;
    line-height: 1.3;

    white-space: nowrap;
}

.status.active {
    background: #e7f5e7 !important;
    color: #287828 !important;
}

.status.inactive {
    background: #eee !important;
    color: #777 !important;
}



/* ==========================================================
   NGƯỜI CHỈNH SỬA
========================================================== */

.updated-info {
    min-width: 0;

    white-space: normal;

    color: #333 !important;
}

.updated-info span {
    display: block;

    max-width: 130px;

    overflow: hidden;

    text-overflow: ellipsis;

    color: rgb(68, 129, 187) !important;
}

.updated-info small {
    display: block;

    margin-top: 2px;

    color: #888 !important;

    font-size: 11px;
}


/* ==========================================================
   ACTION
========================================================== */

.product-actions {
    display: flex;

    align-items: center;

    justify-content: flex-start;

    gap: 3px;

    white-space: normal;
    flex-wrap: wrap;
}


/* ==========================================================
   FORM
========================================================== */

.product-form {
    width: 100%;
    max-width: 100%;

    display: flex;

    flex-direction: column;

    gap: 12px;

    box-sizing: border-box;

    color: #333 !important;
}


/* ==========================================================
   FORM GROUP
========================================================== */

.form-group-products {
    width: 100%;

    min-width: 0;

    display: flex;

    flex-direction: column;

    gap: 5px;

    box-sizing: border-box;
    
    background-color: #e8f0fe;

    border-radius: 5px;
    padding: 5px;
}

.form-group-products label {
    display: block;

    color: rgb(29, 60, 88) !important;

    font-size: 13px;

    font-weight: bold;

    line-height: 1.4;
}


/* ==========================================================
   FORM INPUT / SELECT / TEXTAREA
========================================================== */

.form-group-products input,
.form-group-products select,
.form-group-products textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 8px 9px;

    box-sizing: border-box;

    border: 1px solid #ccc;
    border-radius: 3px;

    background: #fff !important;

    color: #333 !important;

    font-family: inherit;
    font-size: 14px;

    outline: none;
}

.form-group-products input,
.form-group-products select {
    height: 36px;
}

.form-group-products textarea {
    min-height: 100px;

    resize: vertical;
}

.form-group-products input:focus,
.form-group-products select:focus,
.form-group-products textarea:focus {
    border-color: rgb(68, 129, 187);

    box-shadow: 0 0 0 2px rgba(68, 129, 187, 0.08);
}

.form-group-products input::placeholder,
.form-group-products textarea::placeholder {
    color: #888 !important;
    opacity: 1;
}

.form-group-products select option {
    background: #fff !important;
    color: #333 !important;
}


/* ==========================================================
   FORM ROW
========================================================== */

.form-row {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

    box-sizing: border-box;
}


/* ==========================================================
   FORM ROW 3 CỘT
========================================================== */

.form-row-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}


/* ==========================================================
   THÔNG TIN CẬP NHẬT
========================================================== */

.form-info {
    width: 100%;

    padding: 8px 10px;

    box-sizing: border-box;

    background: #f5f8fb !important;

    border-left: 3px solid rgb(68, 129, 187);

    color: #555 !important;

    font-size: 12px;

    line-height: 1.6;

    overflow-wrap: anywhere;
}

.form-info b {
    color: #333 !important;
}


/* ==========================================================
   FORM BUTTON
========================================================== */

.form-buttons {
    width: 100%;

    display: flex;

    justify-content: flex-end;
    align-items: center;

    gap: 8px;

    margin-top: 5px;

    box-sizing: border-box;
}


/* ==========================================================
   PHÂN TRANG
========================================================== */

.pagination {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 5px;

    margin-top: 15px;

    flex-wrap: wrap;
}

.pagination a {
    min-width: 30px;
    height: 30px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0 8px;

    box-sizing: border-box;

    border: 1px solid #ddd;
    border-radius: 3px;

    background: #fff;

    color: rgb(68, 129, 187) !important;

    text-decoration: none;
}

.pagination a:hover,
.pagination a.active {
    background: rgb(68, 129, 187) !important;

    border-color: rgb(68, 129, 187);

    color: #fff !important;
}


/* ==========================================================
   KHÔNG CÓ SẢN PHẨM
========================================================== */

.no-product {
    padding: 30px !important;

    text-align: center !important;

    background: #fff !important;

    color: #888 !important;
}


/* ==========================================================
   CHUNG
========================================================== */

.product-manage input,
.product-manage textarea,
.product-manage select {
    font-family: inherit;

    max-width: 100%;
}

.product-manage a {
    text-decoration: none;
}

.product-manage button:disabled {
    cursor: not-allowed;

    opacity: 0.6;
}



/* ==========================================================
   CHỐNG TRÀN DANH SÁCH / BẢNG
========================================================== */

.product-manage,
.product-manage-layout,
.product-list-panel,
.product-edit-panel {
    max-width: 100%;
}

.product-manage-layout > * {
    min-width: 0;
}

.product-list-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

@media all and (max-width: 1400px) {
    .product-manage {
        margin-left: 30px;
        margin-right: 30px;
    }
}

/* ==========================================================
   RESPONSIVE ≤ 1000px
========================================================== */

@media all and (max-width: 1000px) {

    .product-manage {
        width: auto;

        margin-left: 0;
        margin-right: 0;

        padding: 15px;
    }

    .product-manage-layout {
        width: 100%;

        grid-template-columns:
            minmax(0, 1fr);

        gap: 15px;
    }

    .product-edit-panel {
        position: static;

        width: 100%;
    }

    .filter-search {
        flex: 1 1 100%;

        min-width: 100%;
    }
}


/* ==========================================================
   RESPONSIVE ≤ 700px
========================================================== */

@media all and (max-width: 700px) {

    .product-manage {
        padding: 12px;
    }

    .product-manage-title {
        margin-bottom: 15px;
    }

    .product-manage-title h2 {
        font-size: 20px;
    }

    .product-list-panel,
    .product-edit-panel {
        padding: 12px;
    }

    .panel-title {
        align-items: flex-start;

        flex-direction: column;
    }

    .panel-title h3 {
        font-size: 16px;
    }

    .btn-add-product {
        width: 100%;
    }


/* ------------------------------------------------------
   FILTER
------------------------------------------------------ */

.product-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-search {
    flex: 1 1 100%;
    width: 100%;
    min-width: 100%;
}

.product-filter .filter-item:not(.limit-input) {
    flex: 1 1 0;
    min-width: 0;
}

.product-filter .limit-input {
    flex: 0 0 70px;
    width: 70px;
    min-width: 70px;
}

.product-filter .btn-filter {
    flex: 0 0 50px;
    width: 50px;
    min-width: 50px;
}

.product-filter .btn-reset-filter {
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
}


    /* ------------------------------------------------------
       FORM
    ------------------------------------------------------ */

    .form-row,
    .form-row-3 {
        grid-template-columns:
            minmax(0, 1fr);
    }

    .form-buttons {
        width: 100%;
    }

    .form-buttons .btn-save,
    .form-buttons .btn-cancel {
        flex: 1 1 0;
    }


    /* ------------------------------------------------------
       FILE
    ------------------------------------------------------ */

    .product-file-upload input[type="file"] {
        width: 100%;
    }


    /* ------------------------------------------------------
       PASSWORD
    ------------------------------------------------------ */

    .delete-password-box {
        padding: 10px;
    }
}


/* ==========================================================
   RESPONSIVE ≤ 500px
========================================================== */

@media all and (max-width: 500px) {

    .product-manage {
        padding: 10px;
    }

    .product-list-panel,
    .product-edit-panel {
        padding: 10px;
    }

    .product-manage-title h2 {
        font-size: 18px;
    }


    /* ------------------------------------------------------
   FILTER
------------------------------------------------------ */

.product-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-search {
    flex: 1 1 100%;
    width: 100%;
    min-width: 100%;
}

.product-filter .filter-item:not(.limit-input) {
    flex: 1 1 100%;
    width: 100%;
    min-width: 100%;
}

.product-filter .limit-input {
    flex: 0 0 70px;
    width: 70px;
    min-width: 70px;
}

.product-filter .btn-filter {
    flex: 0 0 50px;
    width: 50px;
    min-width: 50px;
}

.product-filter .btn-reset-filter {
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
}


    /* ------------------------------------------------------
       BUTTON
    ------------------------------------------------------ */

    .form-buttons {
        flex-direction: column;
    }

    .form-buttons .btn-save,
    .form-buttons .btn-cancel {
        width: 100%;
    }


    /* ------------------------------------------------------
       CURRENT IMAGE
    ------------------------------------------------------ */

    .product-current-image {
        align-items: flex-start;

        flex-direction: column;
    }


    /* ------------------------------------------------------
       PASSWORD
    ------------------------------------------------------ */

    .delete-password-field input[type="password"],
    .delete-password-field input[type="text"] {
        height: 40px;
    }

    .btn-confirm-delete {
        height: 38px;
    }
}



/* ==========================================================
   SPECIFICATION TABLE
========================================================== */
.inline-v3-actions {
    display: flex;

    gap: 8px;

    margin-top: 10px;

    align-items: center;

    justify-content: flex-start;

    width: 100%;

    box-sizing: border-box;
}

/* ==========================================================
   KHU VỰC NÚT THÊM DÒNG
========================================================== */

.inline-v3-specification-add {
    width: 100%;

    display: flex;

    align-items: center;

    justify-content: flex-end;

    margin-top: 10px;

    box-sizing: border-box;
}


/* ==========================================================
   NÚT THÊM DÒNG
========================================================== */

.btn-add-specification {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 5px 10px;

    box-sizing: border-box;

    border: 1px solid rgb(68, 129, 187);

    border-radius: 4px;

    background: #fff;

    color: rgb(68, 129, 187) !important;

    font-family: inherit;

    font-size: 13px;

    font-weight: 600;

    line-height: 1.3;

    white-space: nowrap;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.1s ease;
}


/* ==========================================================
   HOVER
========================================================== */

.btn-add-specification:hover {
    background: rgb(68, 129, 187) !important;

    border-color: rgb(68, 129, 187);

    color: #fff !important;
}


/* ==========================================================
   ACTIVE
========================================================== */

.btn-add-specification:active {
    transform: translateY(1px);
}


/* ==========================================================
   FOCUS
========================================================== */

.btn-add-specification:focus {
    outline: none;

    box-shadow:
        0 0 0 2px rgba(68, 129, 187, 0.15);
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 600px) {

    .inline-v3-specification-add {
        margin-top: 8px;
    }

    .btn-add-specification {
        padding: 5px 9px;

        font-size: 12px;
    }
}

.inline-v3-specification-table {
    width: 100%;
    max-width: 100%;

    border-collapse: collapse;

    table-layout: fixed;

    box-sizing: border-box;
    
}


/* ==========================================================
   Ô TABLE
========================================================== */

.inline-v3-specification-table th,
.inline-v3-specification-table td {
    border: 1px solid #ddd;

    padding: 6px;

    box-sizing: border-box;

    vertical-align: top;

    min-width: 0;
}


/* ==========================================================
   HEADER
========================================================== */

.inline-v3-specification-table th {
    background: #f5f5f5;

    text-align: left;

    font-weight: 600;
}


/* ==========================================================
   CỘT TÊN THÔNG SỐ
========================================================== */

.inline-v3-specification-table .spec-key-column {
    width: 46%;
}


/* ==========================================================
   CỘT GIÁ TRỊ
========================================================== */

.inline-v3-specification-table th:nth-child(2),
.inline-v3-specification-table td:nth-child(2) {
    width: 46%;
}


/* ==========================================================
   CỘT NÚT
========================================================== */

.inline-v3-specification-table th:last-child,
.inline-v3-specification-table td:last-child {
    width: 8%;

    min-width: 34px;
    max-width: 42px;

    padding: 3px;

    box-sizing: border-box;

    text-align: center;
    vertical-align: middle;

    overflow: hidden;
}


/* ==========================================================
   Ô TEXTAREA
========================================================== */

.inline-v3-specification-table .spec-key-input,
.inline-v3-specification-table .spec-value-input {
    display: block;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    min-height: 56px;

    box-sizing: border-box;

    padding: 7px;

    margin: 0;

    border: 1px solid #ccc;

    border-radius: 4px;

    background: #fff;

    font-family: inherit;

    font-size: 14px;

    line-height: 1.5;

    color: #333;

    /* Tự xuống dòng */
    white-space: pre-wrap;

    /* Không cho chữ dài tràn ra ngoài */
    overflow-wrap: anywhere;
    word-break: break-word;

    /* Cho phép kéo chiều cao */
    resize: vertical;

    overflow: hidden;
}


/* ==========================================================
   TÊN THÔNG SỐ
========================================================== */

.inline-v3-specification-table .spec-key-input {
    overflow-wrap: anywhere;

    word-break: break-word;
}


/* ==========================================================
   GIÁ TRỊ
========================================================== */

.inline-v3-specification-table .spec-value-input {
    overflow-wrap: anywhere;

    word-break: break-word;
}


/* ==========================================================
   FOCUS
========================================================== */

.inline-v3-specification-table .spec-key-input:focus,
.inline-v3-specification-table .spec-value-input:focus {
    outline: none;

    border-color: #1d3c58;

    box-shadow: 0 0 0 1px #1d3c58;
}


/* ==========================================================
   CỘT NÚT THAO TÁC
========================================================== */

.spec-row-actions {
    width: 100%;
    max-width: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 2px;

    box-sizing: border-box;

    overflow: hidden;
}


/* ==========================================================
   NÚT THÊM / XÓA
   KHÔNG BACKGROUND
   KHÔNG BORDER
========================================================== */

.spec-add-row,
.spec-delete-row {
    width: 22px;
    height: 22px;

    min-width: 22px;
    max-width: 22px;

    min-height: 22px;
    max-height: 22px;

    padding: 0;
    margin: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    border: none !important;

    background: transparent !important;

    border-radius: 0;

    font-family: inherit;

    font-size: 18px;

    font-weight: bold;

    line-height: 1;

    cursor: pointer;

    overflow: hidden;

    transition:
        color 0.15s ease,
        transform 0.15s ease;
}


/* ==========================================================
   NÚT THÊM - XANH LÁ
========================================================== */

.spec-add-row {
    color: #28a745 !important;
}

.spec-add-row:hover {
    color: #218838 !important;

    background: transparent !important;

    transform: scale(1.1);
}


/* ==========================================================
   NÚT XÓA - ĐỎ
========================================================== */

.spec-delete-row {
    color: #dc3545 !important;
}

.spec-delete-row:hover {
    color: #c82333 !important;

    background: transparent !important;

    transform: scale(1.1);
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 600px) {

    .inline-v3-specification-table .spec-key-column {
        width: 46%;
    }


    .inline-v3-specification-table th:nth-child(2),
    .inline-v3-specification-table td:nth-child(2) {
        width: 46%;
    }


    .inline-v3-specification-table th:last-child,
    .inline-v3-specification-table td:last-child {
        width: 8%;

        min-width: 32px;
        max-width: 36px;

        padding: 2px;
    }


    .inline-v3-specification-table th,
    .inline-v3-specification-table td {
        padding: 4px;
    }


    .inline-v3-specification-table .spec-key-input,
    .inline-v3-specification-table .spec-value-input {
        width: 100%;
        max-width: 100%;

        min-height: 42px;

        padding: 6px;

        font-size: 13px;
    }


    .spec-add-row,
    .spec-delete-row {
        width: 20px;
        height: 20px;

        min-width: 20px;
        max-width: 20px;

        min-height: 20px;
        max-height: 20px;

        font-size: 16px;
    }
}