/* ====== COMMON ====== */
.erp-style-wrapper {
    font-family: Arial, sans-serif;
    font-size: 13px;
}

.erp-title {
    font-size: 26px;
    margin-bottom: 16px;
}

/* Tabs */
.erp-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.erp-tab {
    padding: 6px 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f7f7f7;
    cursor: pointer;
    font-size: 13px;
}

.erp-tab.active {
    background: #2f72bd;
    color: #fff;
    border-color: #2f72bd;
}

.erp-tab-content {
    display: none;
    border: 1px solid #e1e4ea;
    padding: 16px;
    margin-bottom: 16px;
    background: #fff;
}

.erp-tab-content.active {
    display: block;
}

/* Form section */
.erp-section {
    margin-bottom: 16px;
}

.erp-section-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.erp-label {
    display: block;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 4px;
}

.erp-input,
.erp-textarea {
    width: 100%;
    max-width: 500px;
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.erp-textarea {
    min-height: 60px;
}

/* PO small inputs */
.erp-input-small {
    width: 140px;
    padding: 4px 6px;
    margin-right: 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
}

.po-row {
    margin-bottom: 6px;
}

/* Photo preview */
.erp-photo-preview {
    margin-top: 6px;
}

.erp-photo-img {
    max-width: 200px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Buttons */
.erp-add-row,
.erp-btn-add,
.erp-btn-delete,
.erp-submit {
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 3px;
    border: 1px solid #2f72bd;
    background: #2f72bd;
    color: #fff;
    cursor: pointer;
}

.erp-btn-delete {
    border-color: #c0392b;
    background: #c0392b;
}

.erp-btn-add {
    background: #ffffff;
    color: #2f72bd;
}

.erp-submit {
    margin-top: 12px;
}

/* Table */
.erp-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 12px;
}

.erp-table th,
.erp-table td {
    border: 1px solid #e0e0e0;
    padding: 5px 6px;
}

/* Success alert */
.erp-alert-success {
    padding: 8px 12px;
    background: #e2f6e8;
    border: 1px solid #7ac48b;
    margin-bottom: 10px;
}


/* ====== STYLE MASTER LIST ====== */

.erp-style-list-wrapper {
    padding: 16px 10px;
    font-size: 13px;
}

.erp-style-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

/* Filter bar */
.erp-style-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px; /* khoảng cách giữa các ô lọc */
    margin-bottom: 12px;
    align-items: flex-end;
}

.erp-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.erp-filter-group label {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.04em;
}

.erp-input-filter {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.erp-filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* List buttons */
.erp-style-list-actions {
    margin: 8px 0;
    display: flex;
    gap: 8px;
}

/* Button styles */
.erp-btn-primary,
.erp-btn-secondary,
.erp-btn-light {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.erp-btn-primary {
    background: #2f72bd;
    color: #fff;
    border-color: #2f72bd;
}

.erp-btn-secondary {
    background: #ffffff;
    color: #2f72bd;
    border-color: #2f72bd;
}

.erp-btn-light {
    background: #f5f5f5;
    color: #333;
    border-color: #d0d0d0;
}

/* List table */
.erp-style-list-table th,
.erp-style-list-table td {
    padding: 6px 8px;
    vertical-align: middle;
}

.erp-style-list-table th {
    background: #f4f7fb;
    font-size: 12px;
}

.erp-style-list-table tr:nth-child(even) {
    background: #fafafa;
}

.erp-list-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.erp-style-actions a {
    font-size: 12px;
}

/* Hide filter & buttons on print */
@media print {
    .erp-style-filters,
    .erp-style-list-actions,
    .erp-style-list-header a {
        display: none !important;
    }
}
/* ===========================
   DEVELOP LIST – PAGE LAYOUT
   =========================== */

.erp-develop-list-wrapper {
    padding: 24px 32px 40px;
    background: #f5f7fb;
    min-height: calc(100vh - 40px);
    font-size: 13px;
}

.erp-develop-list-wrapper h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #22304a;
}

/* ========= FILTER BAR ========= */

.erp-dev-filter-bar {
    background: #ffffff;
    border-radius: 8px;
    padding: 14px 18px 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    border: 1px solid #e3e7f2;
    margin-bottom: 10px;
}

.erp-dev-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: flex-end;
}

.erp-dev-filter-item {
    display: flex;
    flex-direction: column;
}

.erp-dev-filter-item label {
    font-size: 11px;
    text-transform: none;
    letter-spacing: 0.03em;
    color: #6b7280;
    margin-bottom: 4px;
}

    .erp-dev-filter-item .erp-input-search,
    .erp-dev-filter-item select {
        min-width: 140px;
        height: 28px !important; /* Điều chỉnh chiều cao của ô tìm kiếm */
        padding: 3px 8px;
        border-radius: 4px;
        border: 1px solid #d4dae8;
        font-size: 13px;
        outline: none;
        background: #fff;
    }
/* Tăng độ tương phản của nút "Add New Sample" */
.erp-dev-toolbar-add {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #2f72bd;
    background-color: #2f72bd;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.erp-dev-filter-item .erp-input-search:focus,
.erp-dev-filter-item select:focus {
    border-color: #2f72bd;
    box-shadow: 0 0 0 1px rgba(47, 114, 189, 0.15);
}

.erp-dev-filter-buttons {
    margin-left: auto;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
}

/* Cross search + Clear giống ERP CN */

.erp-btn-search {
    height: 30px;
    padding: 0 14px;
    border-radius: 4px;
    border: 1px solid #2f72bd;
    background: #2f72bd;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.erp-btn-search:hover {
    background: #24588f;
    border-color: #24588f;
}

.erp-btn-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid #2f72bd; /* Thêm viền cho nút Clear */
    background: transparent;
    font-size: 13px;
    color: #2f72bd; /* Đổi màu chữ thành màu xanh nước biển như viền */
    text-decoration: none;
    cursor: pointer; /* Đảm bảo nút Clear có thể click */
}

    .erp-btn-clear:hover {
        background: #f0f8ff; /* Thêm hiệu ứng hover cho nút Clear */
        border-color: #24588f; /* Thay đổi màu viền khi hover */
        color: #24588f; /* Đổi màu chữ khi hover */
    }

/* ========= TOOLBAR ========= */

.erp-list-toolbar {
    margin-top: 6px;
    margin-bottom: 6px;
    background: #ffffff;
    border-radius: 8px;
    padding: 6px 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    border: 1px solid #e3e7f2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.erp-toolbar-btn {
    min-width: 52px;
    height: 28px;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid #d4dae8;
    background: #ffffff;
    font-size: 12px;
    cursor: pointer;
    color: #374151;
    line-height: 1;
}

.erp-toolbar-btn:hover {
    background: #f3f4ff;
    border-color: #2f72bd;
    color: #1f3c66;
}

.erp-toolbar-btn.danger {
    border-color: #f5b6b6;
    background: #fdecec;
    color: #b91c1c;
}

.erp-toolbar-btn.danger:hover {
    background: #fcd3d3;
    border-color: #f5a1a1;
}

.erp-toolbar-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ========= TABLE ========= */

#erpDevelopListTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    table-layout: fixed;
}

#erpDevelopListTable thead {
    background: #eef2ff;
}

#erpDevelopListTable th,
#erpDevelopListTable td {
    padding: 6px 8px;
    font-size: 12px;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #edf0f7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#erpDevelopListTable th:last-child,
#erpDevelopListTable td:last-child {
    border-right: none;
}

#erpDevelopListTable th {
    font-weight: 600;
    color: #374151;
    text-align: left;
}

#erpDevelopListTable tbody tr:nth-child(even) {
    background: #fafbff;
}

#erpDevelopListTable tbody tr:hover {
    background: #e9f2ff;
}

#erpDevelopListTable tbody td:first-child,
#erpDevelopListTable thead th:first-child {
    text-align: center;
    width: 34px;
}

/* Checkbox chỉnh nhỏ gọn */

#erpDevelopListTable input[type="checkbox"],
#erpDevCheckAll {
    width: 14px;
    height: 14px;
}

/* “No develop samples found.” căn giữa */

#erpDevelopListTable tbody tr td[colspan] {
    text-align: center;
    padding: 14px 8px;
    color: #6b7280;
    font-style: italic;
}
/*Lọc bảng*/
th[data-sort]:hover {
    cursor: pointer;
}

th[data-sort][data-sort-order="asc"]:after {
    content: " ▲";
}

th[data-sort][data-sort-order="desc"]:after {
    content: " ▼";
}

/* ===== DEVELOP – REQUEST SAMPLE FORM ===== */

.erp-develop-request-wrapper {
    max-width: 1200px;
    margin: 24px auto 40px;
}

.erp-develop-request-wrapper .erp-page-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* layout 2 cột giống ERP Trung Quốc */
.erp-develop-form .erp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-column-gap: 32px;
    grid-row-gap: 14px;
}

.erp-develop-form .erp-field {
    width: 100%;
}

.erp-develop-form .erp-field-full {
    grid-column: 1 / -1; /* full width */
}

.erp-develop-form .erp-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #495057;
}

.erp-develop-form .erp-required {
    color: #d9534f;
}

/* input / select / textarea chung */
.erp-develop-form .erp-input,
.erp-develop-form select,
.erp-develop-form textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.erp-develop-form textarea.erp-textarea {
    min-height: 80px;
    resize: vertical;
}

/* nút save */
.erp-develop-form .erp-form-actions {
    margin-top: 24px;
}

.erp-develop-form .erp-btn-primary {
    display: inline-block;
    padding: 8px 20px;
    background-color: #2f72bd;
    color: #fff;
    border-radius: 4px;
    border: 1px solid #2f72bd;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.erp-develop-form .erp-btn-primary:hover {
    background-color: #285fa0;
    box-shadow: 0 3px 6px rgba(0,0,0,0.18);
}

.erp-develop-form .erp-btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
/* ------------------------------------------------------------------
   DEVELOP - REQUEST SAMPLE FORM (tabs)
------------------------------------------------------------------ */

.erp-dev-request-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px 24px 40px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(15, 35, 52, 0.06);
}

.erp-dev-request-wrapper .erp-page-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 18px;
}

.erp-dev-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e0e4ec;
    margin-bottom: 16px;
}

.erp-dev-tab-btn {
    border: none;
    background: transparent;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
}

.erp-dev-tab-btn:hover {
    background: #f4f7fb;
    color: #374151;
}

.erp-dev-tab-btn.active {
    background: #ffffff;
    color: #1f2933;
    box-shadow: 0 -1px 0 #e0e4ec, 0 0 0 1px #e0e4ec;
}

/* nội dung mỗi tab */
.erp-dev-tab-pane {
    display: none;
    padding-top: 16px;
}

.erp-dev-tab-pane.active {
    display: block;
}

/* section bên trong tab như Fabric / Trim */
.erp-dev-section {
    margin-top: 4px;
}

.erp-dev-section-toolbar {
    margin-bottom: 8px;
}

.erp-dev-section-toolbar .erp-toolbar-btn {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #ced4e0;
    background: #f8fafc;
    margin-right: 4px;
    cursor: pointer;
}

.erp-dev-section-toolbar .erp-toolbar-btn:hover {
    background: #e2ebff;
}

.erp-dev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.erp-dev-table th,
.erp-dev-table td {
    border: 1px solid #e1e5ef;
    padding: 4px 6px;
    text-align: left;
    white-space: nowrap;
}

.erp-dev-table thead th {
    background: #f8fafc;
    font-weight: 600;
}

.erp-dev-empty-row {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
}

/* chỉnh nhẹ input trong form basic cho giống ERP CN */
.erp-dev-request-wrapper form input[type="text"],
.erp-dev-request-wrapper form select,
.erp-dev-request-wrapper form textarea {
    border: 1px solid #d0d7e2;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
}

.erp-dev-request-wrapper form textarea {
    min-height: 60px;
}
.erp-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.erp-login-inner {
    width: 80%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.erp-login-left,
.erp-login-right {
    flex: 1 1 0;
    padding: 40px 60px;
}

.erp-login-left {
    text-align: center;
}

.erp-login-logo {
    max-width: 100%;
    height: auto;
}

.erp-login-logo-text {
    font-size: 48px;
    font-weight: 600;
    color: #1c5da8;
    margin: 0;
}

.erp-login-env {
    margin-top: 20px;
    font-size: 13px;
    letter-spacing: 1px;
    color: #555;
}

.erp-login-divider {
    width: 1px;
    align-self: stretch;
    background: #d5d5d5;
}

.erp-login-right {
    max-width: 420px;
}

.erp-login-title {
    font-size: 28px;
    margin-bottom: 24px;
}

#erp-login-form p {
    margin-bottom: 16px;
}

#erp-login-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

#erp-login-form input[type="text"],
#erp-login-form input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

#erp-login-form .forgetmenot {
    display: none;
}

#erp-login-form .submit input[type="submit"] {
    padding: 8px 24px;
    border: none;
    border-radius: 16px;
    background: #7841b9;
    color: #fff;
    cursor: pointer;
}

#erp-login-form .submit input[type="submit"]:hover {
    opacity: 0.9;
}

.erp-login-links {
    margin-top: 12px;
    font-size: 13px;
}
/* Ẩn sidebar ERP ở 3 trang portal */
.page-id-127 #erp-sidebar,
.page-id-129 #erp-sidebar,
.page-id-131 #erp-sidebar {
    display: none;
}

/* Cho vùng content full width khi sidebar ẩn */
.page-id-127 #erp-main,
.page-id-129 #erp-main,
.page-id-131 #erp-main {
    margin-left: 0;
}
/* Layout 2 cột cho các trang portal */
.page-id-127 .portal-page,
.page-id-129 .portal-page,
.page-id-131 .portal-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 80px;
    box-sizing: border-box;
    background: #ffffff;
    font-family: "Helvetica Neue", Arial, sans-serif;
}

/* Cột trái: logo + company */
.portal-brand {
    flex: 1;
    padding-right: 60px;
    text-align: center;
    border-right: 1px solid #e3e6ef;
}

/* Logo: chỉ cần đổi đường dẫn ảnh này là đổi logo */
.portal-logo {
    width: 320px;
    max-width: 100%;
    height: 160px;
    margin: 0 auto 32px auto;
    background-image: url("https://royalstitches.com.vn/wp-content/uploads/portal-logo.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

/* Tên công ty */
.portal-company-name {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #2059a8;
    margin: 0 0 8px 0;
}

.portal-company-sub {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7f8796;
}

/* Cột phải: form */
.portal-form-box {
    flex: 0 0 380px;
    padding-left: 60px;
}

.portal-form-title {
    font-size: 26px;
    margin: 0 0 24px 0;
    font-weight: 700;
    color: #222;
}

/* Style form mặc định của 3 shortcode */
.portal-form-box form p {
    margin-bottom: 16px;
}

.portal-form-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

.portal-form-box input[type="text"],
.portal-form-box input[type="password"],
.portal-form-box input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #cfd3df;
    border-radius: 4px;
    font-size: 14px;
}

.portal-form-box input[type="text"]:focus,
.portal-form-box input[type="password"]:focus,
.portal-form-box input[type="email"]:focus {
    outline: none;
    border-color: #5b8de0;
    box-shadow: 0 0 0 1px rgba(91, 141, 224, 0.15);
}

.portal-form-box input[type="submit"] {
    margin-top: 8px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 16px;
    border: none;
    background: #6b4fcf;
    color: #fff;
    cursor: pointer;
}

.portal-form-box input[type="submit"]:hover {
    background: #593dc0;
}

/* Remember me + links dưới form */
.portal-form-box .forgetmenot {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.portal-form-box .forgetmenot label {
    font-weight: 400;
    margin: 0 0 0 6px;
}

.portal-form-box .portal-links,
.portal-form-box .login #nav,
.portal-form-box .login #backtoblog {
    margin-top: 12px;
    font-size: 13px;
}

.portal-form-box a {
    color: #6b4fcf;
    text-decoration: none;
}

.portal-form-box a:hover {
    text-decoration: underline;
}

/* Responsive: mobile xếp dọc */
@media (max-width: 960px) {
    .page-id-127 .portal-page,
    .page-id-129 .portal-page,
    .page-id-131 .portal-page {
        flex-direction: column;
        padding: 40px 20px;
    }

    .portal-brand {
        border-right: none;
        border-bottom: 1px solid #e3e6ef;
        padding-right: 0;
        padding-bottom: 32px;
        margin-bottom: 32px;
    }

    .portal-form-box {
        padding-left: 0;
        width: 100%;
        max-width: 420px;
    }
}
#erpDevelopListTable {
    width: 100%;
    overflow-x: auto;
    display: block;
}
/* Màu nền đỏ cho các ô quá hạn */
.important-overdue {
    background-color: #f8d7da;
}

/* Màu nền vàng cho các ô số lượng thấp */
.important-low-quantity {
    background-color: #fff3cd;
}