.tplp-dashboard{max-width:1100px;margin:14px auto}.tplp-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:16px;margin:12px 0;box-shadow:0 3px 14px rgba(0,0,0,.04)}.tplp-card h3{margin:0 0 12px}.tplp-auth{max-width:520px;margin:30px auto}.tplp-hero{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#0d47a1;color:#fff;border-radius:12px;padding:11px 14px}.tplp-customer-line{font-size:15px;line-height:1.5}.tplp-customer-line strong{font-weight:700}.tplp-divider{opacity:.7;margin:0 5px}.tplp-form{display:grid;gap:10px}.tplp-form label{font-weight:600}.tplp-form input,.tplp-form select,.tplp-form textarea{width:100%;height:40px;padding:8px 10px;border:1px solid #cfd8dc;border-radius:8px;background:#fff}.tplp-form input[type=file]{height:auto;padding:7px}.tplp-btn{display:inline-flex;align-items:center;justify-content:center;min-height:38px;background:#0d47a1;color:#fff!important;border:0;border-radius:8px;padding:8px 14px;text-decoration:none;cursor:pointer;font-weight:600}.tplp-btn-small{min-height:34px;padding:6px 11px}.tplp-btn-light{background:#fff;color:#0d47a1!important}.tplp-section-head{display:flex;gap:10px;align-items:center;justify-content:space-between}.tplp-section-head h3{margin:0}.tplp-collapsible{margin:12px 0;padding:12px;background:#f7f9fc;border-radius:10px}.tplp-compact-form{max-width:680px}.tplp-field-row{display:grid!important;grid-template-columns:82px minmax(0,1fr);align-items:center;gap:8px}.tplp-field-row>span{font-weight:600}.tplp-upload-note{margin-left:90px;font-size:12px;color:#667085}.tplp-submit-btn{width:max-content;margin-left:90px}.tplp-table-wrap{overflow:auto}.tplp-table{width:100%;border-collapse:collapse}.tplp-table th,.tplp-table td{padding:8px;border-bottom:1px solid #edf0f2;text-align:left;vertical-align:middle}.tplp-thumb{width:72px!important;height:72px!important;border-radius:8px;object-fit:cover}.tplp-image-open{display:block;border:0;padding:0;background:none;cursor:zoom-in}.tplp-empty{padding:12px;background:#f7f9fc;border-radius:8px;color:#667085}.tplp-notice{padding:12px 14px;border-radius:8px;margin:12px 0}.tplp-success{background:#e8f5e9;color:#1b5e20}.tplp-error{background:#ffebee;color:#b71c1c}.tplp-inline-form{display:inline}.tplp-link-danger{border:0;background:none;color:#c62828;cursor:pointer}.tplp-lightbox{position:fixed;z-index:999999;inset:0;background:rgba(0,0,0,.88);display:flex;align-items:center;justify-content:center;flex-direction:column;padding:54px 16px 18px}.tplp-lightbox[hidden]{display:none}.tplp-lightbox img{max-width:96vw;max-height:78vh;object-fit:contain;transition:transform .2s}.tplp-lightbox-close{position:absolute;top:10px;right:16px;border:0;background:transparent;color:#fff;font-size:40px;line-height:1;cursor:pointer}.tplp-lightbox-download{margin-top:12px;background:#fff;color:#0d47a1!important}@media(max-width:700px){.tplp-dashboard{margin:8px auto}.tplp-card{padding:12px;margin:9px 0}.tplp-hero{padding:9px 10px}.tplp-customer-line{font-size:14px;white-space:nowrap}.tplp-btn-small{font-size:13px}.tplp-section-head{align-items:center;flex-direction:row}.tplp-section-head .tplp-btn{white-space:nowrap}.tplp-field-row{grid-template-columns:70px minmax(0,1fr);gap:6px}.tplp-upload-note,.tplp-submit-btn{margin-left:76px}.tplp-table th,.tplp-table td{white-space:nowrap;padding:7px}.tplp-thumb{width:64px!important;height:64px!important}}@media(max-width:430px){.tplp-hero{flex-wrap:wrap}.tplp-customer-line{white-space:normal;flex:1 1 260px}.tplp-divider{margin:0 2px}.tplp-section-head{gap:6px}.tplp-section-head h3{font-size:17px}.tplp-section-head .tplp-btn{font-size:12px;padding:6px 8px}}
.tplp-create-btn{width:auto!important;min-width:0!important;min-height:30px!important;height:30px!important;padding:3px 9px!important;font-size:13px!important;line-height:1.1!important;border-radius:6px!important;white-space:nowrap!important}
.tplp-row-actions{display:flex;align-items:center;gap:8px}.tplp-link-edit{border:0;background:none;color:#0d47a1;cursor:pointer;padding:0;font-weight:600}.tplp-edit-row td{background:#f7f9fc!important;padding:10px!important}.tplp-edit-form{max-width:680px}.tplp-edit-actions{margin-left:90px;display:flex;gap:8px}.tplp-btn-compact,.tplp-btn-secondary.tplp-btn-compact{width:auto!important;min-width:0!important;min-height:32px!important;padding:5px 10px!important;font-size:13px!important}.tplp-btn-secondary{display:inline-flex;align-items:center;justify-content:center;border:1px solid #cfd8dc;border-radius:7px;background:#fff;color:#334155;cursor:pointer;font-weight:600}
@media(max-width:700px){.tplp-edit-actions{margin-left:76px}.tplp-create-btn{height:29px!important;min-height:29px!important;padding:3px 7px!important;font-size:12px!important}}

/* v1.2.2: keep secondary action labels visible on white background */
.tplp-btn.tplp-btn-secondary{background:#fff!important;color:#0d47a1!important;border:1px solid #b8c6d9!important}
.tplp-segmented{display:flex;flex-wrap:wrap;gap:6px}
.tplp-segmented .tplp-btn{white-space:nowrap}

/* v1.2.3: bulk entry, shipment request and visible actions */
.tplp-btn,.tplp-btn-secondary,.tplp-link-edit,.tplp-link-danger{opacity:1!important;text-indent:0!important;font-size:13px}
.tplp-btn:disabled{opacity:.55!important;cursor:not-allowed}
.tplp-select-col{width:38px;text-align:center!important}
.tplp-select-col input{width:18px;height:18px;cursor:pointer}
.tplp-select-col input:disabled{cursor:not-allowed;opacity:.35}
.tplp-shipment-request{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px;padding:12px;background:#f7f9fc;border:1px solid #e4e9f0;border-radius:10px}
.tplp-request-summary{margin-right:auto;color:#334155}
.tplp-request-channels{display:flex;flex-wrap:wrap;gap:7px;width:100%;padding-top:4px}
.tplp-request-message{width:100%;min-height:150px;margin-top:4px;padding:10px;border:1px solid #cfd8dc;border-radius:8px;background:#fff}
.tplp-entry-actions{display:flex;align-items:center;gap:8px;margin-left:90px}
.tplp-entry-actions .tplp-submit-btn{margin-left:0}
.tplp-muted{color:#667085;font-size:12px;white-space:nowrap}
@media(max-width:700px){.tplp-entry-actions{margin-left:76px;flex-wrap:wrap}.tplp-shipment-request{align-items:stretch}.tplp-request-summary{width:100%}.tplp-request-shipment{width:100%}.tplp-request-channels .tplp-btn{flex:1 1 auto}}

/* v1.2.3-beta-r1: aligned mobile shipment actions and employee bulk export */
.tplp-employee-bulk-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;margin-top:12px;padding:12px;background:#f7f9fc;border:1px solid #e4e9f0;border-radius:10px}
.tplp-employee-bulk-submit{min-width:180px}
@media(max-width:700px){
  .tplp-shipment-request{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:10px}
  .tplp-request-summary{grid-column:1/-1;width:auto;margin:0}
  .tplp-request-shipment{grid-column:1/-1;width:100%;min-height:42px}
  .tplp-request-channels{grid-column:1/-1;display:grid!important;grid-template-columns:1fr 1fr;gap:10px;width:100%;padding-top:0}
  .tplp-request-channels[hidden]{display:none!important}
  .tplp-request-channels .tplp-btn{width:100%!important;min-height:42px!important;margin:0!important;padding:8px 10px!important;white-space:nowrap}
  .tplp-request-channels .tplp-copy-request{grid-column:1/-1}
  .tplp-request-message{grid-column:1/-1;min-height:140px;margin:0}
  .tplp-employee-bulk-actions{align-items:stretch;flex-direction:column;gap:8px}
  .tplp-employee-bulk-actions>div{width:100%}
  .tplp-employee-bulk-submit{width:100%;min-width:0;min-height:42px}
}
@media(max-width:380px){
  .tplp-request-channels{grid-template-columns:1fr}
  .tplp-request-channels .tplp-copy-request{grid-column:auto}
}

/* v1.2.3-beta-r2: compact aligned mobile actions + equal entry buttons */
.tplp-entry-actions .tplp-entry-action-btn{
  width:118px!important;
  min-width:118px!important;
  min-height:38px!important;
  padding:7px 12px!important;
  font-size:13px!important;
  border-radius:8px!important;
}
@media(max-width:700px){
  .tplp-shipment-request{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  .tplp-request-summary,
  .tplp-request-shipment,
  .tplp-request-channels,
  .tplp-request-message{grid-column:1}
  .tplp-request-shipment{
    min-height:38px!important;
    height:38px!important;
    padding:6px 10px!important;
    font-size:12px!important;
  }
  .tplp-request-channels{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }
  .tplp-request-channels[hidden]{display:none!important}
  .tplp-request-channels .tplp-btn,
  .tplp-request-channels .tplp-copy-request{
    grid-column:auto!important;
    width:100%!important;
    min-width:0!important;
    min-height:36px!important;
    height:36px!important;
    margin:0!important;
    padding:5px 4px!important;
    font-size:11px!important;
    line-height:1.15!important;
    border-radius:7px!important;
    white-space:nowrap!important;
  }
  .tplp-entry-actions{
    margin-left:76px;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,118px));
    gap:8px;
  }
  .tplp-entry-actions .tplp-entry-action-btn{
    width:100%!important;
    min-width:0!important;
  }
}
@media(max-width:360px){
  .tplp-request-channels{gap:4px}
  .tplp-request-channels .tplp-btn,
  .tplp-request-channels .tplp-copy-request{font-size:10px!important;padding:4px 2px!important}
  .tplp-entry-actions{grid-template-columns:1fr 1fr}
}


/* v1.2.3-beta-r4: keep parcel thumbnails square on phones */
.tplp-image-open{
  width:72px!important;
  height:72px!important;
  min-width:72px!important;
  min-height:72px!important;
  overflow:hidden!important;
  border-radius:8px!important;
}
.tplp-image-open .tplp-thumb,
.tplp-thumb{
  display:block!important;
  width:72px!important;
  height:72px!important;
  min-width:72px!important;
  min-height:72px!important;
  max-width:72px!important;
  max-height:72px!important;
  aspect-ratio:1/1!important;
  object-fit:cover!important;
  border-radius:8px!important;
}
@media(max-width:700px){
  .tplp-image-open{
    width:54px!important;
    height:54px!important;
    min-width:54px!important;
    min-height:54px!important;
  }
  .tplp-image-open .tplp-thumb,
  .tplp-thumb{
    width:54px!important;
    height:54px!important;
    min-width:54px!important;
    min-height:54px!important;
    max-width:54px!important;
    max-height:54px!important;
    aspect-ratio:1/1!important;
    object-fit:cover!important;
  }
}

/* r5: Gom các kiện đã xuất kho theo từng đợt và từng kho */
.tplp-shipped-section{padding:0;overflow:hidden}
.tplp-shipped-summary,.tplp-export-group>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;user-select:none}
.tplp-shipped-summary::-webkit-details-marker,.tplp-export-group>summary::-webkit-details-marker{display:none}
.tplp-shipped-summary{padding:16px 18px}
.tplp-shipped-summary>span:last-child,.tplp-export-group>summary>span:last-child{display:flex;flex-direction:column;gap:2px}
.tplp-shipped-summary small,.tplp-export-group summary small{font-size:12px;font-weight:400;color:#667085}
.tplp-shipped-content{padding:0 12px 14px}
.tplp-export-arrow{font-size:24px;line-height:1;transition:transform .2s ease;color:#0f4fa8}
.tplp-shipped-section[open]>.tplp-shipped-summary .tplp-export-arrow,.tplp-export-group[open]>summary .tplp-export-arrow{transform:rotate(90deg)}
.tplp-export-groups{display:grid;gap:10px}
.tplp-export-group{border:1px solid #dce5f1;border-radius:10px;background:#fff;overflow:hidden}
.tplp-export-group>summary{padding:12px 14px;background:#f5f8fc}
.tplp-export-group>.tplp-table-wrap{margin:0;border-top:1px solid #e5eaf1;border-radius:0}
.tplp-export-group .tplp-table{margin:0}
@media(max-width:600px){
  .tplp-shipped-summary{padding:13px 12px}
  .tplp-shipped-content{padding:0 8px 10px}
  .tplp-export-group>summary{padding:10px}
  .tplp-export-group summary strong{font-size:13px}
  .tplp-export-group summary small{font-size:11px}
}
\n\n/* v1.2.3-beta-r8: balanced request-channel buttons on desktop */\n@media(min-width:701px){\n  .tplp-request-channels{\n    display:grid!important;\n    grid-template-columns:repeat(3,minmax(0,1fr))!important;\n    gap:8px!important;\n    width:100%!important;\n    max-width:520px;\n    padding-top:4px;\n  }\n  .tplp-request-channels[hidden]{display:none!important}\n  .tplp-request-channels .tplp-btn,\n  .tplp-request-channels .tplp-copy-request{\n    width:100%!important;\n    min-width:0!important;\n    min-height:38px!important;\n    height:38px!important;\n    margin:0!important;\n    padding:7px 10px!important;\n    font-size:12px!important;\n    line-height:1.15!important;\n    border-radius:7px!important;\n    white-space:nowrap!important;\n  }\n}\n
/* v1.2.4-beta: draft queue and parcel edit controls */
.tplp-draft-confirm-form{margin-top:14px;border-top:1px solid #dce5f1;padding-top:14px}
.tplp-draft-confirm-form .tplp-employee-bulk-actions{margin-top:10px}
.tplp-inline-form{display:inline-flex;align-items:center;gap:6px;margin:0}
.tplp-link-edit,.tplp-link-danger{border:0;background:transparent;padding:3px 5px;cursor:pointer;font-weight:600}
.tplp-link-edit{color:#0f4fa8}.tplp-link-danger{color:#c62828}
.tplp-edit-row td{background:#f7f9fc}
@media(max-width:700px){
  .tplp-draft-confirm-form .tplp-table{min-width:640px}
  .tplp-employee-table{min-width:800px}
}

/* v1.2.4-beta-r2: reliable draft confirmation + equal entry buttons */
.tplp-draft-queue{margin-top:14px;border-top:1px solid #dce5f1;padding-top:14px}
.tplp-draft-queue .tplp-draft-confirm-form{display:none;margin:0;padding:0;border:0}
.tplp-draft-queue .tplp-employee-bulk-actions{margin-top:10px}
.tplp-entry-actions .tplp-entry-action-btn{
  box-sizing:border-box!important;
  flex:1 1 0!important;
  width:auto!important;
  min-width:0!important;
  min-height:40px!important;
  height:40px!important;
  margin:0!important;
  padding:7px 10px!important;
  font-family:inherit!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.2!important;
  text-transform:none!important;
  letter-spacing:normal!important;
  white-space:nowrap!important;
}
@media(max-width:700px){
  .tplp-entry-actions{
    width:calc(100% - 76px)!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}


/* v1.2.4-beta-r3: đồng bộ toàn bộ nút Portal về kiểu chữ thường, gọn và cân đối */
.tplp-dashboard .tplp-btn,
.tplp-auth .tplp-btn,
.tplp-dashboard button.tplp-link-edit,
.tplp-dashboard button.tplp-link-danger,
.tplp-dashboard input[type="submit"]{
  box-sizing:border-box!important;
  min-height:34px!important;
  height:34px!important;
  padding:5px 11px!important;
  font-family:inherit!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.15!important;
  text-transform:none!important;
  letter-spacing:normal!important;
  white-space:nowrap!important;
}
.tplp-dashboard .tplp-btn-small,
.tplp-dashboard .tplp-btn-compact,
.tplp-dashboard .tplp-create-btn{
  min-height:32px!important;
  height:32px!important;
  padding:4px 9px!important;
  font-size:12px!important;
}
.tplp-dashboard .tplp-request-shipment,
.tplp-dashboard .tplp-request-channels .tplp-btn,
.tplp-dashboard .tplp-employee-bulk-submit,
.tplp-dashboard .tplp-confirm-drafts,
.tplp-dashboard .tplp-entry-action-btn{
  min-height:34px!important;
  height:34px!important;
  padding:5px 10px!important;
  font-size:13px!important;
  text-transform:none!important;
}
.tplp-dashboard .tplp-entry-actions .tplp-entry-action-btn{
  min-height:34px!important;
  height:34px!important;
}
@media(max-width:700px){
  .tplp-dashboard .tplp-btn,
  .tplp-auth .tplp-btn,
  .tplp-dashboard .tplp-request-shipment,
  .tplp-dashboard .tplp-request-channels .tplp-btn,
  .tplp-dashboard .tplp-employee-bulk-submit,
  .tplp-dashboard .tplp-confirm-drafts,
  .tplp-dashboard .tplp-entry-action-btn{
    min-height:34px!important;
    height:34px!important;
    padding:5px 8px!important;
    font-size:12px!important;
  }
  .tplp-dashboard .tplp-btn-small,
  .tplp-dashboard .tplp-btn-compact,
  .tplp-dashboard .tplp-create-btn{
    min-height:30px!important;
    height:30px!important;
    padding:4px 7px!important;
    font-size:11.5px!important;
  }
}
