.customs-documents-dialog {
  width: min(780px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  padding: 0; border: 1px solid #b9cbd8; border-radius: 8px; color: #233c50;
  background: #fff; box-shadow: 0 22px 70px #142c4540; font: inherit;
}
.customs-documents-dialog[open] { display: flex; flex-direction: column; }
.customs-documents-dialog::backdrop { background: #1d344758; backdrop-filter: blur(3px); }
.customs-documents-dialog > header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; background: linear-gradient(90deg, #e8eff5, #f8fafc); border-bottom: 1px solid #b5c9da; border-top: 4px solid #365e80; box-shadow: inset 0 1px 0 white; }
.customs-documents-dialog h2 { margin: 5px 0 0; font-size: 21px; font-weight: 600; }
.customs-documents-dialog header small { color: #60778a; font-size: 12px; }
.customs-documents-dialog button { font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; letter-spacing: 0; color: #294e70; border: 1px solid #a9bfd3; border-radius: 6px; padding: 8px 14px; cursor: pointer; background: linear-gradient(#fff, #eaf1f6); box-shadow: 0 2px 0 #b5c5d3; transition: background .15s, box-shadow .15s; }
.customs-documents-dialog button:hover:not(:disabled) { background: #e4eef6; box-shadow: 0 3px 6px #294e7024; }
.customs-documents-dialog button:focus-visible { outline: 2px solid #3979b5; outline-offset: 3px; }
.customs-documents-dialog button:disabled { opacity: .55; cursor: default; }
.customs-documents-dialog header button { width: 34px; height: 34px; padding: 0; font-size: 22px; }
.customs-documents-summary { padding: 15px 26px; font-size: 13px; color: #5d7282; border-bottom: 1px solid #e2eaf0; }
.customs-documents-content { overflow-y: auto; min-height: 60px; padding: 18px 22px; overscroll-behavior: contain; background: #f5f7f9; }
.customs-document-group { display: grid; grid-template-columns: minmax(0,1fr) 190px; border: 1px solid #d2dfe8; border-radius: 8px; margin-bottom: 14px; background: white; box-shadow: 0 3px 9px #27405a08; }
.customs-document-group:last-child { margin-bottom: 0; }
.customs-document-main { min-width: 0; padding: 16px; }
.customs-document-action { padding: 20px 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; border-left: 1px solid #e0e7ed; background: #f7fafc; border-radius: 0 8px 8px 0; }
.customs-document-action button { width: 166px; min-height: 38px; padding: 8px; }
.customs-document-group.is-aggregate .customs-document-action { justify-content: center; align-items: center; }
.customs-aggregate-description { margin: 12px 0 0; color: #617587; font-size: 12px; line-height: 1.7; }
.customs-document-group.is-aggregate ul { margin-left: 0; }
.customs-documents-dialog :is([data-customs-group], [data-customs-all]) { border-color: #d3b77d; border-top-color: #ead7ad; border-bottom-color: #ae8b4c; background: linear-gradient(180deg, #fffefa 0%, #faf2de 52%, #efddb6 100%); color: #60471d; box-shadow: inset 0 1px 0 #fff, 0 2px 0 #c3a263, 0 6px 12px #664c1f1c; transition: background .15s, box-shadow .15s, transform .15s; }
.customs-documents-dialog :is([data-customs-group], [data-customs-all]):hover:not(:disabled) { border-color: #c5a566; background: linear-gradient(180deg, #fff, #fcf6e9 50%, #f2e4c6); color: #503811; box-shadow: inset 0 1px 0 #fff, 0 3px 0 #b89555, 0 9px 16px #664c1f26; transform: translateY(-1px); }
.customs-documents-dialog :is([data-customs-group], [data-customs-all]):active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 1px 2px #60471d1a; }
.customs-document-count b { font-size: 22px; font-weight: 600; color: #294e70; margin-right: 3px; font-variant-numeric: tabular-nums; }
.customs-document-group.is-empty { box-shadow: none; background: #fafbfc; }
.customs-document-group-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.customs-document-group h3 { margin: 0; padding: 7px 10px; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; border: 1px solid #c4d4e1; border-radius: 5px; background: linear-gradient(#fbfdff, #eaf1f6); box-shadow: inset 0 1px 0 #fff, 0 2px 0 #cedbe5; color: #234563; }
.customs-document-index { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 5px; border: 1px solid #cfdae3; background: #f0f5f8; margin-right: 10px; color: #526f87; font-size: 12px; font-variant-numeric: tabular-nums; }
.customs-document-group-head p { margin: 7px 0 0 38px; font-size: 12px; color: #698093; overflow-wrap: anywhere; }
.customs-document-count { flex-shrink: 0; color: #698093; font-size: 12px; }
.customs-document-group ul { list-style: none; padding: 0; margin: 14px 0 0 38px; }
.customs-document-group li { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid #edf1f4; }
.customs-document-group li small { flex-shrink: 0; }
.customs-document-group li > div { min-width: 0; }
.customs-document-group li strong { display: block; font-size: 14px; font-weight: 400; color: #273541; overflow-wrap: anywhere; }
.customs-document-group li small { display: block; font-size: 11px; margin-top: 5px; color: #788b99; }
.customs-document-empty { font-size: 12px; color: #82929e; margin: 12px 0 0 26px; }
.customs-documents-dialog footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 26px; border-top: 1px solid #dce5ec; background: #f8fafc; }
.customs-documents-dialog [data-customs-all] { min-height: 38px; }
.customs-documents-error { color: #9c3838; font-size: 13px; padding: 10px 26px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .customs-documents-dialog button { transition: none; } .customs-documents-dialog :is([data-customs-group], [data-customs-all]):hover:not(:disabled) { transform: none; } }
@media (max-width: 520px) {
  .customs-documents-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); }
  .customs-documents-dialog > header, .customs-documents-summary, .customs-documents-dialog footer { padding: 14px 16px; }
  .customs-documents-content { padding: 12px; }
  .customs-document-group { grid-template-columns: minmax(0,1fr); }
  .customs-document-main { padding: 16px; }
  .customs-document-action { flex-direction: row; justify-content: space-between; border-left: 0; border-top: 1px solid #e0e7ed; border-radius: 0 0 8px 8px; padding: 12px 16px; }
  .customs-document-group ul { margin-left: 0; }
  .customs-documents-dialog footer { flex-wrap: wrap; }
  .customs-documents-dialog footer button { max-width: 100%; white-space: normal; }
}
