/*
 * NWX ACCOUNTS — the few shapes the finance area needs that the console does not already
 * have. Everything else (heads, tabs, rows, pills, tables, notes, dialogs) is centre.css,
 * so the books look like the rest of the Command Centre rather than a separate product.
 * The page's CSP forbids style attributes, so every layout decision lives here.
 */

/* The tabs: the same row-of-words treatment as Cases and Intelligence — with clear air between
   the page's heading above and the page's content below, so the row reads as its own thing. */
#acctTabs.seg { display: flex; gap: 22px; row-gap: 4px; margin: 34px 0 26px; padding: 0; background: none; border-radius: 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
#acctTabs.seg button { position: relative; padding: 0 0 12px; border-radius: 0; background: none; color: var(--muted); font-size: 14px; font-weight: 400; }
#acctTabs.seg button:hover { color: var(--ink-2); }
#acctTabs.seg button[aria-pressed="true"] { background: none; box-shadow: none; color: var(--ink); font-weight: 600; }
#acctTabs.seg button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px 2px 0 0; }

/* The month picker sits with the head's actions. */
.acct-head { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.acct-period { min-width: 190px; margin: 0; }
.acct-period select { width: 100%; }

/* On a wide screen the month's two lists sit side by side instead of stacking down one side. */
.acct-cols { display: grid; grid-template-columns: 1fr; column-gap: 56px; }
@media (min-width: 1400px) { .acct-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }

/* Forms: a grid of fields that folds to one column. */
.acct-form h3 { margin: 22px 0 10px; font-size: 14.5px; letter-spacing: -.01em; }
.acct-form h3:first-child { margin-top: 0; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 18px; margin-bottom: 14px; }
.acct-grid .field { margin: 0; }
.acct-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 14px; font-size: 13.5px; color: var(--ink-2); max-height: 170px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.acct-checks::-webkit-scrollbar { width: 3px; }
.acct-checks::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.acct-checks label { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.acct-select { padding: 11px 12px; border: 1px solid transparent; border-radius: 12px; background: var(--raised); color: var(--ink); font: inherit; font-size: 14px; }

/* Imports: the place a pile of exports is dropped, and the files waiting to be tagged. */
.acct-drop { border: 1px dashed var(--line); background: var(--ground); transition: border-color var(--dur), background var(--dur); }
.acct-drop.over { border-color: var(--accent); background: var(--accent-quiet); }
.acct-drop__lead { margin: 0 0 12px; font-size: 15px; }
.acct-wait { margin-top: 12px; }
.acct-wait__what { margin: 0 0 2px; font-size: 14.5px; }
.acct-files { list-style: none; margin: 12px 0 14px; padding: 0; display: grid; gap: 0; }
.acct-files li { display: flex; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.acct-files li label { display: inline-flex; gap: 8px; align-items: center; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.acct-files li .muted { white-space: nowrap; font-size: 12.5px; }
.acct-one { margin-top: 26px; }
.acct-one summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.acct-one summary:hover { color: var(--ink); }
.acct-one[open] summary { margin-bottom: 12px; }

/* Numbers line up. */
.tbl .num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.acct-total td { font-weight: 600; border-top: 1px solid var(--line); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.tblwrap { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.tblwrap::-webkit-scrollbar { height: 3px; }
.tblwrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

/* A transaction's lineage: the file row down to Sage, one step per line. */
.acct-lineage { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; }
.acct-lineage li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: 14px; }
.acct-lineage li b { color: var(--muted); font-weight: 500; }
.acct-lineage .click, .acct-evidence .click { cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.acct-lineage .click:hover, .acct-evidence .click:hover { text-decoration-color: var(--ink); }
@media (max-width: 700px) { .acct-lineage li { grid-template-columns: 1fr; gap: 4px; } }

/* Ask INOX: question and answer, quiet. */
.acct-thread { display: grid; gap: 14px; margin-top: 22px; max-width: 72rem; }
.acct-q { justify-self: end; background: var(--raised); border-radius: 14px; padding: 10px 14px; font-size: 14.5px; max-width: 80%; }
.acct-a { border-left: 2px solid var(--accent); padding: 4px 0 4px 16px; font-size: 14.5px; }
.acct-a p { margin: 0 0 8px; }
.acct-evidence { margin: 6px 0 10px; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); display: grid; gap: 4px; }
