#rcepCatalogButton[hidden] { display: none !important; }
.rcep-dialog { width: min(1100px, calc(100vw - 32px)); height: calc(100vh - 48px); height: calc(100dvh - 48px); max-height: none; padding: 0; border: 1px solid #b9cbd8; border-radius: 8px; color: #233c50; background: #fff; box-shadow: 0 22px 70px #142c4540; font: inherit; overflow: hidden; }
.rcep-dialog[open] { display: flex; flex-direction: column; }
.rcep-dialog::backdrop { background: #1d344758; backdrop-filter: blur(3px); }
.rcep-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; background: linear-gradient(90deg, #e8eff5, #f8fafc); border-top: 4px solid #365e80; border-bottom: 1px solid #b5c9da; }
.rcep-dialog header small { color: #60778a; font-size: 12px; letter-spacing: .08em; }
.rcep-dialog h2 { margin: 4px 0 0; font-size: 21px; font-weight: 600; }
.rcep-mode { margin-left: 10px; padding: 2px 8px; border-radius: 10px; background: #e4eef6; color: #294e70; font-size: 11px; font-weight: 600; vertical-align: middle; }
.rcep-mode.editing { background: #fbeccb; color: #7a5410; }
.rcep-dialog .rcep-close { width: 34px; height: 34px; padding: 0; border: 1px solid #a9bfd3; border-radius: 6px; background: linear-gradient(#fff, #eaf1f6); color: #294e70; font-size: 22px; cursor: pointer; }
.rcep-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 22px; border-bottom: 1px solid #e2eaf0; }
.rcep-tools input[type=search] { flex: 1; min-width: 200px; height: 36px; padding: 0 12px; border: 1px solid #c4d4e1; border-radius: 6px; font: inherit; font-size: 13px; }
.rcep-tools small { flex-basis: 100%; color: #526575; font-size: 12px; }
.rcep-count { color: #5d7282; font-size: 12px; white-space: nowrap; }
.rcep-btn { height: 36px; padding: 0 14px; border: 1px solid #a9bfd3; border-radius: 6px; background: linear-gradient(#fff, #eaf1f6); color: #294e70; font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.rcep-btn.primary { border-color: #d3b77d; background: linear-gradient(180deg, #fffefa, #faf2de 52%, #efddb6); color: #60471d; }
.rcep-btn.danger { border-color: #e0a3a3; background: linear-gradient(#fff, #fbe9e9); color: #8a2c2c; }
.rcep-btn:disabled { opacity: .55; cursor: default; }
.rcep-btn[hidden] { display: none; }
.rcep-btn:focus-visible, .rcep-close:focus-visible { outline: 2px solid #3979b5; outline-offset: 2px; }
.rcep-table-wrap { flex: 1 1 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.rcep-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; background: #fff; font-size: 13px; }
.rcep-table col.c-code { width: 128px; }
.rcep-table col.c-supplier { width: 15%; }
.rcep-table col.c-hs { width: 112px; }
.rcep-table col.c-rate { width: 64px; }
.rcep-table col.c-del { width: 0; }
.rcep-dialog.editing .rcep-table col.c-del { width: 38px; }
.rcep-table th { position: sticky; top: 0; z-index: 1; padding: 8px 10px; overflow: hidden; border-bottom: 1px solid #c9d7e2; background: #eef3f7; color: #3b5870; font-weight: 600; text-align: left; white-space: nowrap; }
.rcep-table th.num, .rcep-table td.rate { text-align: right; }
.rcep-table td { padding: 7px 10px; border-bottom: 1px solid #edf1f4; color: #273541; vertical-align: top; overflow-wrap: anywhere; }
.rcep-table td.code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.rcep-table td.rcep-empty { padding: 28px; color: #82929e; text-align: center; }
.rcep-dialog.editing .rcep-table td { padding: 2px 3px; }
.rcep-table td input { display: block; width: 100%; min-width: 0; height: 30px; padding: 0 7px; border: 1px solid #d7e2ea; border-radius: 4px; background: #fff; color: #273541; font: inherit; font-size: 13px; }
.rcep-table td.rate input { text-align: right; }
.rcep-table td input:focus { outline: none; border-color: #3979b5; box-shadow: 0 0 0 1px #3979b5; }
.rcep-table td input.invalid { border-color: #c43d3d; background: #fdf1f1; box-shadow: 0 0 0 1px #c43d3d; }
.rcep-table tr.is-new td { background: #fffaf0; }
.rcep-table tr.is-dirty td { background: #f4f9ff; }
.rcep-del { width: 28px; height: 28px; border: 1px solid transparent; border-radius: 5px; background: none; color: #9aabb8; font-size: 16px; cursor: pointer; }
.rcep-del:hover { border-color: #e5a9a9; background: #fbe1e1; color: #9a2f2f; }
.rcep-errors { max-height: 96px; margin: 0; padding: 8px 22px 8px 40px; overflow-y: auto; border-top: 1px solid #f0d0d0; background: #fdf1f1; color: #8a2c2c; font-size: 12px; line-height: 1.6; }
.rcep-errors[hidden] { display: none; }
.rcep-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid #dce5ec; background: #f8fafc; }
.rcep-dialog footer p { margin: 0; color: #7a8c99; font-size: 12px; }
.rcep-dialog footer p.warn { color: #8a2c2c; font-weight: 600; }
.rcep-dialog footer small { align-self: center; color: #526575; font-size: 12px; }
.rcep-dialog footer div { display: flex; gap: 10px; }
.rcep-dialog .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .rcep-tools { padding: 10px 12px; }
  .rcep-tools #rcepUploadHelp { order: 1; }
  .rcep-tools input[type=search], .rcep-tools .rcep-count { order: 2; }
  .rcep-tools [data-rcep-add], .rcep-tools [data-rcep-edit] { order: 3; }
  .rcep-tools [data-rcep-add] { margin-left: auto; }
  .rcep-dialog > header, .rcep-dialog footer { padding: 12px; }
  .rcep-dialog footer { flex-direction: column; align-items: stretch; }
  .rcep-dialog { height: calc(100vh - 24px); height: calc(100dvh - 24px); }
  .rcep-table col.c-code { width: 112px; }
  .rcep-table col.c-hs { width: 92px; }
  .rcep-table col.c-rate { width: 52px; }
}
@media (prefers-reduced-motion: reduce) { .rcep-dialog * { transition: none; } }
/* RCEP uses the customs-document palette: blue pending, pale gold requested, grey neutral. */
.legacy-order-table .doc-customs-progress.doc-rcep.todo {
  border-color: #8faeca;
  border-top-color: #bfd1e2;
  border-bottom-color: #6d91b0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .72) 48%, rgba(221, 234, 245, .84) 100%),
    linear-gradient(180deg, #ffffff 0%, #f2f7fb 54%, #e4eef7 100%);
  color: #235475;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .78);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 2px 0 #9ab5cc,
    0 7px 13px rgba(47, 88, 124, .12);
}
.legacy-order-table .doc-customs-progress.doc-rcep.todo:hover {
  border-color: #779fbe;
  border-top-color: #c9d9e7;
  border-bottom-color: #5c85a5;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbfe 48%, #eaf3fa 100%);
  color: #174766;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 3px 0 #8caac4,
    0 10px 17px rgba(47, 88, 124, .16);
}
.legacy-order-table .doc-customs-progress.doc-rcep.todo:active {
  box-shadow:
    inset 0 2px 5px rgba(47, 88, 124, .14),
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 1px 0 #8caac4,
    0 5px 10px rgba(47, 88, 124, .10);
}
.legacy-order-table .doc-customs-progress.doc-rcep.todo > span {
  color: #235475;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .78);
}
.legacy-order-table .doc-customs-progress.doc-rcep.todo b {
  border-color: #9ebbd4;
  background: #f7fbfe;
  color: #235475;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 1px 2px rgba(47, 88, 124, .10);
}
.legacy-order-table .doc-customs-progress.doc-rcep.partial {
  border-color: #8faeca;
  border-top-color: #bfd1e2;
  border-bottom-color: #6d91b0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .72) 48%, rgba(221, 234, 245, .84) 100%),
    linear-gradient(180deg, #ffffff 0%, #f2f7fb 54%, #e4eef7 100%);
  color: #235475;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .78);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 2px 0 #9ab5cc,
    0 7px 13px rgba(47, 88, 124, .12);
}
.legacy-order-table .doc-customs-progress.doc-rcep.partial:hover {
  border-color: #779fbe;
  border-top-color: #c9d9e7;
  border-bottom-color: #5c85a5;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbfe 48%, #eaf3fa 100%);
  color: #174766;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 3px 0 #8caac4,
    0 10px 17px rgba(47, 88, 124, .16);
}
.legacy-order-table .doc-customs-progress.doc-rcep.partial:active {
  box-shadow:
    inset 0 2px 5px rgba(47, 88, 124, .14),
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 1px 0 #8caac4,
    0 5px 10px rgba(47, 88, 124, .10);
}
.legacy-order-table .doc-customs-progress.doc-rcep.partial > span {
  color: #235475;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .78);
}
.legacy-order-table .doc-customs-progress.doc-rcep.partial b {
  border-color: #9ebbd4;
  background: #f7fbfe;
  color: #235475;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 1px 2px rgba(47, 88, 124, .10);
}
.legacy-order-table .doc-customs-progress.doc-rcep.done {
  border-color: #d6bc82;
  border-top-color: #ead6a6;
  border-bottom-color: #b3904e;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .62) 48%, rgba(241, 226, 191, .86) 100%),
    linear-gradient(180deg, #fffef9 0%, #fbf3df 54%, #f1e0ba 100%);
  color: #654a1c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .72);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 2px 0 #c9aa68,
    0 7px 13px rgba(104, 78, 31, .12);
}
.legacy-order-table .doc-customs-progress.doc-rcep.done:hover {
  border-color: #c9aa6d;
  border-top-color: #efddb2;
  border-bottom-color: #a98243;
  background:
    linear-gradient(180deg, #ffffff 0%, #fcf6e8 48%, #f4e6c5 100%);
  color: #5d4216;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 3px 0 #bd9e5d,
    0 10px 17px rgba(104, 78, 31, .16);
}
.legacy-order-table .doc-customs-progress.doc-rcep.done:active {
  box-shadow:
    inset 0 2px 5px rgba(104, 78, 31, .14),
    inset 0 1px 0 rgba(255, 255, 255, .88),
    0 1px 0 #bd9e5d,
    0 5px 10px rgba(104, 78, 31, .10);
}
.legacy-order-table .doc-customs-progress.doc-rcep.done > span {
  color: #654a1c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .72);
}
.legacy-order-table .doc-customs-progress.doc-rcep.done b {
  border-color: #d8bd80;
  background: #fffaf0;
  color: #806020;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 1px 2px rgba(104, 78, 31, .10);
}
.legacy-order-table .doc-customs-progress.doc-rcep.none,
.legacy-order-table .doc-customs-progress.doc-rcep.checking {
  border-color: #c6d1dc;
  border-bottom-color: #a9b7c4;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.22) 44%, rgba(82, 98, 112, .06) 100%),
    linear-gradient(180deg, #f9fbfd 0%, #eef3f7 52%, #dce4eb 100%);
  color: #7d8b9a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 rgba(95,111,126,.10),
    0 1px 0 rgba(161,174,186,.58),
    0 4px 9px rgba(65,78,92,.08);
}
.legacy-order-table .doc-customs-progress.doc-rcep.none:hover,
.legacy-order-table .doc-customs-progress.doc-rcep.checking:hover {
  border-color: #c6d1dc;
  border-bottom-color: #a9b7c4;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.22) 44%, rgba(82, 98, 112, .06) 100%),
    linear-gradient(180deg, #f9fbfd 0%, #eef3f7 52%, #dce4eb 100%);
  color: #7d8b9a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 rgba(95,111,126,.10),
    0 1px 0 rgba(161,174,186,.58),
    0 4px 9px rgba(65,78,92,.08);
}
.legacy-order-table .doc-customs-progress.doc-rcep.none:active,
.legacy-order-table .doc-customs-progress.doc-rcep.checking:active {
  border-color: #c6d1dc;
  border-bottom-color: #a9b7c4;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.22) 44%, rgba(82, 98, 112, .06) 100%),
    linear-gradient(180deg, #f9fbfd 0%, #eef3f7 52%, #dce4eb 100%);
  color: #7d8b9a;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -1px 0 rgba(95,111,126,.10),
    0 1px 0 rgba(161,174,186,.58),
    0 4px 9px rgba(65,78,92,.08);
}
.legacy-order-table .doc-customs-progress.doc-rcep.none > span,
.legacy-order-table .doc-customs-progress.doc-rcep.checking > span {
  color: #7d8b9a;
  text-shadow: 0 1px 0 rgba(255,255,255,.9);
}
.legacy-order-table .doc-customs-progress.doc-rcep.none b,
.legacy-order-table .doc-customs-progress.doc-rcep.checking b {
  border-color: #c6d1dc;
  background: #eef3f7;
  color: #7d8b9a;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(65,78,92,.08);
  text-shadow: none;
}
.doc-rcep.checking { border-style: dashed; }
.doc-rcep.has-unreadable::after { content: "!"; position: absolute; top: 1px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: #c43d3d; color: #fff; font-size: 9px; font-weight: 700; line-height: 12px; text-align: center; }
.rcep-table tr.is-recent td { background: #eef7ee; }
.rcep-table tr.is-recent td:first-child { box-shadow: inset 3px 0 0 #3a8f4f; }
.rcep-dialog:not(.editing) .rcep-table tr.is-recent td.code::after { content: "追加"; margin-left: 6px; padding: 1px 6px; border-radius: 9px; background: #3a8f4f; color: #fff; font-size: 11px; font-weight: 600; vertical-align: 1px; }
