/* Upload state */
.sa-pick { display: grid; gap: 12px; max-width: 560px; }
.sa-pick[hidden], .sa-pw[hidden] { display: none; }
.sa-drop { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 40px 20px; border: 2px dashed var(--field); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.sa-drop .icon-chip { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 8px; }
.sa-drop strong { font-family: var(--display); font-size: 1.3rem; }
.sa-sub { color: var(--muted); font-size: 15px; }
.sa-or { color: var(--muted); font-size: 13px; margin-top: 6px; }
.sa-drop:hover, .sa-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.sa-drop:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.sa-pw { display: grid; gap: 8px; padding: 16px; }
.sa-pw label { font-weight: 700; font-size: 15px; }
.sa-pw-row { display: flex; gap: 8px; }
.sa-pw-row input { flex: 1; min-width: 0; }
#sa-status { margin: 0; }
#sa-status:empty { display: none; }
#sa-status.busy { display: flex; align-items: center; gap: 10px; font-weight: 600; }
#sa-status.busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--field); border-top-color: var(--accent); animation: sa-spin .8s linear infinite; }
@keyframes sa-spin { to { transform: rotate(360deg); } }
.note.leaf { margin: 0; font-weight: 600; align-items: center; }

/* Results */
.sa-out { display: grid; gap: 28px; max-width: 640px; }
.sa-out:empty { display: none; }
.sa-out h2 { font-size: 1.25rem; margin: 0 0 14px; }
.sa-banner { margin-bottom: -6px; }
.sa-meta { margin: 0; font-size: 14px; color: var(--muted); }
.sa-big { margin: 4px 0 0; font-size: 22px; font-weight: 600; color: var(--muted); }
.sa-big strong { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 10vw, 3rem); letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.sa-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.sa-stats .card { padding: 14px; display: grid; gap: 2px; border-radius: 14px; }
.sa-stats span { font-size: 13px; color: var(--muted); }
.sa-stats strong { font-family: var(--display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.in { color: var(--leaf); }
.out { color: var(--bad); }

.sa-cats, .sa-payees { list-style: none; margin: 0; padding: 0; }
.sa-cats { display: grid; gap: 14px; }
.sa-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin-bottom: 6px; }
.sa-row strong { font-weight: 600; }
.sa-bar { display: block; width: 100%; height: 10px; border-radius: 5px; background: var(--surface-2); }
.sa-cats li:nth-child(6n+1) rect { fill: var(--indigo); }
.sa-cats li:nth-child(6n+2) rect { fill: var(--leaf); }
.sa-cats li:nth-child(6n+3) rect { fill: var(--muted); }
.sa-cats li:nth-child(6n+4) rect { fill: var(--chili); }
.sa-cats li:nth-child(6n+5) rect { fill: var(--accent); }
.sa-cats li:nth-child(6n) rect { fill: var(--ink); }

.sa-payees { padding: 0; overflow: hidden; }
.sa-payees li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--surface-2); }
.sa-payees li:last-child { border-bottom: 0; }
.sa-av { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-weight: 700; font-size: 14px; background: var(--indigo-soft); color: var(--indigo); }
.sa-payees li:nth-child(4n+2) .sa-av { background: var(--leaf-soft); color: var(--leaf); }
.sa-payees li:nth-child(4n+3) .sa-av { background: var(--surface-2); color: var(--muted); }
.sa-payees li:nth-child(4n) .sa-av { background: var(--chili-soft); color: var(--chili); }
.sa-who { flex: 1; min-width: 0; display: grid; }
.sa-who strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-who span { font-size: 13px; color: var(--muted); }
.sa-payees .num { font-weight: 700; }

.sa-all summary { list-style: none; font-weight: 600; }
.sa-all summary::-webkit-details-marker { display: none; }
.sa-scroll { overflow-x: auto; margin-top: 10px; padding: 12px; }
.sa-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sa-table th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 6px 4px; border-bottom: 1px solid var(--border); }
.sa-table td { padding: 6px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.sa-table td:nth-child(2) { overflow-wrap: anywhere; min-width: 12em; }
.sa-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
