:root { --ink:#172129; --muted:#74818a; --line:#e3e9e7; --paper:#f5f8f6; --white:#fff; --navy:#142b38; --teal:#147b70; --amber:#b17b12; --red:#bd5a52; --green:#27836f; --shadow:0 10px 28px rgba(28,52,60,.045); }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:var(--paper); font:14px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
a { color:inherit; text-decoration:none; }
.app-shell { display:flex; min-height:100vh; }
.sidebar { position:sticky; top:0; align-self:flex-start; flex:0 0 246px; width:246px; height:100vh; min-height:0; padding:27px 16px 18px; display:flex; flex-direction:column; overflow-y:auto; background:linear-gradient(180deg,var(--navy),#102531); color:#d6e1e3; }
.brand { display:flex; align-items:center; gap:11px; padding:0 14px 25px; color:#fff; }.brand-mark { display:grid; place-items:center; width:35px; height:35px; border-radius:10px; background:#fff; color:var(--navy); font-weight:700; }.brand-mark img { display:block; width:25px; height:29px; object-fit:contain; }.brand strong,.brand small { display:block; }.brand small { color:#94a9b0; font-size:10px; }.login-brand-mark { width:72px; height:72px; margin:0 auto 10px; border-radius:8px; background:#fff; }.login-brand-mark img { width:62px; height:66px; }
.bulk-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 12px}.documents-table{width:max-content;max-width:100%;table-layout:auto}.documents-table th,.documents-table td{padding-left:12px;padding-right:12px}.documents-table td:nth-child(6){white-space:normal;overflow-wrap:anywhere;max-width:280px}.documents-table td.icon-actions{min-width:190px;width:210px;white-space:nowrap}.document-row-actions{display:flex;align-items:center;gap:7px;flex-wrap:nowrap;width:max-content}.document-row-actions form{display:inline-flex;flex:0 0 auto;margin:0}.document-row-actions>.icon-action{flex:0 0 36px}.bulk-regeneration-message{color:var(--muted);font-size:11px}.template-monaco{height:620px;border:1px solid var(--line)}.template-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.8fr);gap:14px}.template-live-previews{display:grid;grid-template-rows:1fr 1fr;gap:12px;min-height:620px}.template-live-previews section{min-height:0}.template-live-previews h2{margin:0 0 6px;font-size:13px}.template-live-previews iframe{width:100%;height:calc(100% - 25px);min-height:260px;border:1px solid var(--line);background:#fff}.template-preview{width:100%;height:720px;border:1px solid var(--line);margin-top:12px}.template-editor-actions{display:flex;align-items:center;gap:12px;margin-bottom:8px}.preview-error{color:var(--red)}.page-setup{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.editor-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}.template-code-panel{min-width:0}.template-live-previews{min-width:0}.html-editor{height:620px;border:1px solid var(--line);background:#fff}.html-editor-panes{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);height:100%}.html-visual-pane,.html-source-pane{display:flex;flex-direction:column;min-width:0;padding:8px}.html-visual-pane{border-right:1px solid var(--line)}.html-source-pane h2{margin:0;padding:5px 3px 8px;font-size:12px}.html-source-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}.html-source-heading label{display:flex;align-items:center;gap:5px;font-size:12px}.html-source-heading select{max-width:180px}.visual-toolbar{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-bottom:6px}.visual-toolbar button{min-width:30px;padding:4px 7px;border:1px solid var(--line);border-radius:4px;background:#fff;color:var(--ink);cursor:pointer}.visual-toolbar label{display:flex;align-items:center;gap:4px;font-size:12px}.visual-html-frame{flex:1 1 auto;width:100%;min-height:0;border:1px solid var(--line);background:#fff}.html-source-pane textarea{flex:1 1 auto;min-height:0;width:100%;resize:none;padding:12px;border:1px solid var(--line);border-radius:4px;background:#fbfcfc;color:#26343a;font:12px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;tab-size:2}@media(max-width:1200px){.template-workspace{grid-template-columns:1fr}.template-live-previews{grid-template-columns:1fr 1fr;grid-template-rows:360px;min-height:0}.template-live-previews iframe{height:calc(100% - 25px)}}@media(max-width:800px){.html-editor-panes{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.html-visual-pane{border-right:0;border-bottom:1px solid var(--line)}.html-editor{height:780px}.template-live-previews{grid-template-columns:1fr;grid-template-rows:300px 300px}.template-live-previews iframe{height:calc(100% - 25px)}.template-monaco,.html-editor{height:600px}}
.document-version-actions{display:inline-flex;align-items:center;flex:0 0 auto}.document-version-actions>.icon-action{flex:0 0 28px;width:28px;height:36px;min-height:36px}
.documents-table{width:max-content;min-width:680px;max-width:100%;table-layout:auto}
.documents-table th,.documents-table td{padding-left:8px;padding-right:8px}
.documents-table th:nth-child(1),.documents-table td:nth-child(1){width:40px}
.documents-table th:nth-child(2),.documents-table td:nth-child(2){width:230px}
.documents-table th:nth-child(3),.documents-table td:nth-child(3){width:165px}
.documents-table th:nth-child(4),.documents-table td:nth-child(4){width:125px}
.documents-table th:nth-child(5),.documents-table td:nth-child(5){width:170px}
.documents-table th:nth-child(6),.documents-table td:nth-child(6){width:250px;white-space:normal;overflow-wrap:anywhere}
.documents-table td.icon-actions,.documents-table th:last-child{width:180px;min-width:0;white-space:nowrap}
.template-field-token{display:inline-block;padding:1px 5px;border:1px solid #bad8d2;border-radius:4px;background:#e8f4f1;color:#155f56;font:12px ui-monospace,SFMono-Regular,Menlo,monospace;white-space:nowrap;user-select:all}
.template-workspace{grid-template-columns:minmax(0,1fr)}
.html-source-editor{flex:1 1 auto;min-height:0;width:100%;height:560px;border:1px solid var(--line)}
.html-source-heading{min-height:34px}
.icon-actions { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
/* Action cells must stay table cells, otherwise display:flex shortens the cell and the row divider stops short. */
td.icon-actions, td.import-actions, td.fund-actions { display:table-cell; vertical-align:middle; }
.icon-actions form { display:inline-flex; margin:0; }
.icon-action { position:relative; display:inline-grid; place-items:center; width:36px; height:36px; padding:0; border:1px solid var(--line); border-radius:7px; background:#fff; color:#334750; cursor:pointer; }
.icon-action svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.icon-action .excel-action-icon { display:block; width:28px; height:28px; object-fit:contain; }
.icon-action:hover { color:var(--teal); border-color:var(--teal); background:#f1faf8; }
.icon-action-primary { border-color:var(--teal); background:var(--teal); color:#fff; }
.icon-action-primary:hover { border-color:#0f655c; background:#0f655c; color:#fff; }
.icon-action-cancel { border-color:var(--red); background:#fff; color:var(--red); }
.icon-action-cancel:hover { border-color:var(--red); background:var(--red); color:#fff; }
.icon-action-disabled { border-color:transparent; background:transparent; color:#aab5b8; cursor:not-allowed; }
.icon-action-disabled:hover { border-color:transparent; background:transparent; color:#aab5b8; }
.icon-action:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.icon-action::after { content:attr(data-tooltip); position:absolute; z-index:20; left:50%; bottom:calc(100% + 8px); transform:translate(-50%,4px); padding:5px 8px; border-radius:5px; background:#172129; color:#fff; font-size:11px; line-height:1.3; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .12s ease,transform .12s ease; }
.icon-action:hover::after,.icon-action:focus-visible::after { opacity:1; transform:translate(-50%,0); }
.prototype-badge { margin:0 12px 20px; padding:6px 9px; border:1px solid #426876; border-radius:999px; color:#b9d6d1; background:#203d4b; font-size:9px; text-align:center; letter-spacing:.08em; text-transform:uppercase; }
.primary-nav { display:grid; gap:5px; }.nav-link { display:flex; align-items:center; gap:12px; padding:11px 13px; border-radius:7px; color:#a9bbc0; }.nav-link:hover,.nav-link.active { background:#274654; color:#fff; }.nav-link.disabled { opacity:.48; cursor:default; }.nav-icon{display:inline-grid;place-items:center;flex:0 0 16px;width:16px;color:#83bcb7;font-size:16px;line-height:1;text-align:center}.nav-link>span:nth-child(2){min-width:0}.nav-count{margin-left:auto;padding:1px 7px;border-radius:10px;background:#42636d;color:#dceceb;font-size:11px;line-height:1.6;white-space:nowrap}
.sidebar-footer { margin-top:auto; flex:0 0 auto; }.user-chip { display:flex; align-items:center; gap:9px; padding:10px 9px 0; border-top:1px solid #34515c; }.user-chip strong,.user-chip small { display:block; }.user-chip strong { color:#eef5f4; font-size:11px; }.user-chip small { color:#8fa8ad; font-size:10px; }.avatar { display:grid; place-items:center; width:29px; height:29px; border-radius:50%; background:#d7eee8; color:#174c48; font-size:10px; font-weight:700; }
.btn-signout { display:flex; align-items:center; justify-content:center; width:100%; min-height:36px; margin-top:10px; padding:0 12px; border:1px solid #42616c; border-radius:6px; background:#203d4b; color:#d6e1e3; font:600 12px/1 inherit; cursor:pointer; transition:background .15s ease,border-color .15s ease,color .15s ease; }
.btn-signout:hover { border-color:#66828b; background:#2a4a58; color:#fff; }
.btn-signout:focus-visible { outline:2px solid #b9d6d1; outline-offset:2px; }
.main-content { min-width:0; flex:1; transition:margin-right 240ms ease; }.topbar { position:sticky; top:0; z-index:5; height:72px; display:flex; align-items:center; justify-content:space-between; padding:0 42px; border-bottom:1px solid var(--line); background:rgba(250,252,251,.95); }.breadcrumb { display:flex; gap:10px; color:#899599; font-size:12px; }.topbar-right { display:flex; align-items:center; gap:12px; }.environment-label { padding:5px 9px; border:1px solid #e8dfc8; border-radius:999px; color:#8c7748; background:#fffbf1; font-size:10px; }
.help-btn { display:flex; align-items:center; gap:5px; height:30px; padding:0 12px; border:1px solid var(--line); border-radius:6px; background:var(--white); color:var(--ink); font:12px/1 inherit; cursor:pointer; }.help-btn:hover { border-color:#85bdb4; color:var(--teal); }.help-btn:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.help-drawer { position:fixed; top:0; right:0; bottom:0; z-index:20; width:360px; display:flex; flex-direction:column; border-left:1px solid var(--line); background:var(--white); box-shadow:-4px 0 24px rgba(28,52,60,.07); overflow:hidden; transition:transform 240ms ease; transform:translateX(100%); }.help-drawer:not([hidden]) { transform:translateX(0); display:flex; }.help-drawer-header { display:flex; align-items:center; justify-content:space-between; flex-shrink:0; padding:18px 20px 16px; border-bottom:1px solid var(--line); }.help-drawer-header strong { font-size:14px; color:#172b36; }.help-close { display:grid; place-items:center; width:30px; height:30px; border:0; border-radius:5px; background:0; color:var(--muted); font-size:16px; cursor:pointer; }.help-close:hover { background:var(--paper); color:var(--ink); }.help-close:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.help-drawer-body { flex:1; padding:20px; overflow-y:auto; font-size:13px; line-height:1.6; }.help-drawer-body h2 { display:none; }.help-drawer-body h3 { margin:20px 0 6px; color:#172b36; font-size:13px; }.help-drawer-body p { margin:0 0 10px; color:#3d5460; }.help-drawer-body ol,.help-drawer-body ul { margin:0 0 10px; padding-left:20px; color:#3d5460; }.help-drawer-body li { margin-bottom:4px; }.help-drawer-body img { max-width:100%; border-radius:5px; border:1px solid var(--line); margin:8px 0; }.help-drawer-body strong { color:#172b36; }.help-drawer-body table { width:100%; border-collapse:collapse; margin:8px 0 12px; }.help-drawer-body th,.help-drawer-body td { padding:6px 8px; border:1px solid var(--line); font-size:11px; text-align:left; }.help-drawer-body th { background:var(--paper); font-weight:600; color:#4a5b62; }.help-loading { color:var(--muted); font-style:italic; }
.help-drawer-footer { flex-shrink:0; padding:12px 20px; border-top:1px solid var(--line); }.help-manual-link { color:var(--teal); font-size:11px; font-weight:600; }
.app-shell:has(.help-drawer:not([hidden])) .main-content { margin-right:360px; }
@media (max-width:1050px) { .help-drawer { width:320px; }.app-shell:has(.help-drawer:not([hidden])) .main-content { margin-right:320px; } }
@media (max-width:700px) { .help-drawer { width:100%; border-left:0; }.app-shell:has(.help-drawer:not([hidden])) .main-content { margin-right:0; } }
.page-wrap { max-width:1480px; margin:auto; padding:43px 42px 60px; }.page-heading { margin-bottom:25px; }.eyebrow { margin:0 0 6px; color:#8d999c; font-size:10px; font-weight:700; letter-spacing:.13em; text-transform:uppercase; }.page-heading h1 { margin:0; color:#172b36; font-size:30px; line-height:1.15; letter-spacing:-.045em; }.muted { color:var(--muted); }.page-heading > .muted { margin:8px 0 0; }
.metric-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:15px; margin-bottom:21px; }.metric-card,.panel { border:1px solid var(--line); border-radius:9px; background:var(--white); box-shadow:var(--shadow); }.metric-card { display:grid; gap:8px; padding:18px 19px 17px; }.metric-label { color:#748188; font-size:11px; }.metric-value { color:#172d3c; font-size:30px; line-height:1; letter-spacing:-.05em; }.metric-note { color:var(--muted); font-size:10px; }
.panel-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:20px 21px 16px; }.panel-header h2,.workflow-panel h2 { margin:0; color:#223640; font-size:15px; }.panel-header .muted { margin:3px 0 0; font-size:11px; }.text-link,.row-action { color:var(--teal); font-size:11px; font-weight:650; }.data-panel,.detail-panel { overflow:hidden; }.table-wrap { overflow-x:auto; }table { width:100%; border-collapse:collapse; }th { padding:11px 20px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); color:#a1abad; font-size:9px; font-weight:600; letter-spacing:.1em; text-align:left; white-space:nowrap; }td { padding:13px 20px; border-bottom:1px solid var(--line); color:#68777d; font-size:11px; white-space:nowrap; }tr:last-child td { border-bottom:0; }td strong { color:#35474e; font-size:11px; }.account-number,.mono { color:var(--teal); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11px; }.row-arrow { color:#9aa6a9; font-size:16px; }
form[action="/email-queue/bulk"] .table-wrap>table{table-layout:fixed}form[action="/email-queue/bulk"] .table-wrap>table th,form[action="/email-queue/bulk"] .table-wrap>table td{padding-left:10px;padding-right:10px}form[action="/email-queue/bulk"] .table-wrap>table th:nth-child(1),form[action="/email-queue/bulk"] .table-wrap>table td:nth-child(1){width:38px}form[action="/email-queue/bulk"] .table-wrap>table th:nth-child(2),form[action="/email-queue/bulk"] .table-wrap>table td:nth-child(2){width:150px}form[action="/email-queue/bulk"] .table-wrap>table th:nth-child(3),form[action="/email-queue/bulk"] .table-wrap>table td:nth-child(3){width:32%}form[action="/email-queue/bulk"] .table-wrap>table th:nth-child(4),form[action="/email-queue/bulk"] .table-wrap>table td:nth-child(4){width:190px}form[action="/email-queue/bulk"] .table-wrap>table th:nth-child(5),form[action="/email-queue/bulk"] .table-wrap>table td:nth-child(5){width:230px;white-space:normal;overflow-wrap:anywhere}form[action="/email-queue/bulk"] .table-wrap>table th:nth-child(6),form[action="/email-queue/bulk"] .table-wrap>table td:nth-child(6){width:112px;white-space:nowrap}form[action="/email-queue/bulk"] .table-wrap>table td.icon-actions{display:table-cell;min-width:0}form[action="/email-queue/bulk"] .table-wrap>table .icon-action{width:32px;height:32px}
form[action="/email-queue/bulk"] .table-wrap>table td:nth-child(2),form[action="/email-queue/bulk"] .table-wrap>table td:nth-child(3),form[action="/email-queue/bulk"] .table-wrap>table td:nth-child(4){white-space:normal;overflow-wrap:anywhere}form[action="/email-queue/bulk"] .table-wrap>table td:nth-child(2) a{white-space:nowrap}
.status { display:inline-flex; align-items:center; gap:5px; font-size:10px; white-space:nowrap; }.status i { display:inline-block; width:6px; height:6px; border-radius:50%; background:currentColor; }.status.green { color:var(--green); }.status.amber { color:var(--amber); }.status.red { color:var(--red); }.status.slate { color:#859196; }
.workflow-panel { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:-6px 0 22px; padding:14px 18px; border:1px solid #d5e7e2; border-radius:8px; background:#eef7f4; }.workflow-panel p { margin:4px 0 0; color:var(--muted); font-size:11px; }.workflow-steps { display:flex; align-items:center; gap:9px; overflow-x:auto; color:var(--teal); font-size:10px; white-space:nowrap; }.workflow-steps span { padding:4px 8px; border-radius:999px; background:#fff; }.workflow-steps b { font-size:14px; }
.form-hint { display:block; min-height:1.3em; margin-top:4px; color:var(--muted); font-size:11px; }
.table-search { width:min(260px,45vw); min-height:34px; padding:0 12px; border:1px solid #dfe7e4; border-radius:6px; outline:0; background:#fff; font:12px inherit; }.table-search:focus { border-color:#85bdb4; box-shadow:0 0 0 3px #d9efeb; }
.regeneration-message { display:block; max-width:270px; color:var(--muted); font-size:10px; white-space:normal; }
.regeneration-message.success { color:var(--green); }
.regeneration-message.error { color:var(--red); }
.modal-body [data-modal-message] { white-space:pre-line; }
.icon-action[aria-busy="true"] { cursor:wait; }
.icon-action[aria-busy="true"] svg { display:none; }
.icon-action[aria-busy="true"]::before { width:16px; height:16px; border:2px solid #d9e5e2; border-top-color:var(--teal); border-radius:50%; content:""; animation:regeneration-spin .7s linear infinite; }
.regeneration-complete { animation:regeneration-highlight 1.8s ease-out; }
.role-create-form{margin-bottom:16px}.permission-table{min-width:700px}
.permission-group{margin-bottom:16px}.permission-table{table-layout:fixed}.permission-table th:first-child{width:auto;white-space:normal}.permission-table .permission-role{width:150px;text-align:center}.permission-table tbody th{color:#35474e;font-size:12px;font-weight:600;letter-spacing:normal;text-transform:none}.permission-table tbody th small{display:block;margin-top:4px;color:var(--muted);font-size:10px;font-weight:400}.permission-cell{text-align:center}.permission-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;width:42px;height:26px;cursor:pointer}.permission-toggle input{position:absolute;width:1px;height:1px;opacity:0}.permission-toggle span{position:relative;width:38px;height:22px;border:1px solid #cad5d2;border-radius:999px;background:#edf1ef;transition:background .15s,border-color .15s}.permission-toggle span:after{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #142b3833;content:"";transition:transform .15s}.permission-toggle input:checked+span{border-color:var(--teal);background:var(--teal)}.permission-toggle input:checked+span:after{transform:translateX(16px)}.permission-toggle input:focus-visible+span{outline:2px solid var(--teal);outline-offset:3px}.permission-toggle input:disabled+span{opacity:.48;cursor:not-allowed}.permission-save-bar{position:sticky;bottom:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:18px -4px 0;padding:14px 18px;border:1px solid var(--line);border-radius:9px;background:#fffffff2;box-shadow:var(--shadow);backdrop-filter:blur(8px)}.permission-save-bar p{margin:0;font-size:11px}
@keyframes regeneration-highlight { 0%,35% { background:#e5f5ee; } 100% { background:transparent; } }
@keyframes regeneration-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .regeneration-complete { animation:none; background:#e5f5ee; } .icon-action[aria-busy="true"]::before { animation:none; border-color:var(--teal); } }
.account-heading { margin-bottom:20px; }.back-link { display:inline-block; margin-bottom:14px; color:var(--teal); font-size:11px; }.title-meta { display:flex; align-items:center; gap:14px; margin-top:9px; color:#7c898d; font-size:11px; }.title-meta strong { color:#3e5962; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-weight:500; }.account-summary { margin-bottom:20px; }.details-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:20px 25px; padding:4px 21px 23px; }.detail-block { min-width:0; }.detail-block.wide { grid-column:span 2; }.detail-label { display:block; margin-bottom:4px; color:#a0abad; font-size:9px; font-weight:700; letter-spacing:.1em; }.detail-block strong { display:block; overflow:hidden; color:#344950; font-size:12px; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }
.tabs { display:flex; gap:25px; margin:0 2px 18px; border-bottom:1px solid var(--line); }.tab { position:relative; padding:0 0 11px; color:#899599; font-size:11px; }.tab.active { color:var(--teal); font-weight:600; }.tab.active:after { position:absolute; right:0; bottom:-1px; left:0; height:2px; background:var(--teal); content:''; }.tab span { display:inline-grid; place-items:center; min-width:18px; height:18px; margin-left:5px; padding:0 4px; border-radius:10px; background:#eef2f2; color:#718084; font-size:9px; }.detail-panel { margin-bottom:20px; }.document-list { border-top:1px solid var(--line); }.document-item { display:flex; align-items:center; justify-content:space-between; gap:9px; padding:13px 21px; border-bottom:1px solid var(--line); }.document-copy strong,.document-copy small { display:block; }.document-copy strong { color:#35474e; font-size:11px; text-transform:capitalize; }.document-copy small { margin-top:3px; color:#879397; font-size:10px; }.empty-state { padding:20px; color:var(--muted); font-size:12px; }
.account-form { padding:6px 21px 21px; }.form-section { margin:0; padding:18px 0; border:0; border-bottom:1px solid var(--line); }.form-section legend { float:none; width:auto; margin-bottom:12px; color:#223640; font-size:15px; font-weight:600; }.form-note { margin:-4px 0 12px; font-size:11px; }.form-actions { display:flex; justify-content:flex-end; gap:10px; padding-top:18px; }[hidden] { display:none !important; }
.page-heading-actions { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; }.heading-actions { display:flex; gap:10px; }
 .phone-country-code { flex:0 0 auto; width:auto; min-width:105px; max-width:145px; }
  .fund-create-actions { display:grid; grid-template-columns:minmax(220px,1fr) auto; align-items:end; gap:10px 16px; padding-top:0; }
  .fund-create-actions > label { grid-column:1; margin:0; color:var(--muted); font-size:11px; }
  .fund-account-autocomplete { position:relative; grid-column:1; }
  .fund-create-actions .heading-actions { grid-column:2; grid-row:1 / span 2; display:flex; gap:10px; }
  .fund-account-options { position:absolute; top:calc(100% + 4px); right:0; left:0; z-index:10; max-height:280px; margin:0; padding:4px; overflow-y:auto; border:1px solid var(--line); border-radius:7px; background:#fff; box-shadow:var(--shadow); list-style:none; }
  .fund-account-options li { display:flex; gap:10px; padding:8px 10px; border-radius:5px; color:var(--muted); cursor:pointer; }
  .fund-account-options li strong { color:var(--teal); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
  .fund-account-options li:hover,.fund-account-options li.active { background:#eef7f4; color:var(--ink); }
  .fund-create-actions .btn.disabled { opacity:.5; pointer-events:none; }
  .transaction-create-actions { display:grid; grid-template-columns:minmax(220px,1fr) auto; align-items:end; gap:10px 16px; padding-top:0; }
  .transaction-create-actions > label { grid-column:1; margin:0; color:var(--muted); font-size:11px; }
  .transaction-create-actions > input { grid-column:1; }
  .transaction-account-autocomplete { position:relative; grid-column:1; }
  .transaction-create-actions > .heading-actions { grid-column:2; grid-row:1 / span 2; }
  .transaction-create-actions .btn.disabled { opacity:.5; pointer-events:none; }
  .transaction-form-panel { padding:22px; }
  .transaction-form-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px 16px; }
  .transaction-field { min-width:0; }
  .transaction-field label { display:block; margin-bottom:4px; }
  .transaction-field-wide { grid-column:span 4; }
  .transaction-form-actions { grid-column:span 4; padding-top:4px; }
  @media (max-width:850px) { .transaction-form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.transaction-field-wide,.transaction-form-actions { grid-column:span 2; } }
  @media (max-width:520px) { .transaction-form-panel { padding:16px; }.transaction-form-grid { grid-template-columns:1fr; gap:10px; }.transaction-field-wide,.transaction-form-actions { grid-column:span 1; } }
  .entry-form-panel { padding:22px; }
  .entry-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px; }
  .entry-field { min-width:0; }.entry-field label { display:block; margin-bottom:4px; }
  .entry-field-wide,.entry-form-actions { grid-column:span 2; }
  .direction-toggle { min-width:0; margin:0; padding:0; border:0; }
  .direction-toggle legend { float:none; width:auto; margin-bottom:4px; color:var(--ink); font-size:14px; }
  .toggle-option { display:inline-flex; min-width:110px; cursor:pointer; }
  .toggle-option input { position:absolute; opacity:0; pointer-events:none; }
  .toggle-option span { display:block; width:100%; padding:8px 14px; border:1px solid var(--line); background:#fff; color:var(--muted); text-align:center; }
  .toggle-option:first-of-type span { border-radius:6px 0 0 6px; }.toggle-option + .toggle-option span { margin-left:-1px; border-radius:0 6px 6px 0; }
  .toggle-option.active span,.toggle-option input:checked + span { border-color:var(--teal); background:#eef7f4; color:var(--teal); font-weight:600; }
  @media (max-width:520px) { .entry-form-panel { padding:16px; }.entry-form-grid { grid-template-columns:1fr; }.entry-field-wide,.entry-form-actions { grid-column:span 1; } }
 .dev-login-options { margin-top:20px; padding-top:16px; border-top:1px solid var(--line); }.dev-login-options p { font-size:11px; }
.upload-panel { display:flex; align-items:flex-end; gap:16px; margin-bottom:20px; padding:20px 21px; }.upload-panel > div { flex:1; }
.import-table td { vertical-align:top; white-space:normal; }.holder-cell { min-width:320px; }.holder-line { margin-bottom:8px; }.holder-line small,.row-message { display:block; color:var(--muted); font-size:10px; }.row-message { margin-top:4px; color:var(--red); max-width:340px; }
.panel-actions { align-items:center; justify-content:space-between; padding:16px 21px; border-top:1px solid var(--line); }
.fund-actions { min-width:128px; white-space:nowrap; }.fund-actions-inner { display:flex; align-items:center; justify-content:center; gap:8px; }.fund-actions form { display:flex; margin:0; }.fund-action-none { display:inline-block; min-width:24px; color:#9aa6a9; text-align:center; }.role-chip { display:inline-block; margin:0 6px 4px 0; padding:3px 8px; border:1px solid var(--line); border-radius:999px; color:#4a5b62; font-size:10px; white-space:nowrap; }.role-check,.status-check { display:flex; align-items:flex-start; gap:10px; padding:10px 0; }.role-check { border-bottom:1px solid var(--line); }.role-check:last-of-type { border-bottom:0; }.role-check .form-check-input,.status-check .form-check-input { flex:0 0 auto; float:none; margin:3px 0 0; }.role-check .form-check-label { min-width:0; }.role-check small { display:block; color:var(--muted); font-size:10px; }
.import-table { table-layout:fixed; }.import-col-select { width:64px; }.import-col-account { width:112px; }.import-col-type { width:136px; }.import-col-holders { width:auto; }.import-col-status { width:190px; }.import-table th:nth-child(-n+3),.import-table td:nth-child(-n+3) { white-space:nowrap; }.import-table .form-select { min-width:0; width:100%; }.import-actions { display:flex; flex-wrap:wrap; gap:10px; }.btn-outline-danger { color:var(--red); border-color:#e3b8b5; }.btn-outline-danger:hover { color:#fff; border-color:var(--red); background:var(--red); }
@media (max-width:1050px) { .sidebar { flex-basis:215px; width:215px; }.topbar,.page-wrap { padding-right:25px; padding-left:25px; }.metric-grid { grid-template-columns:repeat(2,1fr); }.details-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:700px) { .sidebar { display:none; }.topbar { height:60px; padding:0 16px; }.page-wrap { padding:27px 16px 40px; }.page-heading h1 { font-size:24px; }.metric-grid { gap:9px; }.metric-card { padding:14px; }.metric-value { font-size:24px; }.panel-header { padding:16px; }.details-grid { grid-template-columns:1fr 1fr; gap:18px 14px; padding:4px 16px 18px; }.detail-block.wide { grid-column:span 2; }.workflow-panel { align-items:flex-start; flex-direction:column; }.workflow-steps { max-width:100%; }.tabs { gap:18px; overflow-x:auto; }.tab { flex:none; } }
.html-editor-panes { grid-template-columns:minmax(0,var(--html-pane-split,50%)) 8px minmax(0,1fr); }
.html-editor { position:relative; overflow:hidden; }
.html-visual-pane,.html-source-pane { min-height:0; overflow:hidden; }
.template-workspace,.template-code-panel { min-height:0; }
.visual-toolbar input[type="color"] { width:36px; height:32px; padding:2px; border:1px solid var(--line); border-radius:4px; background:#fff; cursor:pointer; }
.visual-toolbar select { max-width:150px; }
.format-status { color:var(--muted); font-size:11px; }
.html-pane-divider { align-self:stretch; cursor:col-resize; touch-action:none; background:var(--line); }
.html-pane-divider:hover,.html-pane-divider:focus-visible { background:var(--teal); outline:2px solid var(--teal); outline-offset:1px; }
.page-setup { margin-top:12px; }
@media (max-width:700px) { .html-editor-panes { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,var(--html-pane-split-row,50%)) 8px minmax(0,1fr); }.html-visual-pane { border-right:0; }.html-pane-divider { cursor:row-resize; } }

/* Shared action and form styles. */
.btn-primary { --bs-btn-bg:var(--teal); --bs-btn-border-color:var(--teal); --bs-btn-hover-bg:#0f655c; --bs-btn-hover-border-color:#0f655c; --bs-btn-active-bg:#0d584f; --bs-btn-active-border-color:#0d584f; --bs-btn-disabled-bg:var(--teal); --bs-btn-disabled-border-color:var(--teal); }
.btn { min-height:36px; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:7px 12px; border-radius:6px; font-size:12px; font-weight:600; line-height:1.2; }
.btn:focus-visible,.text-link:focus-visible,.row-action:focus-visible,.back-link:focus-visible,.page-wrap a:not([class]):focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.btn-outline-secondary { --bs-btn-color:#40545b; --bs-btn-border-color:#cbd6d3; --bs-btn-hover-color:#155f56; --bs-btn-hover-border-color:#85bdb4; --bs-btn-hover-bg:#f1faf8; --bs-btn-active-color:#155f56; --bs-btn-active-border-color:#85bdb4; --bs-btn-active-bg:#e8f4f1; }
.btn-outline-danger { --bs-btn-color:var(--red); --bs-btn-border-color:#e3b8b5; --bs-btn-hover-color:#fff; --bs-btn-hover-border-color:var(--red); --bs-btn-hover-bg:var(--red); }
.text-link,.row-action,.back-link,.page-wrap a:not([class]) { color:var(--teal); text-decoration:none; }
.text-link:hover,.row-action:hover,.back-link:hover,.page-wrap a:not([class]):hover { color:#0f655c; text-decoration:underline; text-underline-offset:3px; }
.back-link { font-weight:600; }
.form-label,.page-wrap label { color:#40545b; font-size:12px; font-weight:600; }
.form-control,.form-select { min-height:36px; border-color:#d5dfdc; border-radius:6px; color:var(--ink); font-size:12px; }
.form-control:focus,.form-select:focus { border-color:#85bdb4; box-shadow:0 0 0 3px #d9efeb; }
.form-control::placeholder { color:#98a4a5; }
.empty-state { margin:0; border-top:1px solid var(--line); background:#fbfdfc; }
.editor-tabs { gap:0; padding:5px; border-bottom:1px solid var(--line); background:#f5f8f6; }
.editor-tabs button { min-height:34px; padding:7px 12px; border:1px solid transparent; border-radius:5px; background:transparent; color:#627278; font-family:inherit; font-size:11px; font-weight:600; line-height:1.2; cursor:pointer; }
.editor-tabs button:hover { background:#fff; color:var(--teal); }
.editor-tabs button.active,[data-editor-tab].active { border-color:#cce2dc; background:#fff; color:var(--teal); box-shadow:0 1px 2px rgba(28,52,60,.06); }
.editor-tabs button:focus-visible,.visual-toolbar button:focus-visible,.visual-toolbar select:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.visual-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:5px; padding:6px; border:1px solid var(--line); border-radius:6px; background:#f7faf9; }
.visual-toolbar button,.visual-toolbar select { min-width:32px; min-height:32px; padding:5px 8px; border:1px solid #d5dfdc; border-radius:5px; background:#fff; color:#40545b; font-family:inherit; font-size:11px; font-weight:600; line-height:1.2; cursor:pointer; }
.visual-toolbar button:hover,.visual-toolbar select:hover { border-color:#85bdb4; color:var(--teal); }
.visual-toolbar label { display:inline-flex; align-items:center; gap:5px; margin:0 2px; font-size:10px; }
.visual-toolbar button:disabled,.visual-toolbar select:disabled { opacity:.5; cursor:not-allowed; }
.form-actions,.import-actions,.heading-actions { align-items:center; }
.form-actions form,.panel-actions form { display:flex; align-items:center; gap:10px; margin:0; }
.upload-panel { align-items:flex-end; }
.bulk-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px 20px; border-bottom:1px solid var(--line); background:#fbfdfc; }
.bulk-bar > label { display:inline-flex; align-items:center; gap:7px; margin:0; color:#40545b; font-size:11px; font-weight:600; }
.bulk-bar [data-selected-count],.bulk-bar [data-bulk-result] { color:var(--muted); font-size:11px; }
.bulk-confirm-acknowledgement { display:flex; align-items:flex-start; gap:9px; margin:12px 0 0; padding:11px; border:1px solid #e8dfc8; border-radius:6px; background:#fffbf1; color:#5e5238; }
.bulk-confirm-acknowledgement input { flex:0 0 auto; margin-top:3px; }
.data-panel > .panel-header:has(form[method="GET"]) { display:flex; align-items:flex-end; gap:14px; flex-wrap:wrap; }
.data-panel > .panel-header > form[method="GET"] { display:flex; align-items:flex-end; gap:10px; flex:1 1 auto; min-width:min(100%,520px); margin:0; }
.data-panel > .panel-header > form[method="GET"] label { align-self:center; margin:0 0 2px; white-space:nowrap; }
.data-panel > .panel-header > form[method="GET"] select { flex:0 1 220px; width:auto; min-width:140px; max-width:240px; min-height:34px; }
.data-panel > .panel-header > form[method="GET"] .btn { flex:0 0 auto; }
.data-panel > .panel-header > form[method="GET"] a { align-self:center; white-space:nowrap; }
.data-panel > .panel-header > .table-search { flex:0 1 260px; width:min(260px,100%); margin-left:auto; }
@media (max-width:700px) {
  .data-panel > .panel-header:has(form[method="GET"]) { align-items:stretch; }
  .data-panel > .panel-header > form[method="GET"] { min-width:0; flex:1 1 100%; gap:8px; flex-wrap:wrap; }
  .data-panel > .panel-header > form[method="GET"] select { flex:1 1 150px; min-width:130px; }
  .data-panel > .panel-header > .table-search { flex:1 1 100%; width:100%; margin-left:0; }
}
@media (max-width:700px) { .upload-panel { align-items:stretch; flex-direction:column; }.upload-panel .btn { align-self:flex-start; }.form-actions,.panel-actions form { flex-wrap:wrap; }.editor-tabs { overflow-x:auto; flex-wrap:nowrap; }.editor-tabs button { flex:none; } }

/* Responsive data tables: wrap content first, then switch to labelled records. */
/* Keep statement diagnostics bounded without squeezing dates and actions. */
#statements-bulk + .table-wrap:not(.responsive-record-cards) > table { width:100%; table-layout:fixed; }
#statements-bulk + .table-wrap > table th:nth-child(2),#statements-bulk + .table-wrap > table td:nth-child(2) { width:15%; }
#statements-bulk + .table-wrap > table th:nth-child(3),#statements-bulk + .table-wrap > table td:nth-child(3) { width:90px; white-space:nowrap; overflow-wrap:normal; }
#statements-bulk + .table-wrap > table th:nth-child(5),#statements-bulk + .table-wrap > table td:nth-child(5) { width:105px; }
#statements-bulk + .table-wrap > table td:nth-child(4),#statements-bulk + .table-wrap > table td:nth-child(6) { white-space:normal; overflow-wrap:anywhere; }
#statements-bulk + .table-wrap > table td small { display:block; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.table-wrap { min-width:0; overflow-x:hidden; }
.table-wrap > table { width:max-content; min-width:680px; max-width:100%; table-layout:auto; }
.table-wrap > table.documents-table { width:max-content; min-width:680px; max-width:100%; table-layout:auto; }
.table-wrap > table.documents-table th:nth-child(n),.table-wrap > table.documents-table td:nth-child(n) { width:auto; }
.table-wrap > table.documents-table th:first-child,.table-wrap > table.documents-table td:first-child { width:40px; }
.table-wrap > table.documents-table th:last-child,.table-wrap > table.documents-table td:last-child { width:180px; }
.table-wrap > table th,.table-wrap > table td { min-width:0; white-space:normal; overflow-wrap:anywhere; }
.table-wrap > table th[data-selection-column],.table-wrap > table td[data-selection-cell] { width:44px !important; min-width:44px; max-width:44px; padding-left:10px; padding-right:10px; }
.table-wrap > table td > a,.table-wrap > table td .mono { overflow-wrap:anywhere; }
.table-wrap > table td.fund-actions { width:176px; }
.fund-actions-inner { display:grid; grid-template-columns:repeat(2,minmax(72px,1fr)); align-items:center; justify-content:stretch; gap:7px; }
.fund-action-slot { display:flex; min-width:0; }
.fund-action-slot > form { width:100%; }
.fund-action-slot .btn { width:100%; }
.fund-action-slot[aria-hidden="true"] { visibility:hidden; }
.fund-actions-inner form { display:flex; min-width:0; margin:0; }
.fund-actions-inner form:empty { display:block; }
.fund-actions-inner .fund-action-none { visibility:hidden; min-width:0; }
.document-row-actions { display:flex; align-items:center; flex-wrap:nowrap; column-gap:14px; row-gap:0; width:max-content; }
.document-row-actions form,.document-row-actions > .icon-action { position:relative; display:flex; align-items:center; justify-content:center; flex:0 0 36px; width:36px; min-width:36px; margin:0; }
.document-row-actions form > .icon-action { flex:0 0 36px; width:36px; min-width:36px; }
.document-row-actions .regeneration-message { position:absolute; top:100%; left:0; width:max-content; max-width:220px; }
.responsive-record-cards > table { display:block; width:100%; min-width:0; }
.responsive-record-cards > table.documents-table { min-width:0; }
.responsive-record-table > table.documents-table { width:max-content; min-width:680px; max-width:100%; table-layout:auto; }
.responsive-record-cards > table > tbody > tr > td { width:auto !important; min-width:0; }
.responsive-record-cards > table > tbody > tr > td[data-selection-cell] { display:flex; align-items:center; justify-content:flex-start; width:44px !important; min-height:44px; padding:8px; }
.responsive-record-cards > table > tbody > tr > td[data-selection-cell]::before { content:none; }
.responsive-record-cards > table > tbody > tr > td.icon-actions { display:grid; }
.responsive-record-cards > table > tbody > tr > td.icon-actions .document-row-actions { display:flex; flex-wrap:nowrap; }
.responsive-record-cards > table > tbody > tr > td.icon-actions .icon-action { width:36px; min-width:36px; }
.responsive-record-cards > table > thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.responsive-record-cards > table > tbody { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:12px; padding:12px; }
.responsive-record-cards > table > tbody > tr { display:grid; align-content:start; border:1px solid var(--line); border-radius:7px; background:var(--white); box-shadow:var(--shadow); }
.responsive-record-cards > table > tbody > tr > td { display:grid; grid-template-columns:minmax(100px,38%) minmax(0,1fr); gap:12px; padding:9px 12px; border-bottom:1px solid var(--line); text-align:left; }
.responsive-record-cards > table > tbody > tr > td::before { content:attr(data-column-label); color:#879397; font-size:9px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.responsive-record-cards > table > tbody > tr > td:first-child:last-child { display:block; }
.responsive-record-cards > table > tbody > tr > td[colspan] { display:block; }
.responsive-record-cards > table > tbody > tr > td[colspan]::before { content:none; }
.responsive-record-cards > table > tbody > tr > td:last-child { border-bottom:0; }
.responsive-record-cards > table > tbody > tr > td.fund-actions { width:auto; }
.responsive-record-cards .fund-actions-inner { grid-template-columns:repeat(2,minmax(72px,112px)); justify-content:start; }
.responsive-record-cards .fund-actions-inner .fund-action-none { display:block; }
.responsive-record-cards .documents-table > tbody > tr > td.icon-actions { display:grid; grid-template-columns:minmax(100px,38%) minmax(0,1fr); }
.responsive-record-cards .document-row-actions { display:flex; flex-wrap:nowrap; }
.responsive-record-cards .import-table > tbody > tr > td { align-items:start; }
.responsive-record-cards .import-table .holder-cell { min-width:0; }
.table-pagination { display:flex; align-items:center; justify-content:flex-end; gap:16px; padding:12px 18px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.table-pagination label { display:flex; align-items:center; gap:7px; margin:0; }
.table-pagination select { min-height:30px; padding:3px 24px 3px 8px; border:1px solid var(--line); border-radius:5px; background:#fff; color:var(--ink); font:inherit; }
.table-pagination-buttons { display:flex; align-items:center; gap:6px; }
.table-pagination button { min-height:30px; padding:4px 9px; border:1px solid var(--line); border-radius:5px; background:#fff; color:var(--ink); font:inherit; cursor:pointer; }
.table-pagination button:disabled { opacity:.45; cursor:not-allowed; }
@media (max-width:520px) { .table-pagination { justify-content:space-between; gap:8px; flex-wrap:wrap; padding:10px 12px; } }
.topbar { background:#fafcfb; }
.import-table .import-col-type { width:160px; }
.import-table .form-select { padding-right:26px; }

.test-mode-panel{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;margin-bottom:14px;border-left:4px solid var(--red)}.test-mode-panel.test-mode-on{border-left-color:var(--amber);background:#fffaf0}.test-mode-panel h2{font-size:15px;margin:0 0 2px}.test-mode-panel p{margin:0}
