.bs { padding: 22px 0 10px; }
.bs [hidden] { display: none !important; }
.bs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bs-link { font: inherit; border: 0; background: none; color: var(--gold-text); font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.bs select, .bs input[type=search], .bs input[type=password] { font: inherit; font-size: 14.5px; border: 1px solid #ddd6cb; border-radius: 10px; padding: 7px 10px; background: #fff; color: var(--text); min-height: 40px; box-sizing: border-box; }
.bs select:focus, .bs input:focus { outline: 3px solid rgba(245, 158, 11, .35); border-color: var(--gold); }

/* start: drop zone */
.bs-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 2px dashed #cfc6b8; border-radius: 16px; background: var(--soft); padding: 42px 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.bs-drop:hover, .bs-drop.bs-over { border-color: var(--gold); background: #fffbeb; }
.bs-drop b { font-size: 20px; }
.bs-drop span { color: var(--muted); font-size: 15px; }
.bs-drop u { color: var(--gold-text); font-weight: 700; }
.bs-ico { width: 46px; height: 46px; color: var(--gold-text); }
.bs-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--muted); }
.bs-trust span:first-child { color: #15803d; display: inline-flex; align-items: center; gap: 6px; }
.bs-trust svg { width: 16px; height: 16px; }
.bs-try { text-align: center; margin: 12px 0 0; color: var(--muted); font-size: 14.5px; }

.bs-msg { min-height: 22px; font-size: 14px; font-weight: 700; color: #15803d; margin: 10px 0 4px; }
.bs-msg.bs-err { color: #b42318; }
.bs-msg.bs-warn { color: #b45309; }
.bs-msg.bs-stay { color: var(--muted); }
.bs-work { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); margin: 6px 0 12px; }
.bs-spin { width: 18px; height: 18px; border: 3px solid #e5ded2; border-top-color: var(--gold); border-radius: 50%; animation: bs-rot .8s linear infinite; }
@keyframes bs-rot { to { transform: rotate(360deg); } }

/* password */
.bs-pw { position: fixed; inset: 0; background: rgba(31, 29, 26, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.bs-pwbox { background: #fff; border-radius: 16px; padding: 20px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.bs-pwbox b { font-size: 17px; word-break: break-word; }
.bs-pwbox p { color: var(--muted); font-size: 14px; margin: 8px 0; }
.bs-pwbox label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 10px 0 4px; }
.bs-pwbox input { width: 100%; }
.bs-pwbox .bs-wrong { color: #b42318; font-weight: 700; }
.bs-pwbtns { display: flex; gap: 8px; margin-top: 14px; }

/* result: files */
.bs-filebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.bs-files { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.bs-file { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; max-width: 100%; }
.bs-file.bs-on { border-color: var(--gold); box-shadow: 0 4px 14px rgba(245, 158, 11, .22); }
.bs-file button { font: inherit; border: 0; background: none; cursor: pointer; color: var(--text); text-align: left; padding: 7px 10px; min-width: 0; }
.bs-file button b { display: block; font-size: 13.5px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-file button small { color: var(--muted); font-size: 12px; }
.bs-file .bs-x { color: var(--muted); border-left: 1px solid var(--line); padding: 0 10px; }
.bs-file .bs-x:hover { color: #b42318; }
.bs-addpdf { cursor: pointer; margin: 0; }

/* cards */
.bs-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.bs-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; min-width: 0; }
.bs-card small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .3px; }
.bs-card b { font-size: 19px; font-variant-numeric: tabular-nums; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-card.bs-good { background: #f0fdf4; border-color: #bbf7d0; }
.bs-card.bs-good b { color: #15803d; }
.bs-card.bs-bad { background: #fef2f2; border-color: #fecaca; }
.bs-card.bs-bad b { color: #b42318; }
.bs-in { color: #15803d; }
.bs-out { color: #b42318; }
.bs-notes { margin: 10px 0 0; padding: 8px 12px 8px 30px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; font-size: 13.5px; color: #78350f; }

/* columns map + options */
.bs-setup { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin: 14px 0; padding: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.bs-cols { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; flex: 1 1 520px; min-width: 0; }
.bs-colhd { width: 100%; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.bs-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 190px; margin: 0; }
.bs-col small { font-size: 11.5px; color: var(--muted); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-col small i { font-weight: 500; }
.bs-col select { font-size: 13px; min-height: 34px; padding: 4px 6px; border-color: #e9d39a; font-weight: 700; }
.bs-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.bs-opts label, .bs-outfmt { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 800; color: var(--muted); margin: 0; }
.bs-opts select { font-size: 13px; min-height: 34px; padding: 4px 6px; }

/* main: pdf + table */
.bs-main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.bs-pdf { background: #3f3b36; border-radius: 14px; padding: 12px; position: sticky; top: 10px; }
.bs-pdfbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #e7e1d7; font-size: 12.5px; margin-bottom: 8px; }
.bs-pdfbar > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bs-pg { display: flex; gap: 4px; flex: none; }
.bs-pg button { font: inherit; font-size: 16px; width: 30px; height: 28px; border-radius: 8px; border: 1px solid #6b655d; background: #57514a; color: #fff; cursor: pointer; }
.bs-pdfbox { position: relative; max-height: 78vh; overflow: auto; background: #fff; border-radius: 4px; }
.bs-pdfbox canvas { display: block; cursor: crosshair; }
.bs-mark { position: absolute; left: 0; right: 0; background: rgba(245, 158, 11, .28); border-top: 2px solid #f59e0b; border-bottom: 2px solid #f59e0b; pointer-events: none; }
.bs-pdf .bs-tip { color: #cfc8bd; }
.bs-tip { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

.bs-tbl { min-width: 0; }
.bs-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.bs-tools input[type=search] { flex: 1 1 220px; min-width: 0; }
.bs-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.bs-chips button { font: inherit; font-size: 13px; font-weight: 700; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.bs-chips button[aria-pressed="true"] { background: #1f1d1a; color: #fff; border-color: #1f1d1a; }
.bs-tools2 .btn { padding: 7px 11px; font-size: 13px; }
.bs-tools2 .btn:disabled { opacity: .45; cursor: default; }
.bs-sp { flex: 1; }
.bs-shown { font-size: 13px; color: var(--muted); }
.bs-shown b { color: var(--text); }
#bsShowPdf { display: none; }

.bs-tw { overflow: auto; max-height: 78vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.bs-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bs-table th { position: sticky; top: 0; background: #f6f3ee; text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.bs-table td { padding: 6px 8px; border-bottom: 1px solid #f0ece5; vertical-align: top; }
.bs-table td[contenteditable] { cursor: text; border-radius: 4px; }
.bs-table td[contenteditable]:hover { background: #fffbeb; }
.bs-table td[contenteditable]:focus { outline: 2px solid #f59e0b; background: #fff; }
.bs-table .bs-d { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bs-table .bs-desc { min-width: 200px; word-break: break-word; }
.bs-table .bs-n, .bs-table th.bs-n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bs-table .bs-ck { text-align: center; font-weight: 900; width: 30px; }
.bs-ok { color: #15803d; }
.bs-no { color: #b42318; }
.bs-na { color: #c9c2b7; }
.bs-table tr { cursor: pointer; }
.bs-table tr.bs-err td { background: #fef2f2; }
.bs-table tr.bs-hl td { background: #fef3c7; }
.bs-del button { font: inherit; border: 0; background: none; color: #b8b0a4; cursor: pointer; padding: 2px 4px; font-size: 13px; }
.bs-del button:hover { color: #b42318; }
.bs-none { text-align: center; color: var(--muted); padding: 22px !important; }

/* downloads */
.bs-exp { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.bs-expbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.bs-expbtns .btn { padding: 10px 14px; font-size: 14px; }
.bs-expbtns .btn.soft { color: var(--text); }
.bs-privacy { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

@media (max-width: 980px) {
  .bs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bs-cards .bs-chk { grid-column: 1 / -1; }
  .bs-main { grid-template-columns: minmax(0, 1fr); }
  .bs-pdf { display: none; position: static; }
  .bs-pdf.bs-open { display: block; }
  #bsShowPdf { display: inline-flex; }
  .bs-pdfbox { max-height: 60vh; }
}
@media (max-width: 560px) {
  .bs-drop { padding: 30px 12px; }
  .bs-drop b { font-size: 17px; }
  .bs-card b { font-size: 16px; }
  .bs-col { max-width: calc(50% - 4px); flex: 1 1 calc(50% - 4px); }
  .bs-table .bs-desc { min-width: 150px; }
  .bs-exp { flex-direction: column; align-items: stretch; }
  .bs-expbtns .btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .bs-expbtns .btn.gold { flex-basis: 100%; }
}
