bettersight-statement-extra.../frontend/src/assets/main.css

371 lines
18 KiB
CSS

:root{
/* Accent — single brand color, per UI_DESIGN_THEME.md (enterprise variant: standard blue) */
--blue:#2563EB;
--blue-b:#1D4ED8;
--cyan:#2563EB;
/* Status colors — never reused as brand accent */
--green:#16A34A; --green-l:#DCFCE7; --green-d:#15803D;
--amber:#D97706; --amber-l:#FEF3C7;
--red:#DC2626; --red-l:#FEE2E2;
/* Background stack — light surfaces, per UI_DESIGN_THEME.md's own
light-surface tokens (--surface/--surface-2/--page) */
--navy:#EEF1F6;
--navy-2:#FFFFFF;
--navy-3:#F8FAFD;
/* Text on light surfaces, per UI_DESIGN_THEME.md */
--t1:#0D1526; --t2:#2D3A52; --t3:#6B7A99; --t4:#9BA8C0;
/* Borders, per UI_DESIGN_THEME.md's light-surface tokens */
--border:rgba(28,56,121,.11);
--border-2:rgba(28,56,121,.18);
--border-b:rgba(37,99,235,.28);
--shadow:0 2px 8px rgba(12,26,60,.06),0 8px 28px rgba(12,26,60,.09),0 0 0 1px rgba(28,56,121,.06);
--shadow-h:0 4px 16px rgba(12,26,60,.10),0 16px 48px rgba(12,26,60,.13),0 0 0 1px rgba(37,99,235,.18);
--fd:'Inter',sans-serif;
--fb:'Inter',sans-serif;
--fm:'JetBrains Mono',monospace;
--r:8px;
}
*{ box-sizing:border-box; margin:0; padding:0; }
body{ font-family:var(--fb); background:var(--navy); color:var(--t1); min-height:100vh; -webkit-font-smoothing:antialiased; }
main{ position:relative; z-index:1; max-width:1360px; margin:0 auto; padding:56px 24px 90px; }
.eyebrow{
display:inline-flex; align-items:center; gap:7px;
font-family:var(--fm); font-size:11px; font-weight:600; letter-spacing:.12em; text-transform:uppercase;
color:var(--blue); background:rgba(37,99,235,.08); border:1px solid var(--border-b);
padding:5px 12px; border-radius:20px; margin-bottom:16px;
}
.eyebrow::before{ content:''; width:6px; height:6px; border-radius:50%; background:var(--blue); }
h1{ font-family:var(--fd); font-weight:800; font-size:30px; letter-spacing:-.01em; margin-bottom:10px; }
.sub{ color:var(--t3); font-size:14.5px; line-height:1.6; max-width:620px; margin-bottom:34px; }
.card{
background:var(--navy-2); border:1px solid var(--border); border-radius:var(--r);
padding:28px 26px; margin-bottom:22px; box-shadow:var(--shadow);
}
.card h2{
font-family:var(--fm); font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase;
color:var(--blue); margin-bottom:18px;
}
.file-zone{
border:1.5px dashed var(--border-2); border-radius:10px; padding:26px 20px; text-align:center;
cursor:pointer; transition:all .2s; position:relative; margin-bottom:16px;
}
.file-zone:hover, .file-zone.drag-over{ border-color:var(--blue); background:rgba(37,99,235,.04); }
.file-zone input[type="file"]{ position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }
.file-zone-label{ font-size:13.5px; color:var(--t2); }
.file-zone-label strong{ color:var(--blue); font-weight:600; }
.file-zone-sub{ font-size:11.5px; color:var(--t4); margin-top:5px; }
.file-zone-sub.file-chosen-name{ font-family:var(--fm); font-size:12px; color:var(--blue); margin-top:5px; }
/* .fields-row pairs the balance inputs with the Recheck Balance button -
the button sits at the row's own right edge, lining up under the
Hide/Show Source Doc toggle above it (txn-col-head is also a full-width
row with its own button at the right). Drops below the closing-balance
field on narrow viewports - see the mobile breakpoint below. */
.fields-row{ display:flex; align-items:flex-start; gap:16px; margin-bottom:16px; }
.fields-row .fields{ flex:1 1 auto; min-width:0; margin-bottom:0; }
/* .recheck-spacer mirrors .fields label's own box (same font-size/
margin-bottom) invisibly, so the button below it starts at exactly the
same y as the balance inputs - aligned with the closing-balance field,
not the row's top edge (where the labels sit). Matching the TOP edge
alone isn't enough though - .btn-toggle's own padding makes it
naturally shorter than a balance input (which has more vertical
padding plus a border), so both get the same explicit height below,
with the button's text centered in it via flex, instead of leaving
either height to the browser's own font-metric-driven "auto". */
.recheck-wrap{ display:flex; flex-direction:column; flex-shrink:0; }
.recheck-spacer{ font-size:11.5px; line-height:1; margin-bottom:6px; visibility:hidden; }
.btn-recheck{
flex-shrink:0; white-space:nowrap; height:36px; padding-top:0; padding-bottom:0;
display:inline-flex; align-items:center; justify-content:center;
}
.fields{ display:flex; flex-wrap:wrap; gap:16px; }
.fields > div{ flex:1 1 180px; min-width:160px; }
.fields label{ font-size:11.5px; color:var(--t3); display:block; margin-bottom:6px; white-space:normal; }
.fields input{
width:100%; height:36px; padding:0 11px; background:var(--navy); border:1px solid var(--border-2);
border-radius:8px; font-size:13px; color:var(--t1); font-family:var(--fb); outline:none; transition:border-color .2s;
}
.fields input:focus{ border-color:var(--blue); }
.calc-readout{ font-family:var(--fm); font-size:11.5px; color:var(--t3); margin-top:6px; min-height:14px; }
.calc-readout.match{ color:var(--green); }
.note{ font-size:12px; color:var(--t4); line-height:1.6; margin-bottom:18px; }
.btn{
display:inline-flex; align-items:center; justify-content:center; gap:8px;
font-family:var(--fd); font-weight:700; font-size:13.5px; border-radius:10px; border:none;
padding:11px 22px; cursor:pointer; transition:all .2s;
}
.btn-primary{ background:var(--blue); color:var(--navy-2); box-shadow:0 4px 18px rgba(37,99,235,.18); }
.btn-primary:hover{ background:var(--blue-b); }
.btn-primary:disabled{ opacity:.35; cursor:not-allowed; box-shadow:none; }
.btn-ghost{
background:transparent; color:var(--t1); border:1px solid var(--border-2);
}
.btn-ghost:hover{ border-color:var(--border-b); color:var(--blue); }
.spinner{ font-family:var(--fm); font-size:12px; color:var(--t4); margin-left:12px; }
.error-note{
display:none; font-size:12.5px; color:var(--red); background:var(--red-l);
border:1px solid rgba(220,38,38,.3); border-radius:9px; padding:11px 14px; margin-top:12px;
}
.error-note.visible{ display:block; }
.fields-row + .error-note.visible{ margin-bottom:14px; }
.status-banner{
display:inline-flex; align-items:center; gap:9px; padding:7px 15px; border-radius:20px;
font-family:var(--fm); font-weight:600; font-size:12.5px; letter-spacing:.03em; text-transform:uppercase;
margin-bottom:18px;
}
.status-banner.Verified{ background:var(--green-l); color:var(--green-d); }
.status-banner.Needs-review{ background:var(--amber-l); color:var(--amber); }
.status-banner.Failed{ background:var(--red-l); color:var(--red); }
.period-note{ font-size:12.5px; color:var(--t3); margin-bottom:18px; }
.result-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; }
.result-head-left{ display:flex; align-items:center; gap:10px; cursor:pointer; }
.result-head-left h2{ margin-bottom:0; }
.collapse-arrow{
display:inline-flex; align-items:center; justify-content:center;
width:20px; height:20px; background:transparent; border:none; cursor:pointer;
color:var(--blue); font-size:12px; line-height:1; transition:transform .2s; transform:rotate(0deg);
}
.collapse-arrow.expanded{ transform:rotate(90deg); }
.result-details{ display:none; margin-top:18px; }
.result-details.expanded{ display:block; }
.checks-list{ list-style:none; }
.checks-list li{
display:flex; gap:12px; align-items:flex-start; padding:11px 0; border-bottom:1px solid var(--border);
font-size:13px; color:var(--t2);
}
.checks-list li:last-child{ border-bottom:none; }
.checks-list strong{ font-family:var(--fd); font-weight:700; color:var(--t1); text-transform:capitalize; }
.tag{
font-family:var(--fm); font-size:9.5px; font-weight:600; text-transform:uppercase; letter-spacing:.06em;
padding:3px 9px; border-radius:20px; white-space:nowrap; flex-shrink:0; margin-top:1px;
}
.tag.pass{ background:var(--green-l); color:var(--green-d); }
.tag.fail{ background:var(--red-l); color:var(--red); }
.tag.needs_review{ background:var(--amber-l); color:var(--amber); }
.tag.not_available{ background:rgba(16,24,40,.06); color:var(--t4); }
.table-wrap{ overflow-x:auto; margin-top:4px; }
table{ width:100%; border-collapse:collapse; font-size:12.5px; table-layout:fixed; }
th{
text-align:left; padding:9px 10px; font-family:var(--fm); font-size:10px; font-weight:600;
letter-spacing:.06em; text-transform:uppercase; color:var(--t4); border-bottom:1px solid var(--border-2);
white-space:nowrap; overflow:hidden;
}
td{ text-align:left; padding:3px 4px; border-bottom:1px solid var(--border); color:var(--t2); white-space:nowrap; overflow:hidden; }
td.desc{ white-space:normal; color:var(--t1); overflow:visible; }
td.amt, th.amt{ text-align:right; font-family:var(--fm); }
tr.flagged td{ background:rgba(217,119,6,.08); }
tr.flagged td:first-child{ border-left:2px solid var(--amber); }
/* Sort arrows sit inline next to each sortable header's own label - a
muted up/down pair that turns the accent blue for whichever column +
direction is currently active, rather than a single toggle arrow, so
both directions are always visibly available, not just the active one. */
.sort-arrows{ display:inline-flex; flex-direction:column; vertical-align:middle; margin-left:4px; gap:1px; }
.sort-arrow{
background:transparent; border:none; cursor:pointer; padding:0; margin:0; font-size:6px;
line-height:1; color:var(--border-b);
}
.sort-arrow:hover{ color:var(--blue); }
.sort-arrow.active{ color:var(--blue); }
/* Filter row sits directly beneath the header row, one input per column
(Description's doubles as a free-text search) - same colgroup widths
apply automatically since the table is table-layout:fixed. */
.filter-row th{ padding:6px 8px 10px; text-transform:none; font-weight:400; }
.filter-input{
width:100%; padding:5px 7px; background:var(--navy); border:1px solid var(--border-2);
border-radius:6px; font-size:11.5px; color:var(--t1); font-family:var(--fb); outline:none;
transition:border-color .2s;
}
.filter-input:focus{ border-color:var(--blue); }
.filter-select{ cursor:pointer; }
.clear-filters-btn{
background:transparent; border:none; cursor:pointer; color:var(--t4); font-size:12px;
padding:4px; line-height:1; border-radius:5px;
}
.clear-filters-btn:hover{ color:var(--red); background:rgba(16,24,40,.06); }
.no-rows-note{ text-align:center; color:var(--t4); padding:20px 10px; white-space:normal; }
.cell-input{
width:100%; background:transparent; border:1px solid transparent; border-radius:5px;
padding:6px 6px; font:inherit; color:inherit; text-align:inherit; font-family:inherit;
}
.cell-input:read-only{ color:var(--t2); cursor:default; }
tr.editing .cell-input:not(:read-only):hover{ border-color:var(--border-2); }
tr.editing .cell-input:not(:read-only):focus{ outline:none; border-color:var(--blue); background:rgba(37,99,235,.05); }
.cell-input.edited{ background:rgba(37,99,235,.08); border-color:var(--border-b); }
.desc-input{
display:block; white-space:pre-wrap; word-break:break-word; resize:none;
overflow:hidden; min-height:28px; line-height:1.5;
}
td.amt .cell-input{ text-align:right; font-family:var(--fm); }
.row-actions{ width:34px; padding:3px 0 3px 4px !important; }
.row-btn{
background:transparent; border:none; cursor:pointer; padding:4px; border-radius:5px;
font-size:13px; line-height:1; color:var(--t4); transition:color .15s, background .15s;
}
.row-btn:hover{ color:var(--t1); background:rgba(16,24,40,.06); }
.row-btn.edit{ color:var(--blue); }
.row-btn.save{ color:var(--blue); }
.row-btn.cancel{ color:var(--t4); }
tr.editing td{ background:rgba(37,99,235,.03); }
.restore-banner{
display:none; align-items:center; justify-content:space-between; gap:12px;
font-size:12.5px; color:var(--t2); background:rgba(37,99,235,.07); border:1px solid var(--border-b);
border-radius:9px; padding:10px 14px; margin-bottom:16px;
}
.restore-banner.visible{ display:flex; }
.restore-banner button{
background:transparent; border:1px solid var(--border-2); color:var(--t3); font-family:var(--fb);
font-size:11.5px; padding:5px 10px; border-radius:7px; cursor:pointer; flex-shrink:0;
}
.restore-banner button:hover{ color:var(--t1); border-color:var(--border-b); }
#resultSection{ display:none; }
/* Sticky on the GROUP, not on pdf-col alone - keeps the source PDF and
transactions cards moving together as one unit while the main page
scrolls, instead of the PDF pinning in place while transactions
scrolls past it underneath (they'd drift out of alignment). */
.review-grid{ display:flex; align-items:start; position:sticky; top:24px; }
/* Fixed total card height, same pattern .txn-col uses (see its own
comment) - previously only the CHILD (iframe/img-preview-wrap/
empty-panel-source) was pinned to 82vh, leaving the card's own total
height as 82vh PLUS pdf-col-head's height and the card's own padding,
taller than .txn-col's flat 82vh and visibly mismatched. */
.pdf-col{ flex:0 0 40%; min-width:260px; display:flex; flex-direction:column; height:82vh; }
.pdf-col-head{
display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; flex-shrink:0;
}
.pdf-col-head h2{ margin-bottom:0; }
.pdf-col iframe{
width:100%; flex:1 1 auto; min-height:0; border:1px solid var(--border-2); border-radius:10px;
background:var(--navy-3); display:block;
}
/* Images get their own zoomable/scrollable panel instead of the PDF
iframe - a browser-native PDF viewer has its own zoom controls built
in, an <img> in the same iframe would have none at all, which is the
gap this fills. Width-based zoom (not CSS transform:scale), so the
wrap's overflow:auto actually produces scrollbars for the zoomed-in
content - transform alone doesn't change an element's layout size, so
a scaled-up image would just overflow uncontrollably instead. */
.img-zoom-controls{ display:flex; align-items:center; gap:4px; }
.img-zoom-controls button{
background:var(--navy-3); border:1px solid var(--border-2); color:var(--t2);
width:26px; height:26px; border-radius:6px; cursor:pointer; font-size:14px; line-height:1;
display:flex; align-items:center; justify-content:center; padding:0; transition:all .15s;
}
.img-zoom-controls button#imgZoomReset{ width:auto; padding:0 9px; font-size:11px; font-weight:700; }
.img-zoom-controls button:hover{ background:rgba(37,99,235,.08); border-color:var(--blue); color:var(--blue); }
.img-zoom-controls span{ font-size:11.5px; color:var(--t3); min-width:38px; text-align:center; font-family:var(--fm); }
.img-preview-wrap{
width:100%; flex:1 1 auto; min-height:0; border:1px solid var(--border-2); border-radius:10px;
background:var(--navy-3); overflow:auto; display:block;
}
.img-preview-wrap img{ display:block; }
/* Both panels are visible from the start (before any file is chosen),
so the opening/closing balance fields in TransactionsTable are
reachable before clicking Extract - each shows one of these until
there's something real to display instead. */
.empty-panel{
display:flex; align-items:center; justify-content:center; text-align:center;
color:var(--t4); font-size:13px; line-height:1.6; padding:40px 24px;
border:1px solid var(--border-2); border-radius:10px; background:var(--navy-3);
}
.empty-panel-source{ width:100%; flex:1 1 auto; min-height:0; }
.empty-panel-table{ flex:1 1 auto; min-height:0; margin-top:4px; }
.resizer{
flex:0 0 28px; align-self:stretch; cursor:col-resize;
display:flex; align-items:center; justify-content:center;
touch-action:none; position:relative;
}
/* A fader-knob look, not just a thin line - a rounded, raised pill with
grip dashes through its middle, so it visibly reads as a two-finger
drag handle rather than a stray divider. */
.resizer::before{
content:''; width:14px; height:58px; border-radius:9px;
background:linear-gradient(180deg, var(--navy-3), var(--navy-2));
border:1px solid var(--border-2);
box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 2px 8px rgba(16,24,40,.10);
transition: border-color .15s, box-shadow .15s;
}
.resizer::after{
content:''; position:absolute; top:50%; left:50%;
width:2px; height:18px; border-radius:1px; background:var(--t3);
box-shadow: -4px 0 0 var(--t3), 4px 0 0 var(--t3);
transform:translate(-50%,-50%);
transition: background .15s;
}
.resizer:hover::before, .resizer.dragging::before{
border-color:var(--border-b);
box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 1px rgba(37,99,235,.25), 0 2px 10px rgba(16,24,40,.12);
}
.resizer:hover::after, .resizer.dragging::after{
background:var(--blue); box-shadow: -4px 0 0 var(--blue), 4px 0 0 var(--blue);
}
/* Fixed to the same 82vh the source-document side's own child (iframe/
img-preview-wrap/empty-panel-source) is - flex-column so the table
area (the one piece whose content height varies) absorbs whatever
space is left after the header/fields/notes above it, rather than the
whole column growing past its sibling's height the way it did when
only .table-wrap itself had a height cap. */
.txn-col{ flex:1 1 auto; min-width:260px; display:flex; flex-direction:column; height:82vh; }
.txn-col-head{
display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; flex-shrink:0;
}
.txn-col-head h2{ margin-bottom:0; }
.txn-col .fields, .txn-col .note{ flex-shrink:0; }
.btn-toggle{
background:var(--blue); border:none; color:var(--navy-2); font-family:var(--fd); font-weight:700;
font-size:12px; padding:7px 15px; border-radius:8px; cursor:pointer; transition:all .15s; flex-shrink:0;
box-shadow:0 2px 10px rgba(37,99,235,.18);
}
.btn-toggle:hover{ background:var(--blue-b); }
.btn-toggle:disabled{ opacity:.5; cursor:not-allowed; box-shadow:none; }
.pdf-col.hidden-panel, .resizer.hidden-panel{ display:none; }
.txn-col .table-wrap{
flex:1 1 auto; min-height:0; overflow-y:auto; margin-top:4px;
}
.txn-col table thead th{
position:sticky; top:0; background:var(--navy-2); z-index:1;
}
@media (max-width: 860px){
.review-grid{ flex-direction:column; position:static; }
.pdf-col{ position:static; flex-basis:auto !important; width:100%; }
.resizer{ display:none; }
.txn-col{ width:100%; }
}
/* Mobile: the Recheck Balance button drops below the closing-balance
field instead of sitting beside the fields at the row's right edge -
860px (the breakpoint above) still has plenty of width for both side
by side, so this is its own, narrower cutoff. */
@media (max-width: 640px){
.fields-row{ flex-direction:column; align-items:stretch; }
.recheck-spacer{ display:none; }
.btn-recheck{ align-self:flex-end; }
}