/* Getting positions in when one screenshot is not the whole story (src/dashboard/positions-import.js). Colours come from app.css's variables, so dark mode follows. */
/* The four steps over the sheet: Add · Read · Review · Save. */
.import-steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.import-steps li { display: flex; align-items: center; gap: 7px; }
.import-steps li + li::before { content: ""; width: 24px; height: 1px; background: var(--line); margin-inline-end: 4px; }
.import-steps .dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font-size: 11px; font-variant-numeric: tabular-nums; }
.import-steps .on { color: var(--text); font-weight: 600; }
.import-steps .on .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.import-steps .done { color: var(--text); }
.import-steps .done .dot { background: var(--pos-bg); border-color: var(--pos-bg); color: var(--pos); }
.dz-actions { justify-content: center; margin-top: 6px; }
.link-btn { border-color: transparent; background: transparent; color: var(--accent); }
.capture { border: 1px solid var(--line); background: var(--panel-2); border-radius: 12px; padding: 12px 14px; margin-top: 10px; display: grid; gap: 8px; }
.capture ol { margin: 0; padding-inline-start: 18px; display: grid; gap: 4px; }
.capture li { min-width: 0; overflow-wrap: anywhere; }
.import-brokers { flex-wrap: wrap; gap: 6px; }
.import-brokers .btn.sm { min-height: 44px; }
/* IBKR: the Flex link, which has nothing to capture. */
.import-flex { display: grid; gap: 4px; justify-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.import-flex .chip { background: var(--accent-bg); color: var(--accent); }
.import-flex a { min-height: 44px; display: inline-flex; align-items: center; }
.import-left { flex: none; align-self: flex-start; }
.import-slot:empty { display: none; }
.import-banner { margin-bottom: 10px; display: grid; gap: 6px; }
.import-banner p { margin: 0; }
.import-actions { flex-wrap: wrap; gap: 8px; }
.import-wait:empty, .merge-note:empty { display: none; }
.merge-note { margin: 0 0 8px; }
.paste-box { width: 100%; min-height: 150px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; resize: vertical; box-sizing: border-box; }
/* A quantity that is not in the picture, one that was worked out, two pictures that disagree, and a row the reader was unsure of: the row says so before its numbers do. */
.pos-row.missing { border-color: var(--neg); }
.pos-row.estimated, .pos-row.conflict, .pos-row.unsure { border-color: var(--watch-line); background: var(--watch-bg); }
.pos-row.conflict { border-color: var(--neg); }
.pos-row .pos-what .btn.sm { padding: 3px 10px; min-height: 0; }
.review-head { flex-wrap: wrap; }

/* An Israeli bank's screen (israeli-bank.js): the screen's time, and the securities listed in Tel Aviv that were left out. Names may be Hebrew: each is isolated. */
.bank-head { display: grid; gap: 6px; margin: 8px 0; }
.bank-head p { margin: 0; }
.bank-skipped ul { margin: 4px 0 0; padding-inline-start: 18px; }
.bank-skipped li { overflow-wrap: anywhere; }

/* The import page (#/portfolio/import), Ilan's flow in the page body: Add · Read · Review · Save. Colours are app.css's, so dark mode follows. */
.import-page { display: grid; gap: 18px; }
.import-page .import-steps { margin: 0; }
.import-page .page-head h1 { font-size: 22px; }
.import-page .card { padding: 24px; }
.import-page .card h2 { margin: 0; font-size: 16px; }
.import-page h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.import-page .card p { margin: 0; }
.import-page .link-btn { padding: 0; min-height: 44px; font-weight: 500; }
.import-page .link-btn.quiet { color: var(--muted); font-weight: 400; }
.import-lock { display: flex; align-items: center; gap: 8px; }
.import-lock svg { flex: none; }
/* Add: the screenshot on the left, where the positions are and what they give on the right. */
.import-add { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; }
.import-left, .import-right { display: grid; gap: 14px; align-content: start; min-width: 0; }
.import-right { border-inline-start: 1px solid var(--line); padding-inline-start: 24px; }
.import-drop { min-height: 260px; padding: 24px 16px; align-content: center; gap: 10px; color: var(--text); cursor: default; }
.import-drop > svg { color: var(--accent); }
.import-drop b { font-size: 15px; }
.import-drop .dz-actions { margin-top: 8px; }
.import-right .capture { border: 0; background: none; padding: 0; margin: 0; gap: 12px; font-size: 13px; }
.import-right .capture ol { list-style: none; counter-reset: tip; padding: 0; display: grid; gap: 12px; }
.import-right .capture li { display: flex; gap: 10px; counter-increment: tip; line-height: 1.45; }
.import-right .capture li::before { content: counter(tip); flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); font-size: 11px; font-weight: 600; }
.import-right .import-flex { background: var(--accent-bg); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.import-right .import-flex .chip { background: var(--panel); }
.import-right .import-flex a { font-weight: 500; color: var(--accent); min-height: 44px; display: inline-flex; align-items: center; }
.import-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.import-tiles .tile { display: grid; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); min-width: 0; }
.import-tiles .tile b { font-size: 13px; }
/* Read: the screenshot beside the read's progress. */
.import-read { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
.import-shot { display: grid; gap: 8px; align-content: start; }
.import-shot img.thumb { width: 100%; max-height: 420px; object-fit: cover; object-position: top; }
.import-read-body { display: grid; gap: 14px; align-content: start; min-width: 0; }
.import-read .read-head img.thumb { display: none; }
.import-read .read-head .what { font-size: 18px; font-weight: 600; }
.import-read .read-steps { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.import-read .read-steps li { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 28px; gap: 6px; font-size: 13px; }
.import-read .read-steps .mark { width: 16px; height: 16px; }
.import-read-foot { justify-content: flex-end; }
/* Review, over the rows: Replace or Add, and the saved positions that Replace takes away, each with Keep. */
.import-choice p { margin: 0; }
.import-choice .seg button { white-space: normal; }
.import-removed { gap: 6px 8px; }
.import-removed p { flex: 1 1 100%; }
/* Review: the screenshot beside the table. */
.import-review { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.import-review.no-shot { grid-template-columns: minmax(0, 1fr); }
.import-page .card.import-table { padding: 0; overflow: hidden; display: grid; }
.import-page .pos-rows { gap: 0; }
.import-page .pos-head, .import-page .pos-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) minmax(0, 0.9fr) minmax(0, 0.8fr) minmax(0, 1fr) 32px; grid-template-areas: "sym qty avg val read x" "kind kind kind kind kind kind" "what what what what what what"; gap: 8px 12px; padding: 10px 16px; }
.import-page .pos-head { display: grid; background: var(--bg); color: var(--faint); font-size: 12px; }
.import-page .pos-head span:nth-child(n + 2) { grid-area: auto; }
.import-page .pos-row { border: 0; border-top: 1px solid var(--line); border-radius: 0; border-inline-start: 3px solid transparent; }
.import-page .pos-row.estimated, .import-page .pos-row.conflict, .import-page .pos-row.unsure, .import-page .pos-row.missing { border-inline-start-color: var(--watch); }
.import-page .pos-row.bad { border-inline-start-color: var(--neg); background: var(--neg-bg); }
.import-page .pos-sym { grid-area: sym; display: grid; gap: 2px; min-width: 0; }
.import-page .pos-qty { grid-area: qty; }
.import-page .pos-avg { grid-area: avg; }
.import-page .pos-value { grid-area: val; font-variant-numeric: tabular-nums; }
.import-page .pos-read { grid-area: read; }
.import-page .pos-row .icon-x { grid-area: x; }
.import-page .pos-row .pos-kind { grid-area: kind; }
.import-page .pos-row .pos-what { grid-area: what; }
.import-page .pos-row .in { min-height: 34px; font-size: 14px; }
.import-page .pos-name:empty { display: none; }
.pos-lbl { display: none; }
.import-page .import-empty { padding: 18px 16px; }
.import-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg); }
.import-foot .row { gap: 16px; }
.import-total:empty { display: none; }
.import-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.import-bottom .btn.primary:disabled { opacity: 1; background: var(--panel-2); border-color: var(--panel-2); color: var(--faint); }
/* The pieces shared with the dialogs (a failed read, the pasted list, the question before a replacement) keep their shape as a card. */
.import-page .dlg-body { display: grid; gap: 12px; }
.import-page .dlg-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.import-page .dlg-foot .cost { flex: 1; }
@media (max-width: 899px) {
  .import-page .card { padding: 16px; }
  .import-add, .import-read, .import-review { grid-template-columns: minmax(0, 1fr); }
  .import-right { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); padding-top: 16px; }
  .import-drop { min-height: 200px; }
  .import-shot img.thumb { max-height: 180px; }
  .import-page .pos-head { display: none; }
  .import-page .pos-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; grid-template-areas: "sym sym x" "lq la la" "qty avg avg" "val read read" "kind kind kind" "what what what"; }
  .import-page .pos-lbl { display: block; font-size: 12px; color: var(--faint); margin-bottom: -4px; }
  .import-page .pos-lbl-qty { grid-area: lq; }
  .import-page .pos-lbl-avg { grid-area: la; }
  .import-page .pos-row .icon-x { width: 44px; height: 44px; }
  .import-page .pos-row .in, .import-page .pos-row select { min-height: 44px; }
  .import-bottom .row { width: 100%; }
  .import-bottom .btn.primary { flex: 1 1 100%; min-height: 48px; }
}
.import-quiet { gap: 16px; font-size: 13px; }

/* A positions file from a broker (positions-import.js, docs/wells-fargo-import.md). The table is a table from 760 px up and a card for each row below it; numbers read left to right in either language. */
.import-file { display: grid; gap: 14px; min-width: 0; }
.import-file h2 { margin: 0; font-size: 16px; }
.import-file h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.import-file p, .import-file ul { margin: 0; }
.import-file .stm-guide { margin: 0; }
.import-file .stm-guide-toggle { min-height: 44px; }
.fi-drop { min-height: 150px; display: grid; gap: 8px; justify-items: center; align-content: center; text-align: center; padding: 18px 12px; }
.fi-drop .dz-actions { margin-top: 0; }
.fi-n { white-space: nowrap; unicode-bidi: isolate; }
.fi-name-row { display: grid; gap: 4px; }
.fi-label { width: 100%; max-width: 360px; min-height: 44px; box-sizing: border-box; }
.fi-facts { list-style: none; padding: 0; display: grid; gap: 2px; }
.fi-columns > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.fi-cols { list-style: none; padding: 0; display: grid; gap: 10px; }
.fi-colrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; align-items: center; }
.fi-heading { overflow-wrap: anywhere; font-weight: 500; }
.fi-col { min-height: 44px; max-width: 100%; box-sizing: border-box; }
.fi-colrow .chip { justify-self: start; }
.fi-table { width: 100%; border-collapse: collapse; }
.fi-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.fi-table, .fi-table tbody { display: block; }
.fi-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.fi-table td { display: block; min-width: 0; text-align: start; overflow-wrap: anywhere; white-space: normal; }
.fi-table td::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); }
.fi-table td.fi-sym { grid-column: 1 / -1; }
.fi-table td.fi-sym::before, .fi-table td:last-child::before { content: none; }
.fi-table td:last-child { grid-column: 1 / -1; }
.fi-table td.fi-sym p { margin-top: 4px; }
.fi-row.check { border-color: var(--watch-line); background: var(--watch-bg); }
.fi-name { overflow-wrap: anywhere; }
.fi-skipped ul, .fi-cash ul, .fi-checks ul { padding-inline-start: 18px; display: grid; gap: 4px; }
.fi-checks ul { list-style: none; padding-inline-start: 0; }
.fi-check { display: block; }
.fi-check .chip { margin-inline-end: 4px; }
.fi-will { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.fi-ask { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--watch-line); border-radius: 10px; background: var(--watch-bg); }
.fi-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.fi-foot .cost:empty { display: none; }
.fi-waits { margin: 12px 0 0; }
.fi-foot .btn, .fi-ask .btn { min-height: 44px; }
.fi-held, .fi-sources { margin: 0; overflow-wrap: anywhere; }
@media (min-width: 760px) {
  .fi-table { display: table; }
  .fi-table thead { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .fi-table tbody { display: table-row-group; }
  .fi-table tr { display: table-row; padding: 0; margin: 0; border: 0; background: none; }
  .fi-table thead tr { display: table-row; }
  .fi-table th { padding: 6px 8px; text-align: start; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
  .fi-table td { display: table-cell; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: normal; }
  .fi-table td::before { content: none; }
  .fi-table td:not(.fi-sym):not(:last-child) { text-align: end; }
  .fi-table th:not(:first-child):not(:last-child) { text-align: end; }
  .fi-row.check td { background: var(--watch-bg); }
  .fi-colrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
}
/* The files imported, on the Portfolio page. */
.pf-files { display: grid; gap: 8px; padding: 12px 14px; }
.pf-files h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.pf-files-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pf-file { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.pf-file:first-child { border-top: 0; }
.pf-file .btn { min-height: 44px; }
.pf-file-ask { display: grid; gap: 6px; flex-basis: 100%; }
