.iv-mask { z-index: 1300; padding: 16px; }
.iv-window { background: #fff; color: #252525; width: min(1180px, 100%); max-height: 94vh; display: flex; flex-direction: column; border: 1px solid #d9d9d9; border-radius: 10px; box-shadow: 0 12px 50px #0002; font-size: 14px; }
.iv-window * { box-sizing: border-box; }
.iv-window [hidden] { display: none !important; }
.iv-window button, .iv-window input, .iv-window select, .iv-window textarea { font: inherit; }
.iv-window button { cursor: pointer; background: #fff; border: 1px solid #d4d4d4; color: #333; border-radius: 5px; padding: 7px 11px; }
.iv-window button:disabled { opacity: .45; cursor: default; }
.iv-window .iv-primary { background: #333; color: #fff; border-color: #333; }
.iv-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 16px 20px; border-bottom: 1px solid #ddd; }
.iv-window h2 { font-size: 18px; margin: 0 0 4px; }
.iv-window h3 { font-size: 15px; margin: 0 0 12px; }
.iv-muted,.iv-window small { font-size: 12px; color: #666; }
.iv-window small { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.iv-body { overflow: auto; padding: 18px 20px; min-height: 0; }
.iv-window label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.iv-window input:not([type=checkbox]),.iv-window select,.iv-window textarea { border: 1px solid #cfcfcf; border-radius: 5px; padding: 8px; background: #fff; color: #252525; min-width: 0; width: 100%; }
.iv-window textarea { min-height: 65px; resize: vertical; }
.iv-upload { max-width: 570px; padding: 16px 0; }
.iv-toolbar,.iv-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.iv-toolbar label { margin-bottom: 0; flex: 1; min-width: 125px; }
.iv-toolbar label:first-child { flex: 2; }
.iv-tools { align-items: center; }
.iv-tools > span { margin-right: auto; }
.iv-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); gap: 20px; }
.iv-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.iv-table th,.iv-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #e4e4e4; overflow-wrap: anywhere; vertical-align: top; }
.iv-table th { color: #555; font-size: 12px; font-weight: 500; }
.iv-layout .iv-table th:first-child { width: 32px; }
.iv-layout .iv-table th:nth-child(2) { width: 43%; }
.iv-table .iv-num { text-align: right; font-variant-numeric: tabular-nums; }
.iv-list { min-width: 0; }
.iv-list-table { overflow: auto; }
.iv-list-table thead { position: sticky; top: 0; background: #fff; z-index: 1; }
.iv-detail-head { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: #fff; padding: 0 0 12px; border-bottom: 1px solid #eee; }
.iv-detail-head h3 { margin: 0; }
@media(min-width:721px) {
  .iv-window.iv-reviewing { height: 94vh; height: 94dvh; }
  .iv-reviewing .iv-head,.iv-reviewing #iv-message,.iv-reviewing #iv-foot { flex-shrink: 0; }
  .iv-reviewing .iv-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
  .iv-reviewing .iv-toolbar,.iv-reviewing .iv-tools,.iv-reviewing .iv-selection-help { flex-shrink: 0; }
  .iv-reviewing .iv-layout { flex: 1; min-height: 0; }
  .iv-reviewing .iv-list { display: flex; flex-direction: column; min-height: 0; }
  .iv-reviewing .iv-list-table { flex: 1; min-height: 0; overflow-y: scroll; scrollbar-gutter: stable; overscroll-behavior: contain; }
  .iv-reviewing .iv-pager { flex-shrink: 0; }
  .iv-reviewing .iv-list > details { flex-shrink: 0; max-height: 100px; overflow: auto; }
  .iv-reviewing #iv-detail { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
}
.iv-table [data-invoice-key] { cursor: pointer; }
.iv-table [data-invoice-key]:hover { background: #f7f8fa; }
.iv-table .iv-current,.iv-table .iv-current:hover { background: #eef4fb; box-shadow: inset 3px 0 #4776a8; }
.iv-table .iv-pick-cell { cursor: default; }
.iv-table input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.iv-window .iv-link:focus-visible { outline: 2px solid #4776a8; outline-offset: 3px; }
.iv-window .iv-link[aria-pressed=true]::after { content: '当前'; display: inline-block; margin-left: 6px; font-size: 11px; color: #315b89; font-weight: 600; }
.iv-selection-help { margin: 0 0 12px; }
.iv-window .iv-link { padding: 0; border: 0; background: transparent; text-align: left; color: #252525; }
#iv-detail { padding-left: 18px; border-left: 1px solid #ddd; overflow-wrap: anywhere; }
.iv-box { padding: 10px 12px; background: #f5f5f5; }
.iv-amounts { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 0; }
.iv-window details { border-top: 1px solid #ddd; margin-top: 16px; padding-top: 10px; }
.iv-window summary { cursor: pointer; }
.iv-source { padding: 10px 0; border-bottom: 1px solid #e2e2e2; overflow-wrap: anywhere; }
.iv-note { color: #775117; background: #fffbeb; padding: 8px; font-size: 12px; }
.iv-pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 15px; }
#iv-foot { border-top: 1px solid #ddd; padding: 12px 20px; display: flex; gap: 10px; justify-content: space-between; align-items: center; }
#iv-foot > div { display: flex; flex-wrap: wrap; gap: 8px; }
.iv-message:not(:empty) { padding: 9px 20px; background: #f5f5f5; font-size: 13px; }
.iv-error,#iv-dialog-error:not(:empty) { color: #a12626; }
.iv-dialog-mask { position: fixed; inset: 0; z-index: 1400; background: #0005; display: flex; justify-content: center; align-items: center; padding: 20px; }
.iv-dialog { background: #fff; width: min(510px, 100%); max-height: 90vh; overflow: auto; padding: 22px; border-radius: 8px; box-shadow: 0 10px 40px #0003; }
.iv-window .iv-check { flex-direction: row; align-items: flex-start; gap: 9px; line-height: 1.5; }
.iv-check input { margin-top: 4px; }
.iv-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.iv-month { margin-bottom: 24px; }
.iv-month .iv-table th:first-child { width: 55px; }
@media(max-width:720px) { .iv-mask{padding:5px;} .iv-window{max-height:98vh;} .iv-head,.iv-body,#iv-foot{padding:12px;} .iv-layout{grid-template-columns:minmax(0,1fr);} #iv-detail{border-left:0;border-top:1px solid #ddd;padding:16px 0 0;} #iv-foot{align-items:flex-start;flex-direction:column;} .iv-dialog-mask{padding:12px;} .iv-dialog{padding:16px;} .iv-window input:not([type=checkbox]),.iv-window select,.iv-window textarea{font-size:16px;} .iv-table th,.iv-table td{padding:8px 4px;} .iv-tools button{padding:8px;} }
@media(max-width:720px) { .iv-list-table{max-height:40vh;} .iv-list-table thead{position:sticky;top:0;background:#fff;z-index:1;} .iv-window .iv-link{min-height:44px;width:100%;} .iv-pick-cell{padding-top:18px!important;} }
