.bank-files-page [hidden] { display: none !important; }
.bank-files-heading { margin-bottom: 22px; }
.bank-files-back { color: #65766e; text-decoration: none; font-size: 13px; }
.bank-files-heading h1 { margin: 12px 0 0; color: #213c31; font-size: 25px; letter-spacing: -.04em; }
.bank-files-upload { padding: 20px; box-shadow: none; border-color: #dce6df; }
.bank-files-picker { position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px; min-height: 156px; padding: 22px 14px; border: 1px dashed #aac6b5;
  border-radius: 14px; color: #267456; background: #f7faf8; cursor: pointer; text-align: center; }
.bank-files-picker strong { font-size: 16px; overflow-wrap: anywhere; }
.bank-files-picker > span { color: #718076; font-size: 12px; }
.bank-files-picker:hover { background: #f0f7f2; border-color: var(--theme-accent,#398565); }
.bank-files-picker:focus-within { outline: 3px solid var(--theme-accent,#c6e0ce); outline-offset: 3px; }
.bank-files-native { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; }
.bank-files-note { color: #718076; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.bank-files-upload > .bank-files-note { margin: 13px 0 0; text-align: center; }
.bank-files-status { display: flex; align-items: center; gap: 10px; margin-block: 18px; color: #426451; font-size: 13px; line-height: 1.6; }
.bank-files-status[data-loading="true"]::before { content: ""; width: 16px; height: 16px; flex: 0 0 16px;
  border: 2px solid #d4e5d9; border-top-color: #267456; border-radius: 50%; animation: bank-files-spin .8s linear infinite; }
@keyframes bank-files-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce){ .bank-files-status[data-loading="true"]::before { animation: none; } }
.bank-files-mapping { padding: 22px; margin-block: 20px; box-shadow: none; border-color: #dce6df; }
.bank-files-mapping h2 { margin: 0; font-size: 17px; color: #253e32; }
.bank-files-mapping > p { margin: 7px 0 18px; }
.bank-files-mapping form { display: grid; gap: 16px; }
.bank-files-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.bank-files-mapping label { min-width: 0; display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: #40564a; }
.bank-files-mapping select, .bank-files-mapping input { min-width: 0; width: 100%; box-sizing: border-box; height: 45px; padding: 0 10px; border-radius: 9px; font-size: 14px; }
.bank-files-mapping .primary-button { min-height: 46px; }
.bank-files-password { padding: 22px; margin-block: 20px; box-shadow: none; border-color: #dce6df; }
.bank-files-password h2 { margin: 0; font-size: 17px; color: #253e32; }
.bank-files-password form { display: flex; gap: 12px; }
.bank-files-password input { flex: 1; min-width: 0; width: 100%; min-height: 46px; box-sizing: border-box; padding: 0 12px; border-radius: 9px; font-size: 16px; }
.bank-files-password .primary-button { flex-shrink: 0; min-height: 46px; }
.bank-files-advanced { color: #65766e; font-size: 12px; }
.bank-files-advanced[open] { display: grid; gap: 16px; }
.bank-files-advanced > div, .bank-files-advanced > p { margin-top: 14px; }
.bank-files-page summary { cursor: pointer; line-height: 1.7; }
#bank-files-sample { margin: 0; max-height: 74px; overflow-y: auto; }
.bank-files-issues { margin-block: 18px; padding: 12px 15px; border-radius: 10px; background: #fcf8ed; color: #806333; font-size: 12px; }
.bank-files-issues p { margin: 8px 0; line-height: 1.65; }
.bank-files-issues ul { padding-left: 19px; line-height: 1.7; max-height: 220px; overflow-y: auto; }
.bank-files-detail { margin-top: 30px; }
.bank-files-review-link { display: inline-block; margin-top: 18px; color: #467257; text-decoration: none; font-size: 12px; }
.bank-files-history { margin-top: 28px; }
.bank-files-history > h2 { margin: 0 0 14px; font-size: 18px; color: var(--ink); }
.bank-files-help { margin-top: 28px; color: #78857c; font-size: 12px; }
.bank-files-help p { margin: 10px 0; line-height: 1.8; }
#bank-files-batches { display: grid; gap: 8px; }
.bank-file-batch { min-width: 0; border: 1px solid var(--kkaebu-line, #dce6df); border-radius: 12px; background: #fff; overflow: hidden; }
.bank-file-batch > summary { position: relative; display: block; padding: 10px 40px 10px 16px; list-style: none; }
.bank-file-batch > summary::-webkit-details-marker { display: none; }
.bank-file-batch > summary strong { display: block; min-width: 0; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bank-file-batch > summary:hover, .bank-file-batch > summary:focus-visible { background: #f5f9f7; }
.bank-file-batch > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.bank-file-chevron { position: absolute; right: 18px; top: 16px; width: 7px; height: 7px; border-right: 2px solid #688476; border-bottom: 2px solid #688476; transform: rotate(45deg); }
.bank-file-batch[open] > summary { border-bottom: 1px solid #e0e8e2; }
.bank-file-batch[open] .bank-file-chevron { transform: rotate(225deg); top: 19px; }
.bank-file-batch > .bank-files-detail { margin-top: 0; padding: 0 16px 16px; }
.bank-files-selection { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0; padding: 12px 0; font-size: 12px; color: #65766e; }
.bank-files-selection label { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.bank-files-page input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: #267456; cursor: pointer; }
.bank-files-actions { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.bank-files-actions button { width: 100%; min-height: 44px; padding: 10px 5px; font-size: 13px; white-space: nowrap; }
.bank-files-delete { color: #95605d; }
.bank-files-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 12px; color: #65766e; }
.bank-files-pagination button { min-height: 36px; padding: 6px 16px; font-size: 12px; }
.bank-files-table-wrap { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.bank-files-detail .records-table { table-layout: fixed; width: 100%; min-width: 0; }
.bank-files-detail .records-table thead tr { height: 36px; }
.bank-files-detail .records-table th { padding: 8px 6px; background: transparent; font-weight: 600; font-size: 11px; }
.bank-files-detail .records-table th:nth-child(1) { width: 30px; padding: 8px 6px; }
.bank-files-detail .records-table th:nth-child(2) { width: 60px; }
.bank-files-detail .records-table th:nth-child(3) { width: auto; text-align: left; }
.bank-files-detail .records-table th:nth-child(4) { width: 112px; }
.bank-files-detail .records-table th:nth-child(5) { width: 120px; }
.bank-files-detail .records-table th:nth-child(6) { width: 132px; }
.bank-files-detail .records-category-cell > .records-category,
.bank-files-detail .records-detail-cell > .records-detail-badge { min-height: 24px; padding: 3px 7px; font-size: 11px; }
.bank-files-detail .records-table td { padding: 6px; vertical-align: middle; }
.bank-files-detail .records-details > strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 20px; }
.bank-files-row-secondary { display: flex; align-items: center; gap: 4px; height: 18px; margin-top: 2px; overflow: hidden; white-space: nowrap; }
.bank-files-row-secondary .records-mobile-classification { flex-wrap: nowrap; flex-shrink: 0; gap: 3px; margin: 0; }
.bank-files-row-secondary .records-memo { min-width: 0; margin: 0; }
.bank-file-duplicate-tag { color: #947037; flex-shrink: 0; font-size: 10px; }
.bank-file-added { color: #29815b; margin-left: 3px; font-size: 11px; }
.bank-files-detail .bank-files-check-cell { text-align: center; padding: 6px; }
.bank-file-income { color: #29815b; }
#bank-file-editor [hidden] { display: none !important; }
#bank-file-editor .record-editor-source-note { overflow-wrap: anywhere; }
#bank-file-editor-memo { min-height: 132px; resize: vertical; }
#bank-file-editor .record-editor-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#bank-file-editor .record-editor-actions button { width: 100%; }
#bank-file-editor-date { cursor: default; }
.bank-files-page[aria-busy="true"] .bank-files-picker { cursor: progress; opacity: .7; }
@container kkaebu (max-width: 540px){
  .bank-files-heading h1 { font-size: 23px; }
  .bank-files-upload { padding: 15px; }
  .bank-files-picker { min-height: 145px; }
  .bank-files-mapping { padding: 16px; }
  .bank-files-password { padding: 16px; }
  .bank-files-password form { flex-direction: column; }
  .bank-files-mapping select, .bank-files-mapping input { font-size: 16px; }
  .bank-files-columns { gap: 12px 10px; }
  .bank-file-batch > .bank-files-detail { padding: 0 10px 12px; }
  .bank-file-batch > summary { padding-left: 16px; }
  .bank-files-selection { font-size: 11px; padding: 10px 0; }
}
@container kkaebu (max-width: 760px){
  .bank-files-detail .records-table th:nth-child(1) { width: 26px; padding: 8px 4px; }
  .bank-files-detail .records-table th:nth-child(2) { width: 38px; padding: 8px 3px; }
  .bank-files-detail .records-table th:nth-child(3) { width: auto; padding: 8px 3px; }
  .bank-files-detail .records-table th:nth-child(4) { width: 86px; padding: 8px 5px; }
  .bank-files-detail .records-table .records-date { padding: 6px 3px !important; font-size: 11px; }
  .bank-files-detail .records-table .records-details { padding: 6px 3px !important; font-size: 13px; }
  .bank-files-detail .records-table .records-cost { padding: 6px 5px !important; font-size: 12px; }
  .bank-files-detail .bank-files-check-cell { padding: 6px 4px; }
  .bank-files-row-secondary .records-memo { display: none; }
  .bank-files-row-secondary .records-mobile-classification { display: flex; flex-shrink: 1; min-width: 0; overflow: hidden; }
  .bank-files-row-secondary .records-category, .bank-files-row-secondary .records-detail-badge { flex-shrink: 0; min-height: 18px; padding: 1px 4px; font-size: 9px; }
  .bank-files-row-secondary .records-detail-badge { display: block; flex-shrink: 1; min-width: 0; overflow: hidden; line-height: 16px; text-overflow: ellipsis; }
  .bank-files-detail .records-category-heading, .bank-files-detail .records-detail-heading,
  .bank-files-detail .records-category-cell, .bank-files-detail .records-detail-cell { display: none; }
}
@container kkaebu (max-width: 599px){
  .bank-files-page .app-header:not(.nav-menu-ready) .app-nav { visibility: hidden; opacity: 0; }
}
