body { font-family: "Aptos", "Segoe UI Variable", Inter, "Segoe UI", sans-serif; letter-spacing: -.008em; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.shell { display:grid; grid-template-columns:224px minmax(0,1fr); grid-template-rows:auto 1fr; min-height:100vh; }
.topbar { grid-column:1/-1; grid-row:1; min-height:82px; padding:12px 30px; gap:28px; background:var(--panel); }
.brand { flex:0 0 194px; margin:0; padding:0; color:var(--text); font-size:21px; font-weight:800; line-height:1; text-decoration:none; }
.brand:hover { text-decoration:none; }
.brand > span:nth-child(2) { display:block; }
.brand small { display:block; margin-top:6px; color:var(--subtle); font-size:9px; letter-spacing:.2em; font-weight:750; }
.brand-accent { color:var(--accent); }
.brand-icon { width:36px; height:36px; border-radius:12px; font-size:20px; box-shadow:0 7px 18px #0003; }
.main-tabs { height:58px; display:flex; align-items:center; align-self:end; gap:7px; flex:1; }
.main-tabs a { height:100%; display:flex; align-items:center; padding:0 20px; border-bottom:3px solid transparent; color:var(--muted); font-weight:720; white-space:nowrap; transition:color .15s,background .15s,border-color .15s; }
.main-tabs a:hover { color:var(--text); text-decoration:none; background:var(--table-head); border-radius:10px 10px 0 0; }
.main-tabs a.active { color:var(--accent); background:color-mix(in srgb,var(--accent) 10%,var(--panel)); border-color:var(--accent); border-radius:10px 10px 0 0; }
.topbar-user { font-size:13px; gap:10px; }
.sidebar { grid-column:1; grid-row:2; padding:29px 15px; border-right:1px solid #ffffff13; }
.side-kicker { display:flex; justify-content:space-between; gap:8px; padding:0 14px; color:#88a6c2; font-size:10px; font-weight:800; letter-spacing:.14em; }
.side-kicker span { color:#6d88a4; letter-spacing:.04em; }
.side-heading { color:#fff; font-size:20px; font-weight:750; padding:15px 14px 23px; }
.sidebar nav a { border:1px solid transparent; padding:12px 15px; border-radius:10px; transition:background .15s,border-color .15s,transform .15s; }
.sidebar nav a:hover { transform:translateX(2px); }
.sidebar nav a.active { background:var(--nav-active); border-color:color-mix(in srgb,var(--accent) 48%,transparent); box-shadow:inset 3px 0 var(--accent),0 4px 14px #0002; }
.sidebar-foot { border-top:1px solid #ffffff1c; margin:auto 7px 0; padding:20px 7px 0; }
.content { grid-column:2; grid-row:2; width:100%; max-width:1760px; padding:35px 38px; }
.workspace-petty { --accent:#c99854; --accent-hover:#d9aa65; --link:#e7bb7a; --nav-active:#514033; --sidebar:#181d25; --panel:#1b242a; --panel-raised:#253036; --table-head:#253138; --row-alt:#1e2a30; --row-hover:#304047; --input:#152127; --border:#34444a; --upload:#1c3033; --page:#111b20; --text:#f4f1e9; --muted:#b5c0bd; --subtle:#8e9d99; }
:root[data-theme="light"] .workspace-petty { --accent:#a66d32; --accent-hover:#895622; --link:#90602c; --nav-active:#725233; --sidebar:#27302f; --panel:#fffefa; --panel-raised:#fffdf8; --table-head:#f4f1e9; --row-alt:#fbf8f0; --row-hover:#f5ecd9; --input:#fffefa; --border:#e6e1d5; --upload:#f7f4e9; --page:#f8f7f2; --text:#24312f; --muted:#667570; --subtle:#7e8a83; }
.workspace-petty .sidebar { background:linear-gradient(180deg,var(--sidebar),#203832); }
.workspace-petty .brand-icon { background:linear-gradient(145deg,#c89148,#6b9581); }
.workspace-petty .primary { color:#1b2527; }
.eyebrow { color:var(--accent); font-size:11px; letter-spacing:.18em; font-weight:850; margin-bottom:11px; }
.petty-head { margin-bottom:26px; }
.petty-head h1 { font-size:clamp(28px,2.3vw,39px); letter-spacing:-.035em; font-weight:760; }
.petty-head p { font-size:14px; }
.petty-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:23px; }
.report-stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
.petty-stats article { display:grid; gap:9px; padding:22px 24px; background:var(--panel); border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow); }
.petty-stats span { color:var(--muted); font-size:13px; font-weight:650; }
.petty-stats strong { font-size:clamp(21px,2vw,30px); letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.petty-stats small { color:var(--subtle); font-size:12px; }
.positive { color:#7dc6a2; } .negative { color:#e9a595; }
:root[data-theme="light"] .workspace-petty .positive { color:#237e57; }
:root[data-theme="light"] .workspace-petty .negative { color:#b14d47; }
.ledger-panel { border-radius:16px; padding:0; overflow:hidden; }
.ledger-toolbar { display:flex; align-items:end; justify-content:space-between; flex-wrap:wrap; gap:18px; padding:23px 24px 20px; }
.ledger-toolbar h2 { margin:0 0 4px; } .ledger-toolbar p { margin:0; font-size:13px; }
.ledger-tools { display:flex; align-items:end; gap:12px; flex-wrap:wrap; }
.export-button { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:44px; padding:0 17px; border-radius:9px; background:#198754; color:#fff; font-size:14px; font-weight:750; white-space:nowrap; }
.export-button:hover { background:#146c43; color:#fff; text-decoration:none; }
.export-button svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.transfer-people { display:grid; gap:5px; margin-top:5px; }
.transfer-people[hidden],.transfer-flow[hidden] { display:none; }
.transfer-people label { display:grid; gap:3px; font-size:11px; }
.transfer-flow { color:var(--accent); font-weight:700; }
.report-table-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.report-table-head h2 { margin:0; }
.report-downloads { display:flex; gap:10px; font-size:12px; }
.date-filter { display:flex; gap:10px; align-items:end; flex-wrap:wrap; }
.date-filter label { margin:0; color:var(--muted); font-size:11px; font-weight:750; text-transform:uppercase; letter-spacing:.06em; }
.date-filter input { width:150px; margin-top:5px; padding:8px 10px; font-size:13px; color-scheme:inherit; }
.date-filter button { min-height:38px; }
.petty-table { min-width:1250px; }
.petty-table th { font-size:11px; letter-spacing:.08em; text-transform:uppercase; }
.petty-table th,.petty-table td { padding:13px 12px; vertical-align:middle; }
.petty-table th:first-child,.petty-table td:first-child { padding-left:24px; }
.petty-table th:last-child,.petty-table td:last-child { padding-right:24px; }
.petty-table tbody tr:nth-child(even) { background:var(--row-alt); }
.petty-table tbody tr:not(.petty-edit-row):hover { background:var(--row-hover); }
.petty-table .details-cell { min-width:185px; max-width:340px; overflow-wrap:anywhere; }
.amount-cell { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; font-weight:700; }
.transfer-note { display:block; margin-top:3px; color:var(--muted); font-size:11px; white-space:nowrap; }
.total-row { background:var(--table-head); border-top:2px solid var(--border); }
.total-row th,.total-row td { padding-top:14px; padding-bottom:14px; }
.total-row th { text-align:left; }
.report-table th,.report-table td { padding:12px 10px; }
.flow-pill { display:inline-flex; border-radius:99px; padding:5px 9px; font-size:11px; font-weight:750; white-space:nowrap; }
.flow-pill.in { background:#295745; color:#b0e8cb; } .flow-pill.out { background:#603d38; color:#ffcdc0; }
.flow-pill.transfer { background:#4b445f; color:#e0d5ff; }
:root[data-theme="light"] .flow-pill.in { background:#e0f4e9; color:#24744f; }
:root[data-theme="light"] .flow-pill.out { background:#fae9e3; color:#aa5548; }
:root[data-theme="light"] .flow-pill.transfer { background:#eee9f9; color:#63518d; }
.icon-actions { display:flex; align-items:center; gap:3px; white-space:nowrap; } .icon-actions form { margin:0; }
.icon-button { display:inline-grid; place-items:center; width:31px; height:31px; padding:0; background:transparent; border:1px solid transparent; border-radius:8px; color:var(--muted); cursor:pointer; }
.icon-actions .icon-button { width:34px; height:34px; border-radius:50%; }
.icon-actions .action-add { background:#28523e; color:#bceacc; }
.icon-actions .action-edit { background:#254961; color:#b9ddf5; }
.icon-actions .action-copy { background:#4c4265; color:#e1d2fa; }
.icon-actions .action-delete { background:#603833; color:#f8c1b7; }
:root[data-theme="light"] .icon-actions .action-add { background:#dff3e7; color:#24744f; }
:root[data-theme="light"] .icon-actions .action-edit { background:#e1f0fa; color:#276889; }
:root[data-theme="light"] .icon-actions .action-copy { background:#eee8fa; color:#6b5290; }
:root[data-theme="light"] .icon-actions .action-delete { background:#f9e6e1; color:#ad4e43; }
.icon-button:hover { background:color-mix(in srgb,var(--accent) 16%,var(--panel)); color:var(--accent); border-color:color-mix(in srgb,var(--accent) 35%,transparent); }
.icon-button.danger:hover { color:#e9988a; border-color:#e9988a66; background:#b8554823; }
.icon-button svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.icon-sprite { position:absolute; width:0; height:0; overflow:hidden; }
.petty-edit-row td { background:color-mix(in srgb,var(--accent) 9%,var(--panel)); }
.petty-edit-row input,.petty-edit-row select { margin:0; min-width:105px; padding:8px 7px; font-size:12px; }
.petty-edit-row input[name="remarks"] { min-width:175px; } .petty-edit-row .edit-actions { display:flex; gap:6px; }
.petty-edit-row .edit-actions button { padding:7px 10px; font-size:12px; }
.section-tabs { display:flex; gap:5px; border-bottom:1px solid var(--border); margin-bottom:22px; }
.section-tabs a { display:inline-block; padding:12px 17px; color:var(--muted); font-weight:750; border-bottom:3px solid transparent; }
.section-tabs a:hover { color:var(--text); text-decoration:none; } .section-tabs a.active { color:var(--accent); border-color:var(--accent); }
.master-panel { border-radius:16px; } .master-panel .panel-head { gap:15px; margin-bottom:15px; }
.master-panel h2 { margin:0; } .master-panel p { font-size:13px; margin:6px 0 0; }
.count-pill { color:var(--muted); background:var(--table-head); border:1px solid var(--border); border-radius:20px; padding:6px 10px; font-size:12px; white-space:nowrap; }
.master-add { display:flex; align-items:end; gap:10px; padding:16px; background:var(--table-head); border-radius:11px; margin-bottom:20px; }
.master-add input,.master-add select { width:min(300px,100%); margin:0; } .master-add button { white-space:nowrap; }
.master-table th,.master-table td { padding:13px 14px; }
.master-panel .table-wrap { overflow:visible; }
.status-dot { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:12px; }
.status-dot::before { content:""; width:7px; height:7px; border-radius:50%; background:#899393; } .status-dot.on::before { background:#5bbd88; }
.master-actions { display:flex; gap:15px; align-items:center; } .master-actions summary { color:var(--link); font-size:13px; font-weight:700; cursor:pointer; list-style:none; }
.master-actions details { position:relative; } .master-edit { position:absolute; z-index:5; top:27px; right:0; width:290px; display:grid; gap:10px; padding:17px; border:1px solid var(--border); border-radius:12px; background:var(--panel-raised); box-shadow:0 15px 38px #0005; }
.master-edit label { margin:0; font-size:12px; } .master-edit input,.master-edit select { margin-top:5px; padding:8px; }
.danger-text { color:#e9988a; font-size:13px; } .report-filter { padding:17px 20px; border-radius:14px; }
.report-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; } .report-grid .panel { min-width:0; border-radius:15px; }

/* Compact text rules for a new bank statement conversion. */
.workspace-bank .content { min-width:0; }
.conversion-form { min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); }
.conversion-form > .panel { min-width:0; }
.form-grid > .search-rules { grid-column:1/-1; width:100%; max-width:620px; padding:16px 18px; }
.search-rules-head { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.search-rules-head h2 { margin-bottom:8px; }
.search-rules-optional,.search-rules-count { color:var(--muted); font-size:12px; font-weight:400; }
.search-rules-count { white-space:nowrap; font-variant-numeric:tabular-nums; }
.search-rules > .hint { margin:0 0 10px; }
.search-rules-table { width:100%; table-layout:fixed; }
.search-rules-table th { padding:7px 6px; font-size:12px; }
.search-rules-table td { padding:3px 6px; vertical-align:middle; }
.search-rules-table input { margin:0; padding:6px 8px; min-width:0; font-size:12px; }
.search-rule-number { width:28px; text-align:center; color:var(--muted); font-size:12px; }
.search-rule-action { width:36px; }
.search-rule-remove { display:inline-grid; place-items:center; width:28px; height:30px; padding:0; border:0; border-radius:5px; background:transparent; color:var(--muted); font-size:21px; cursor:pointer; }
.search-rule-remove:hover { color:var(--text); background:var(--table-head); }
.search-rules-bottom { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-top:9px; }
.search-rules-bottom button { padding:7px 11px; font-size:13px; }
.search-rules-bottom .hint { margin:0; }
.search-rules > .search-rules-note { margin:9px 0 0; font-size:12px; }
.search-rules-grouping { display:grid; grid-template-columns:auto minmax(0,1fr); gap:10px; border-top:1px solid var(--border); margin-top:10px; padding-top:9px; font-size:12px; color:var(--muted); }
.search-rules-grouping [data-rule-groups] { display:grid; gap:3px; overflow-wrap:anywhere; }
.search-rules-grouping [data-rule-groups] strong { color:var(--text); }
.search-rules-upload { margin-top:10px; font-size:12px; color:var(--muted); }
.search-rules-upload summary { cursor:pointer; color:var(--link); }
.search-rules-upload label { margin:12px 0 6px; font-size:12px; }
.search-rules-upload .hint { margin-bottom:0; }
@media(max-width:900px) { .conversion-form { grid-template-columns:minmax(0,1fr); } }
@media(max-width:700px) { .workspace-bank .shell { grid-template-columns:minmax(0,1fr); } .workspace-bank .topbar,.workspace-bank .sidebar { min-width:0; } }
@media(max-width:540px) { .form-grid > .search-rules { padding:15px; } .search-rules-table th { padding:6px 3px; } .search-rules-table td { padding:3px; } .search-rule-number { width:20px; } .search-rule-action { width:30px; } .search-rules-table input { padding:6px; } .search-rules-grouping { grid-template-columns:1fr; gap:3px; } }
@media(pointer:coarse) { .search-rule-remove { width:44px; height:44px; } .search-rule-action { width:50px; } .search-rules-table input { font-size:16px; } .search-rules-bottom button { min-height:44px; } }
@media(max-width:1100px) { .topbar { flex-wrap:wrap; gap:10px; } .main-tabs { order:3; flex-basis:100%; } .topbar-user { margin-left:auto; } .report-grid { grid-template-columns:1fr; } .petty-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) { .shell { grid-template-columns:1fr; grid-template-rows:auto auto 1fr; } .topbar { grid-column:1; grid-row:1; padding:14px 16px 0; } .brand { flex:1; } .user-name,.role { display:none; } .main-tabs { overflow-x:auto; } .main-tabs a { padding:0 14px; } .sidebar { grid-column:1; grid-row:2; padding:10px 16px; } .side-kicker,.side-heading,.sidebar-foot { display:none; } .sidebar nav { display:flex; gap:5px; overflow-x:auto; } .sidebar nav a { white-space:nowrap; padding:9px 12px; } .sidebar nav a.active { box-shadow:inset 0 -3px var(--accent); } .content { grid-column:1; grid-row:3; padding:22px 16px; } .petty-stats { grid-template-columns:1fr; } .master-add { flex-wrap:wrap; } .date-filter { width:100%; } }
