:root{font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#203148;background:#ffffff}*{box-sizing:border-box}body{margin:0;background:#ffffff}header{background:#203587;color:#ffffff;padding:12px 0;border-bottom:3px solid #fbbf24}.wrap{width:100%;padding-inline:clamp(12px,2vw,36px)}.header,.top,.actions,.toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.header,.top{justify-content:space-between}.brand{font-size:22px;font-weight:800}.brand span{font-weight:400}main{padding-top:32px!important;padding-bottom:50px!important}h1{font-size:29px;margin:0 0 8px}h2{font-size:19px;margin:0 0 18px}p{color:#617086;line-height:1.55}.panel,.stat{background:white;border:1px solid #dce4ed;border-radius:13px;padding:22px;box-shadow:0 3px 12px #14263c08}.narrow{max-width:510px;margin:45px auto}.toolbar{margin:22px 0}.toolbar label{min-width:180px}.stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin-bottom:20px}.stat small{display:block;color:#617086;margin-bottom:10px}.stat strong{font-size:25px}.columns{display:grid;grid-template-columns:minmax(290px,400px) minmax(0,1fr);gap:18px}label{display:block;font-size:13px;font-weight:650;margin-bottom:13px}input,select,textarea{display:block;width:100%;border:1px solid #c9d4e1;border-radius:8px;padding:10px;margin-top:6px;font:inherit;background:white;color:#203148}input:focus,select:focus{outline:2px solid #7ca7d5}button{border:0;border-radius:8px;padding:11px 15px;background:#0e6477;color:white;font-weight:700;cursor:pointer}button.secondary{background:#eaf1f6;color:#1a4d64}button:disabled{opacity:.5}.twocol{display:grid;grid-template-columns:1fr 1fr;gap:10px}.scroll{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}td,th{padding:11px 8px;border-bottom:1px solid #e5ebf2;text-align:left;white-space:nowrap}th{color:#64748b}.right{text-align:right}.hint{font-size:12px}.linkbtn{background:none;color:#12627c;padding:4px;font-size:12px}.danger{color:#a93636}#toast{position:fixed;bottom:18px;right:18px;background:#17364a;color:white;border-radius:8px;padding:13px;display:none;max-width:340px}@media(max-width:850px){.stats{grid-template-columns:repeat(2,1fr)}.columns{grid-template-columns:minmax(0,1fr)}}@media(max-width:450px){.stats{grid-template-columns:1fr 1fr}.stat strong{font-size:19px}.twocol{grid-template-columns:1fr}}

#accountDialog{width:min(420px,calc(100% - 32px))}
#accountDialog::backdrop{background:#112c4580}
#accountEmail[readonly]{background:#203587}
.category-icon,.business-badge{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:7px;vertical-align:middle;background:#edf3f9}
.business-badge{font-size:10px;font-weight:800}
.shade-0{background:#d9f1ed;color:#075851}
.shade-1{background:#e1eaff;color:#254788}
.shade-2{background:#f4e5fb;color:#66357d}
.shade-3{background:#fdebd4;color:#794716}
.receipt-icon{font-size:13px}

.identity{display:flex;align-items:center;gap:8px}
#profileAvatar:not([hidden]){display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#e1eef5;color:#112c45;font-weight:800}
.client-dialog{width:min(520px,calc(100% - 32px));max-height:85vh}
.client-dialog::backdrop{background:#112c4580}
.client-summary{padding:12px 0;border-bottom:1px solid #dce4ed;overflow-wrap:anywhere}
.client-summary p{margin:6px 0;white-space:pre-wrap}
#inboxEntries{margin-bottom:14px}

.report-choice input{display:inline-block;width:auto;margin:0 5px 0 0}.client-report-actions{margin-top:12px}.client-report-actions a{color:#0e6477}.client-report-table{margin:12px 0}

#profileAvatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}

.storage-admin{margin-top:18px}.storage-plan-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:12px 0 18px}.storage-plan-choices section{border:1px solid #dce4ed;border-radius:8px;padding:12px}.storage-plan-choices h3{margin:0;font-size:16px}

.payid-payment-details{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px 16px;background:#112c45;color:#fff;border-radius:10px;padding:14px}
.payid-payment-details dt{color:#d2dfed}
.payid-payment-details dd{margin:0;color:#ffdd78;font-weight:700;overflow-wrap:anywhere;text-align:right}
.payid-reference-note{background:#fff3ce;color:#694500;border-radius:8px;padding:10px 12px}
.payid-reference{font-family:ui-monospace,monospace;background:#edf5ff;font-weight:700}


#storagePlanDialog{width:min(680px,calc(100% - 24px));padding:clamp(12px,3vw,22px)}
@media(max-width:580px){
 .payid-payment-details .payment-payid-label,.payid-payment-details .payment-payid-value{grid-column:1/-1}
 .payid-payment-details .payment-payid-value{text-align:left;font-size:clamp(11px,3.5vw,16px)}
}

.admin-filter{max-width:320px}.admin-sort{background:none;color:inherit;padding:0;font:inherit;font-weight:700;text-align:left}.admin-sort:hover{text-decoration:underline}

th[aria-sort=ascending] .admin-sort::after{content:' \2191'}th[aria-sort=descending] .admin-sort::after{content:' \2193'}

.shared-workspace{width:min(960px,calc(100% - 24px))}.shared-workspace form[method=dialog]{margin-top:16px}.shared-workspace select#sharedYear{max-width:180px}#emailClientReportField[hidden]{display:none}

#recordFilters input{width:100%;min-width:7rem;margin:0}

.receipt-storage-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;margin:10px 0}
.receipt-storage-row strong{min-width:7.5rem}
.receipt-storage-bar{flex:1 1 8rem;min-width:5rem;max-width:20rem;height:.8rem;border:1px solid #787878;border-radius:99px;background:#fff;overflow:hidden}
.receipt-storage-bar span{display:block;height:100%;width:0;background:#000}

#recordSortHeaders button{background:transparent;color:inherit;padding:0;border:0;text-align:left;font:inherit;cursor:pointer}
#recordSortHeaders button::after{content:"  ↕";opacity:.55}
#recordSortHeaders th[aria-sort="ascending"] button::after{content:"  ↑";opacity:1}
#recordSortHeaders th[aria-sort="descending"] button::after{content:"  ↓";opacity:1}

/* Bookkeeping overview */
.overview-heading{align-items:flex-start;gap:16px 24px}
.overview-heading h1{font-size:clamp(1.8rem,3vw,2.5rem);letter-spacing:-.035em}
.overview-heading p{margin:.4rem 0 0}
.overview-heading .actions{gap:8px}
#app>.toolbar label{margin-bottom:0}
#app>.toolbar{align-items:flex-end}
#app>.toolbar button{min-height:39px}
.stat{padding:clamp(14px,1.6vw,24px);border-top:3px solid #c8d5e2;overflow-wrap:anywhere}
.stat strong{font-variant-numeric:tabular-nums;letter-spacing:-.025em}
.stat-income{border-top-color:#203587}
.stat-expenses{border-top-color:#a95829}
.stat-net{background:#15364d;border-color:#15364d;border-top-color:#6bd5bd;color:#fff}
.stat-net small{color:#cfebe7}
.cash-flow{margin-bottom:20px;padding:clamp(14px,2vw,24px)}
.cash-flow-heading,.cash-flow-legend{display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px}
.cash-flow-heading{justify-content:space-between}
.cash-flow-heading h2{margin:0}
.cash-flow-legend{font-size:.82rem;color:#46586e}
.cash-flow-legend span{display:flex;align-items:center;gap:6px}
.cash-flow-legend i{width:.7rem;height:.7rem;border-radius:3px}
.cash-flow-income{background:#203587}
.cash-flow-expense{background:#a95829}
.cash-flow-months{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:4px;margin-top:14px}
.cash-flow-month{display:grid;gap:6px;background:#203587;color:#35485e;padding:7px 0;font-size:.75rem}
.cash-flow-month:hover,.cash-flow-month[aria-pressed="true"]{background:#deeeeb;color:#103f3a}
.cash-flow-month[aria-pressed="true"]{box-shadow:inset 0 -2px #203587}
.cash-flow-month:focus-visible{outline:2px solid #15364d;outline-offset:2px}
.cash-flow-bars{height:92px;display:flex;align-items:flex-end;justify-content:center;gap:2px;border-bottom:1px solid #bfcdd8}
.cash-flow-bars i{width:24%;max-width:20px;border-radius:3px 3px 0 0}
.cash-flow-details{font-size:.875rem;font-variant-numeric:tabular-nums;margin:12px 0 0}
.cash-flow [hidden]{display:none}
@media(max-width:520px){
 .cash-flow-months{grid-template-columns:repeat(6,minmax(0,1fr));row-gap:8px}
 .cash-flow-bars{height:68px}
 #app>.toolbar label{flex:1 1 140px;min-width:0}
}

/* Bookkeeper identity */
:root{
 --ink:#152b2a;
 --muted:#526763;
 --accent:#203587;
 --accent-hover:#17276a;
 --line:#d8e4df;
 color:var(--ink);
 background:#203587;
}
header{
 background:#203587;
 border-bottom:3px solid #fbbf24;
 padding:13px 0;
}
.brand{display:flex;align-items:center;gap:10px;letter-spacing:-.035em;font-size:clamp(1.2rem,3.5vw,1.48rem)}
.brand img{display:block;background:#f8fafc;padding:4px 10px;border-radius:8px;border:1px solid rgba(255,255,255,.22);box-shadow:0 2px 6px rgba(0,0,0,.22)}
.brand strong{font-weight:800}
.brand span{font-weight:550}
header .identity{font-size:.875rem;overflow-wrap:anywhere;min-width:0}
main.wrap{max-width:none}
.wrap{padding-inline:clamp(10px,1.35vw,24px)}
p{color:var(--muted)}
.panel,.stat{border-color:var(--line);box-shadow:0 4px 18px #17372809}
.stat{border-top-color:#acc3ba}
.stat-income{border-top-color:#203587}
.stat-expenses{border-top-color:#a95829}
.stat-net{background:#203587;border-color:#203587;border-top-color:#fbbf24}
.stat small{color:var(--muted)}
.stat-net small{color:#ceebe2}
button{background:var(--accent)}
button:not(:disabled):hover{background:var(--accent-hover)}
button.secondary{background:#e6efeb;color:#174f42}
button.secondary:not(:disabled):hover{background:#d7e9e0}
button.linkbtn{background:none;color:#116052}
button.linkbtn:not(:disabled):hover{background:#edf5f1}
button.danger{color:#a93636}
input,select,textarea{border-color:#becfc7;color:var(--ink)}
input:focus,select:focus,textarea:focus,button:focus-visible{outline:2px solid #25876d;outline-offset:2px}
.scroll{border-radius:8px}
td,th{border-bottom-color:#d2deed}
tbody tr:hover{background:#f4f8f6}
#recordSortHeaders{background:#eef5f1}
#recordSortHeaders button:not(:disabled):hover{background:transparent;text-decoration:underline}
.cash-flow-month{background:#eff5f2;color:#294d44}
.cash-flow-month:hover:not(:disabled),.cash-flow-month[aria-pressed="true"]{background:#e0ecfc;color:#203587}

.auth-layout:not([hidden]){
 display:grid;
 grid-template-columns:minmax(0,1.14fr) minmax(0,1fr);
 margin:clamp(12px,5vh,56px) 0 0;
 border:1px solid var(--line);
 border-radius:22px;
 background:#ebf1fa;
 box-shadow:0 18px 55px #17372818;
 overflow:hidden;
}
.auth-intro{
 background:linear-gradient(145deg,#203587,#203587);
 color:#f4fcf8;
 padding:clamp(26px,5vw,57px);
 display:flex;
 flex-direction:column;
 justify-content:space-between;
 gap:24px;
 overflow:hidden;
}
.auth-intro h1{font-size:clamp(2rem,4.2vw,3.6rem);line-height:1.04;letter-spacing:-.05em;margin:0}
.auth-intro p{color:#c8e7dc;font-size:1rem;max-width:37ch;margin:18px 0 0}
.auth-card{padding:clamp(24px,4vw,44px);border:0;border-radius:0;box-shadow:none;align-self:center;justify-self:center;width:100%;max-width:570px;min-width:0;background:transparent}
.auth-card h2{font-size:clamp(1.5rem,2.8vw,2rem);letter-spacing:-.035em;margin-bottom:8px}
.auth-card form{margin-top:22px}
.auth-card input{padding:12px}
.auth-card .hint{margin:20px 0 0}
.ledger-art{
 max-width:330px;
 width:100%;
 padding:18px 20px;
 border:1px solid #a7e6cc48;
 border-radius:15px;
 background:#def9ed0d;
}
.ledger-chart{
 display:flex;
 gap:8%;
 align-items:end;
 height:94px;
 border-bottom:1px solid #b0e5cf73;
 padding-inline:7%;
}
.ledger-chart i{flex:1;background:#a1e8c2;border-radius:5px 5px 0 0;height:32%}
.ledger-chart i:nth-child(2){height:54%;background:#65bc9b}
.ledger-chart i:nth-child(3){height:43%}
.ledger-chart i:nth-child(4){height:71%;background:#65bc9b}
.ledger-chart i:nth-child(5){height:62%}
.ledger-chart i:nth-child(6){height:88%;background:#fbbf24}
.ledger-lines{display:grid;gap:7px;padding:13px 0 0}
.ledger-lines i{width:65%;height:4px;background:#a9e7cc4f;border-radius:4px}
.ledger-lines i:nth-child(2){width:48%}
.ledger-lines i:nth-child(3){width:57%}

.overview-heading{
 background:#fff;
 border:1px solid var(--line);
 border-radius:16px;
 padding:clamp(16px,2.4vw,30px);
 box-shadow:0 5px 22px #1737280b;
}
.overview-heading .actions{align-self:center}
#app>.toolbar{gap:10px 12px}
.columns>.panel{min-width:0}
@media(min-width:851px){
 .columns{grid-template-columns:minmax(290px,clamp(320px,29vw,520px)) minmax(0,1fr)}
}
@media(max-width:700px){
 .auth-layout:not([hidden]){grid-template-columns:1fr;margin-top:0;border-radius:16px}
 .ledger-art{display:none}
 .overview-heading .actions{align-self:flex-start}
}

/* Give the two panels in each workspace grid distinct backgrounds. */
.columns>.panel:first-child{
 background:#e4f4ec;
 border-color:#c9e2d5;
}
.columns>.panel:nth-child(2){
 background:#ebf1fa;
 border-color:#d2deed;
}
.financial-records-panel #recordSortHeaders{background:#dbe7f6}
.financial-records-panel tbody tr:hover{background:#e2ebf8}

/* Overview panels use separate tints and accent borders. */
#app>.entity-management-panel{
 background:#f0ebfa;
 border-color:#d8caee;
 border-inline-start:4px solid #8063ad;
}
#app>#receiptStorage{
 background:#e1f1fb;
 border-color:#c6e0ef;
 border-inline-start:4px solid #447fa5;
}
#app>.reading-balance-panel{
 background:#fcf1da;
 border-color:#ecdbad;
 border-inline-start:4px solid #ad7b22;
}
/* Option 1: Compact two-column top summary strip on wide screens. */
@media (min-width:900px){
 #app:not([hidden]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;}
 #app:not([hidden])>*{grid-column:1 / -1;}
 #app:not([hidden])>#receiptStorage{grid-column:1;margin-bottom:16px!important;}
 #app:not([hidden])>.reading-balance-panel{grid-column:2;margin-bottom:16px!important;display:flex;flex-direction:column;justify-content:center;}
}

/* Give the overview and key financial labels a stronger visual hierarchy. */
.overview-heading{
 background:linear-gradient(110deg,#e4f3ec 0%,#fff 72%);
 border-color:#bcd9ce;
 border-inline-start:5px solid #25876d;
}
.overview-heading h1{
 font-size:clamp(2rem,3.3vw,2.9rem);
 line-height:1.1;
}
#app>.toolbar label{
 font-size:clamp(.94rem,1.05vw,1.05rem);
}
#app>.toolbar select{font-size:.9rem}
#app>.stats .stat small{
 font-size:clamp(.9rem,1vw,1.05rem);
 font-weight:650;
 line-height:1.3;
}

/* Option 2: Balanced bottom workspace giving Financial-year records more horizontal room. */
@media (min-width:1024px){
 .columns{grid-template-columns:minmax(280px,clamp(300px,25vw,410px)) minmax(0,1fr);gap:16px;}
}
.financial-records-panel .scroll{border-radius:10px;border:1px solid #d2deed;}
.financial-records-panel th,.financial-records-panel td{padding:9px 8px;}
.financial-records-panel #recordFilters input{min-width:5.5rem;padding:6px 8px;font-size:12px;}

/* Option 3: Consistent header/toolbar alignment and tighter section rhythm. */
#app>.toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 14px;margin:16px 0;}
#app>.toolbar label{margin-bottom:0;min-width:170px;flex:0 1 210px;}
#app>.toolbar button{min-height:40px;align-self:flex-end;}
#app>.entity-management-panel{margin:12px 0!important;}
#app>.stats{gap:12px;margin-bottom:16px;}
#app>.stats .stat{padding:16px 18px;}


.overview-heading{padding:16px 20px;border:1px solid #dce4ed;border-left:5px solid #203587;border-radius:13px;background:#ffffff;box-shadow:0 3px 12px #14263c08}
.overview-heading .actions button.secondary{background:#f1f5f9;color:#203587;border:1px solid #cbd5e1}
.overview-heading .actions button.secondary:hover{background:#e2e8f0;border-color:#203587}

.cash-flow-month[aria-pressed="true"]{background:#203587;color:#ffffff;box-shadow:inset 0 -2px #fbbf24}
.cash-flow-month:hover:not(:disabled):not([aria-pressed="true"]){background:#e0ecfc;color:#203587}
.financial-records-panel .scroll{border-color:#d2deed}

.transaction-entry-panel{border-top:4px solid #203587}
.transaction-entry-panel button[type="submit"]{background:#203587;color:#ffffff;border-bottom:2px solid #fbbf24}
.transaction-entry-panel button[type="submit"]:hover:not(:disabled){background:#2a44a6}
fieldset.receipt-fields,#receiptDropZone{border:1.5px dashed #94a3b8;border-radius:10px;padding:14px 16px;margin:14px 0 16px;background:#f8fafc;transition:border-color .15s ease,background-color .15s ease}
fieldset.receipt-fields legend,#receiptDropZone legend{font-weight:700;color:#203587;padding:0 6px}
fieldset.receipt-fields:focus-within,#receiptDropZone:focus-within,.receipt-dragover{border-color:#203587;background:#eff6ff;box-shadow:inset 0 0 0 1px #fbbf24}

.overview-heading .actions button.highlight-add-txn{background:#203587;color:#ffffff;border:1px solid #203587;border-bottom:3px solid #fbbf24;font-weight:700}.overview-heading .actions button.highlight-add-txn:hover{background:#2a44a6;border-color:#203587;border-bottom-color:#fbbf24}

.identity .account-menu-trigger{background:transparent;border:0;color:inherit;font:inherit;font-weight:700;padding:4px 8px;border-radius:8px;cursor:pointer;display:inline-flex;align-items:center;gap:4px;}
.identity .account-menu-trigger:hover{background:rgba(255,255,255,0.12);}
.account-dropdown{position:absolute;top:calc(100% + 8px);right:0;min-width:210px;display:flex;flex-direction:column;gap:4px;padding:8px;border:1px solid #203587;border-radius:10px;background:#ffffff;color:#0f172a;box-shadow:0 12px 28px rgba(32,53,135,0.22);z-index:80;}
.account-dropdown[hidden]{display:none;}
.account-dropdown button{width:100%;text-align:left;background:transparent;color:#203587;border:0;border-radius:7px;padding:8px 11px;font-size:13.5px;font-weight:600;cursor:pointer;}
.account-dropdown button:hover{background:#f1f5f9;}
.avatar-preview-row{display:flex;align-items:center;gap:14px;margin-bottom:12px;}

#profileAvatar,
.avatar-trigger,
.avatar-preview-box {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  padding: 0 !important;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  line-height: 1;
}
.avatar-preview-box {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
}
#profileAvatar img,
.avatar-trigger img,
.avatar-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Full-width Financial-year records & modal dialogs */
#app .columns,
#app .columns:has(> .financial-records-panel) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 18px !important;
  width: 100% !important;
}
.financial-records-panel {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
}
#txnModalDialog {
  width: min(560px, calc(100vw - 32px));
  max-height: 88vh;
  overflow: auto;
}
#txnModalDialog::backdrop,
#extractedReceiptDialog::backdrop,
#creditsExhaustedDialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
}
/* Highlight Drop Receipt button when a file is dragged over it */
#topDropReceiptBtn.mmm-drop-ready,
#topDropReceiptBtn.dragover {
  background: #203587 !important;
  color: #fbbf24 !important;
  border: 2px dashed #fbbf24 !important;
  outline: 3px solid rgba(251, 191, 36, 0.45);
  transform: scale(1.03);
}
/* Hide [hidden] elements and file picker inputs that break display:block */
[hidden] { display: none !important; }
input[type="file"],
#receipt_file,
#receipt_camera_file { display: none !important; }
#shareSummary, #menuShareSummaryBtn { display: none !important; }


/* =====================================================================
   Refresh (Nov 2026): brand blue #203587, brighter cards, friendlier motion
   ===================================================================== */
:root{
 --brand:#203587;--brand-hover:#17276a;--brand-bright:#2a44a6;
 --brand-soft:#eef1fd;--brand-line:#d5ddf5;
 --gold:#fbbf24;
 --good:#0f8f6b;--good-soft:#dff5ec;--warn:#c2571a;--warn-soft:#fdeadb;
 --page:#f2f5fc;--ink:#18233f;--muted:#55648b;--line:#d5ddf5;
 --accent:#203587;--accent-hover:#17276a;
 --radius:16px;--ease:cubic-bezier(.2,.7,.2,1);
 --shadow-sm:0 1px 2px rgba(32,53,135,.06),0 6px 18px rgba(32,53,135,.07);
 --shadow-md:0 3px 6px rgba(32,53,135,.08),0 16px 36px rgba(32,53,135,.14);
 font-family:Inter,"Segoe UI Variable","Segoe UI",system-ui,-apple-system,Roboto,sans-serif;
 color:var(--ink);background:var(--page);
 scroll-behavior:smooth;
}
body{
 min-height:100vh;color:var(--ink);
 background:
  radial-gradient(900px 420px at 92% -8%,#dde5ff 0,transparent 62%),
  radial-gradient(760px 360px at -8% 2%,#fff1cc 0,transparent 58%),
  var(--page);
 background-attachment:fixed;
}
::selection{background:var(--gold);color:var(--brand-hover)}
h1,h2{color:var(--brand-hover);letter-spacing:-.02em}
p,.hint{color:var(--muted)}
a{color:var(--brand)}

/* ---- Header: solid brand blue, white text ---- */
header{
 position:sticky;top:0;z-index:60;
 background:#203587;color:#ffffff;
 border-bottom:3px solid var(--gold);
 box-shadow:0 8px 24px rgba(32,53,135,.28);
}
header,header .brand,header .identity,header .identity *:not(button.secondary):not(.account-dropdown *){color:#ffffff}
.account-dropdown,.account-dropdown button{color:#203587}
#profileAvatar:not([hidden]){background:#ffffff;color:#203587;box-shadow:0 0 0 2px var(--gold)}
.brand img{border-radius:10px;transition:transform .25s var(--ease)}
.brand:hover img{transform:rotate(-1.2deg) scale(1.03)}

/* ---- Anything sitting on the brand blue gets white text ---- */
#accountEmail[readonly]{
 background:#203587;border-color:#203587;
 color:#ffffff;-webkit-text-fill-color:#ffffff;opacity:1;
}
.cash-flow-month[aria-pressed="true"],.cash-flow-month[aria-pressed="true"] *{color:#ffffff}
#topDropReceiptBtn.mmm-drop-ready,#topDropReceiptBtn.dragover{color:#ffffff!important}

/* ---- Cards ---- */
.panel,.stat{
 border:1px solid var(--brand-line);border-radius:var(--radius);
 box-shadow:var(--shadow-sm);
}
.columns>.panel:first-child{background:linear-gradient(180deg,#f3f6ff 0,#ffffff 160px);border-color:var(--brand-line)}
.columns>.panel:nth-child(2),.financial-records-panel{background:#ffffff;border-color:var(--brand-line)}
.transaction-entry-panel{border-top:4px solid #203587}
.overview-heading{
 background:linear-gradient(110deg,#e9eeff 0%,#ffffff 72%);
 border:1px solid var(--brand-line);border-left:6px solid #203587;border-radius:20px;
}
.overview-heading h1{color:#203587}
#app>.entity-management-panel{background:linear-gradient(100deg,#f3eeff,#ffffff 65%);border-color:#ddd2f3;border-inline-start:5px solid #7c5cd6}
#app>#receiptStorage{background:linear-gradient(100deg,#e6f3fd,#ffffff 65%);border-color:#cfe4f3;border-inline-start:5px solid #2f8ccf}
#app>.reading-balance-panel{background:linear-gradient(100deg,#fff4d9,#ffffff 65%);border-color:#f1e0b1;border-inline-start:5px solid #e0a21f}

/* ---- Summary tiles ---- */
.stat{position:relative;overflow:hidden;transition:transform .25s var(--ease),box-shadow .25s var(--ease)}
.stat:hover{transform:translateY(-3px);box-shadow:var(--shadow-md)}
.stat strong{font-size:clamp(1.35rem,2vw,1.95rem);color:var(--ink)}
.stat::before{
 content:"#";position:absolute;top:14px;right:14px;width:32px;height:32px;border-radius:50%;
 display:grid;place-items:center;font-size:15px;font-weight:800;
 background:var(--brand-soft);color:#203587;
}
.stat-income::before{content:"\2197";background:var(--good-soft);color:var(--good)}
.stat-expenses::before{content:"\2198";background:var(--warn-soft);color:var(--warn)}
.stats .stat:nth-child(3)::before{content:"%"}
.stat-net{
 background-color:#203587;border-color:#203587;border-top-color:var(--gold);
 background-image:radial-gradient(circle at 100% 0,rgba(255,255,255,.16),transparent 55%);
}
.stat-net::before{content:"\03A3";background:rgba(255,255,255,.18);color:var(--gold)}

/* ---- Buttons ---- */
button{
 border-radius:12px;padding:10px 18px;font-weight:650;letter-spacing:.01em;
 background:var(--accent);color:#ffffff;
 box-shadow:0 1px 2px rgba(32,53,135,.25);
 transition:transform .15s var(--ease),box-shadow .2s var(--ease),background-color .2s,border-color .2s;
}
button:not(:disabled):hover{background:var(--accent-hover);transform:translateY(-1px);box-shadow:0 8px 18px rgba(32,53,135,.28)}
button:not(:disabled):active{transform:translateY(0) scale(.98);box-shadow:0 1px 2px rgba(32,53,135,.25)}
button.secondary{background:var(--brand-soft);color:#203587;border:1px solid var(--brand-line);box-shadow:none}
button.secondary:not(:disabled):hover{background:#dfe6fb;color:var(--brand-hover);box-shadow:0 6px 14px rgba(32,53,135,.12)}
button.linkbtn,.admin-sort,#recordSortHeaders button,.account-dropdown button,.cash-flow-month,.identity .account-menu-trigger{
 box-shadow:none;border-radius:8px;
}
button.linkbtn{background:transparent;color:#203587;padding:4px 8px;font-weight:650}
button.linkbtn:not(:disabled):hover{background:var(--brand-soft);transform:none;box-shadow:none}
button.linkbtn.danger,button.danger{color:#b4332e}
button.linkbtn.danger:not(:disabled):hover{background:#fdeceb}
button:focus-visible{outline:3px solid #5b78e6;outline-offset:2px}
button:disabled{opacity:.45;cursor:not-allowed}
.transaction-entry-panel button[type="submit"]{border-radius:12px;border-bottom:3px solid var(--gold)}

/* ---- Form fields ---- */
input,select,textarea{
 border:1.5px solid #cdd7ee;border-radius:12px;padding:11px 12px;background:#fbfcff;color:var(--ink);
 transition:border-color .15s,box-shadow .15s,background-color .15s;
}
input:hover,select:hover,textarea:hover{border-color:#a9b8e4}
input:focus,select:focus,textarea:focus{
 outline:none;border-color:#203587;background:#ffffff;box-shadow:0 0 0 4px rgba(32,53,135,.15);
}
label{color:#2a3a68}
fieldset.receipt-fields,#receiptDropZone{border:2px dashed #9fb0e6;border-radius:14px;background:#f6f8ff}
fieldset.receipt-fields:focus-within,#receiptDropZone:focus-within,.receipt-dragover{
 border-color:#203587;background:#eef2ff;box-shadow:0 0 0 4px rgba(251,191,36,.28);
}

/* ---- Tables ---- */
th{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:#4d5d8a;font-weight:750}
td,th{border-bottom:1px solid #e3e9f8}
.financial-records-panel #recordSortHeaders,#recordSortHeaders{background:var(--brand-soft)}
.financial-records-panel .scroll,.scroll{border-radius:14px;border:1px solid var(--brand-line);scrollbar-width:thin;scrollbar-color:#9fb0e6 transparent}
tbody tr{transition:background-color .15s}
tbody tr:hover,.financial-records-panel tbody tr:hover{background:#f0f3ff}
.pill{display:inline-block;padding:2px 11px;border-radius:999px;font-size:.72rem;font-weight:750;text-transform:capitalize;letter-spacing:.02em}
.pill-income{background:var(--good-soft);color:#0a6a50}
.pill-expense{background:var(--warn-soft);color:#9a4310}
.receipt-storage-bar{border-color:#b9c5ea;background:#e9edfb}
.receipt-storage-bar span{background:linear-gradient(90deg,#203587,#4a67d6);border-radius:99px;transition:width .6s var(--ease)}

/* ---- Cash-flow chart ---- */
.cash-flow-income{background:#203587}
.cash-flow-month{background:#f1f4ff;color:#26397f;border-radius:10px;transition:background-color .15s,transform .15s var(--ease)}
.cash-flow-month:hover:not(:disabled):not([aria-pressed="true"]){background:#dfe6fb;color:#203587;transform:translateY(-2px)}
.cash-flow-month[aria-pressed="true"]{background:#203587;box-shadow:inset 0 -3px var(--gold)}
.cash-flow-bars i{border-radius:4px 4px 0 0}

/* ---- Dialogs, menus and toast ---- */
dialog{border:0;border-radius:22px;box-shadow:0 30px 80px rgba(23,39,106,.38);color:var(--ink)}
dialog[open]{animation:mmm-pop .3s var(--ease)}
dialog::backdrop,#accountDialog::backdrop,.client-dialog::backdrop,#txnModalDialog::backdrop,#extractedReceiptDialog::backdrop,#creditsExhaustedDialog::backdrop{
 background:rgba(17,26,70,.55);backdrop-filter:blur(3px);
}
.account-dropdown{border:1px solid var(--brand-line);border-radius:14px;box-shadow:var(--shadow-md);animation:mmm-pop .2s var(--ease)}
.account-dropdown button:hover{background:var(--brand-soft)}
#toast{
 background:#203587;color:#ffffff;border-radius:14px;border-left:5px solid var(--gold);
 box-shadow:var(--shadow-md);animation:mmm-toast .35s var(--ease);
}

/* ---- Sign-in screen ---- */
.auth-layout:not([hidden]){background:#ffffff;border-color:var(--brand-line);border-radius:26px;box-shadow:0 24px 70px rgba(32,53,135,.2)}
.auth-intro{
 background-color:#203587;color:#ffffff;
 background-image:radial-gradient(circle at 92% 6%,rgba(251,191,36,.30),transparent 36%),radial-gradient(circle at 0 100%,rgba(255,255,255,.14),transparent 46%);
}
.auth-intro h1,.auth-intro p{color:#ffffff}
.auth-intro h1::after{content:"";display:block;width:68px;height:5px;border-radius:4px;background:var(--gold);margin-top:20px}
.ledger-art{border-color:rgba(255,255,255,.28);background:rgba(255,255,255,.08);backdrop-filter:blur(2px)}
.ledger-chart{border-bottom-color:rgba(255,255,255,.4)}
.ledger-chart i{background:#ffffff;transform-origin:bottom;animation:mmm-grow .9s var(--ease) both}
.ledger-chart i:nth-child(2n){background:#9db0f2}
.ledger-chart i:nth-child(6){background:var(--gold)}
.ledger-chart i:nth-child(2){animation-delay:.08s}.ledger-chart i:nth-child(3){animation-delay:.16s}
.ledger-chart i:nth-child(4){animation-delay:.24s}.ledger-chart i:nth-child(5){animation-delay:.32s}.ledger-chart i:nth-child(6){animation-delay:.4s}
.ledger-lines i{background:rgba(255,255,255,.35)}

/* ---- Page entrance ---- */
#app:not([hidden])>*{animation:mmm-rise .5s var(--ease) both}
#app:not([hidden])>*:nth-child(2){animation-delay:.04s}
#app:not([hidden])>*:nth-child(3){animation-delay:.08s}
#app:not([hidden])>*:nth-child(4){animation-delay:.12s}
#app:not([hidden])>*:nth-child(5){animation-delay:.16s}
#app:not([hidden])>*:nth-child(n+6){animation-delay:.2s}
.auth-layout:not([hidden]){animation:mmm-rise .55s var(--ease) both}

@keyframes mmm-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes mmm-pop{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
@keyframes mmm-toast{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes mmm-grow{from{transform:scaleY(.04)}to{transform:scaleY(1)}}

@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* Text over the brand blue is always white (placed last so it wins over tile defaults) */
.stat.stat-net,.stat.stat-net strong,.stat.stat-net small,#app>.stats .stat.stat-net small{color:#ffffff}
.cash-flow-month[aria-pressed="true"] .cash-flow-income{background:#ffffff}
.cash-flow-month[aria-pressed="true"] .cash-flow-expense{background:var(--gold)}
.cash-flow-month[aria-pressed="true"] .cash-flow-bars{border-bottom-color:rgba(255,255,255,.5)}

/* Entity type badge, shown next to the Legal entity selector */
.entity-type-badge{display:inline-block;align-self:flex-end;margin-bottom:14px;padding:3px 12px;border-radius:999px;font-size:.74rem;font-weight:750;letter-spacing:.02em;background:#e8edfb;color:#203587}
.entity-type-badge[data-type="personal"]{background:#e3f6ee;color:#0a6a50}
.entity-type-badge[hidden]{display:none}
#entityBusinessFields[hidden]{display:none}

/* ---- Monthly cash flow: green income bars everywhere; the highlighted (current) month uses a light amber tile so both bars stay easy to see ---- */
.cash-flow-income{background:#16a34a}
.cash-flow-expense{background:#a95829}
.cash-flow-month[aria-pressed="true"]{background:#fff4cc;color:#203587;font-weight:700;box-shadow:inset 0 0 0 2px #fbbf24,inset 0 -3px #f59e0b}
.cash-flow-month[aria-pressed="true"],.cash-flow-month[aria-pressed="true"] *{color:#203587}
.cash-flow-month[aria-pressed="true"] .cash-flow-income{background:#16a34a}
.cash-flow-month[aria-pressed="true"] .cash-flow-expense{background:#a95829}
.cash-flow-month[aria-pressed="true"] .cash-flow-bars{border-bottom-color:#d4a72c}

/* ---- "Add Manually" button: solid gold so it stands apart from the navy Take Photo and grey Upload/Drop buttons ---- */
.overview-heading .actions button.manual-entry-btn{background:#fbbf24;color:#17276a;border:1px solid #e0a50c;font-weight:700}
.overview-heading .actions button.manual-entry-btn:not(:disabled):hover{background:#f59e0b;border-color:#d97706;color:#17276a}
.overview-heading .actions button.manual-entry-btn:focus-visible{outline:2px solid #203587;outline-offset:2px}

/* =====================================================================
   Sign-in page: explains who the app is for, how receipts work, and pricing
   ===================================================================== */
.auth-layout:not([hidden]){grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);align-items:stretch}
.auth-layout .auth-intro{justify-content:center;gap:24px}
.auth-hero-mark{position:relative;isolation:isolate;margin:1rem 0 0;width:clamp(9rem,calc(8.5rem + 3vw),22rem);max-width:100%}
.auth-hero-mark::before{content:"";position:absolute;z-index:-1;inset:-12% -9%;background:radial-gradient(ellipse at 52% 52%,#83adff50,transparent 69%);pointer-events:none}
.auth-hero-mark img{display:block;width:100%;max-width:100%;height:auto;aspect-ratio:73 / 43;filter:drop-shadow(0 10px 16px #0b184a70)}
@media(min-width:1120px){
 .auth-hero-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,auto);align-items:center;gap:clamp(1rem,2vw,2rem)}
 .auth-hero-summary .auth-hero-mark{margin:0}
}
.auth-trust{border:1px solid #c9ded5;background:#f3faf7;border-radius:14px;padding:16px 20px;color:#173e33}
.auth-trust h2{font-size:1.05rem;margin:0 0 6px}
.auth-trust p{margin:0;line-height:1.5}
.registration-upload{min-width:0;margin:12px 0;padding:12px 14px;border:1px dashed #9aa9d0;border-radius:12px;background:#f7f9fe;color:#152750}
.registration-upload legend{padding:0 5px;font-weight:700}
.registration-upload p{margin:0 0 10px}
.registration-upload.is-dragging{border-color:#a46600;background:#fff5df}
.registration-upload .registration-file-info{font-weight:700;overflow-wrap:anywhere}
.registration-error{color:#a62222;margin:0 0 10px}
.auth-kicker{display:inline-block;align-self:flex-start;margin:0 0 16px!important;padding:6px 14px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.28);font-size:.82rem!important;font-weight:700;letter-spacing:.04em;color:#ffffff;max-width:none!important}
.auth-intro h1{font-size:clamp(1.9rem,3.5vw,3rem);line-height:1.08}
.auth-intro .auth-lead{max-width:50ch;font-size:1.05rem;line-height:1.55;margin-top:16px}
.auth-chips{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin:20px 0 0;padding:0}
.auth-chips li{padding:7px 14px;border-radius:999px;background:#ffffff;color:#203587;font-size:.85rem;font-weight:700;box-shadow:0 2px 8px rgba(0,0,0,.14)}
.auth-chips li::before{content:"\2713";margin-right:7px;color:#0f8f6b}

.receipt-demo{display:flex;align-items:center;gap:14px;max-width:470px}
.rd-receipt{width:128px;flex:none;background:#ffffff;color:#203587;border-radius:6px 6px 2px 2px;padding:12px 12px 14px;transform:rotate(-3deg);box-shadow:0 10px 24px rgba(0,0,0,.25);
 -webkit-mask:radial-gradient(circle 5px at 5px 100%,#0000 98%,#000) bottom/10px 100% repeat-x;mask:radial-gradient(circle 5px at 5px 100%,#0000 98%,#000) bottom/10px 100% repeat-x}
.rd-receipt b{display:block;font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;margin-bottom:9px}
.rd-receipt i{display:block;height:5px;border-radius:3px;background:#d5ddf5;margin-bottom:7px}
.rd-receipt i:nth-of-type(2){width:70%}.rd-receipt i:nth-of-type(3){width:85%}
.rd-receipt em{display:block;margin-top:10px;font-size:.78rem;font-weight:800;font-style:normal;color:#17276a}
.rd-arrow{font-size:1.9rem;font-weight:800;color:#fbbf24;animation:mmm-nudge 1.6s ease-in-out infinite}
.rd-entry{flex:1;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.3);border-radius:14px;padding:12px 14px;display:grid;gap:2px;backdrop-filter:blur(2px)}
.rd-entry span{font-size:.68rem;letter-spacing:.06em;text-transform:uppercase;color:#ffffff;opacity:.8}
.rd-entry strong{font-size:.92rem;color:#ffffff;margin-bottom:6px}
@keyframes mmm-nudge{0%,100%{transform:translateX(0)}50%{transform:translateX(6px)}}

.auth-card{align-self:center}
.auth-card h2{font-size:clamp(1.6rem,2.6vw,2.1rem)}
.auth-card .auth-sub{margin:0}
.auth-card .auth-new{margin:18px 0 0;font-size:.9rem;color:var(--muted)}

.auth-extras{grid-column:1/-1;background:#ffffff;border-top:1px solid var(--brand-line);padding:clamp(22px,4vw,44px);display:grid;gap:clamp(26px,4vw,40px)}
.ae-title{margin:0 0 16px;font-size:clamp(1.2rem,2.2vw,1.55rem);letter-spacing:-.02em;color:#17276a}
.who-grid,.how-grid{display:grid;gap:14px}
.who-grid{grid-template-columns:repeat(auto-fit,minmax(215px,1fr))}
.how-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
.who-grid article,.how-grid article{border:1px solid var(--brand-line);border-radius:16px;padding:18px;background:#fbfcff;transition:transform .2s var(--ease),box-shadow .2s var(--ease),border-color .2s}
.who-grid article:hover,.how-grid article:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:#9fb0e6}
.who-grid h3,.how-grid h3{margin:12px 0 6px;font-size:1.02rem;color:#17276a}
.who-grid p,.how-grid p{margin:0;font-size:.93rem;line-height:1.5;color:var(--muted)}
.who-icon{display:inline-grid;place-items:center;width:46px;height:46px;border-radius:14px;background:#203587;color:#ffffff}
.how-num{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#fbbf24;color:#17276a;font-weight:800}
.price-strip{background:linear-gradient(100deg,#fff4d9,#ffffff 70%);border:1px solid #f1e0b1;border-left:6px solid #fbbf24;border-radius:16px;padding:18px 22px}
.price-strip .ae-title{margin-bottom:6px}
.price-strip p{margin:0;font-size:.98rem;color:#3d4a70}

@media(max-width:850px){
 .auth-layout:not([hidden]){grid-template-columns:1fr}
 .auth-layout .auth-intro{order:1}.auth-layout .auth-card{order:2;max-width:none}.auth-layout .auth-extras{order:3}
 .receipt-demo{display:none}
}
@media(max-width:700px){
 .auth-layout .auth-intro{padding:24px 20px}
 .auth-chips li{font-size:.8rem;padding:6px 11px}
}
.auth-intro .auth-foot{margin:10px 0 0;font-size:.8rem;line-height:1.4;max-width:50ch;color:#ffffff;opacity:.85}
.auth-intro .auth-lead strong{color:#fbbf24}
.signup-check{margin:6px 0 12px;min-height:0}
.danger-zone{margin-top:22px;padding-top:16px;border-top:1px solid #f0cccc}.danger-zone h3{margin:0 0 8px;color:#b4332e;font-size:16px}button.danger-solid{background:#b4332e;color:#fff}label.check{display:flex;gap:8px;align-items:flex-start;font-weight:600}label.check input{width:auto;margin-top:3px}#deleteAccountStatus{color:#b4332e;font-weight:600}
.admin-collapsible{margin-top:18px;padding:0}
.admin-collapsible>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:16px 22px;border-radius:13px}
.admin-collapsible>summary::-webkit-details-marker{display:none}
.admin-collapsible>summary::before{content:"\25B8";font-size:16px;color:#1a4d64;transition:transform .15s}
.admin-collapsible[open]>summary::before{transform:rotate(90deg)}
.admin-collapsible>summary:hover{background:#f4f8fb}
.admin-collapsible>summary:focus-visible{outline:2px solid #7ca7d5;outline-offset:-2px}
.admin-collapsible>summary h2{margin:0}
.admin-collapsible-body{padding:0 22px 22px}
.admin-subsection+.admin-subsection{margin-top:28px;padding-top:20px;border-top:1px solid #e5ebf2}
.admin-subsection h3{font-size:16px;margin:0 0 12px}
.admin-subsection h4{font-size:14px;margin:18px 0 8px}
tr.account-deleted td{background:#fde8e8;color:#8f1d1d;border-bottom-color:#f3c4c4}

/* Founder Admin / Member mode switcher, approval alert and section buttons. */
.founder-mode-switch{display:inline-flex;gap:0;padding:3px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.35);margin:0 22px 0 0;flex-shrink:0;white-space:nowrap}
.founder-mode-switch[hidden],.founder-mode-switch button[hidden],.founder-topbar[hidden]{display:none}
.founder-mode-switch button{background:transparent;color:#fff;border-radius:999px;padding:7px 18px;min-height:36px;font-weight:700;transition:background .18s ease,color .18s ease,box-shadow .18s ease}
.founder-mode-switch button:hover{background:rgba(255,255,255,.18)}
.founder-mode-switch button[aria-pressed="true"]{background:#fbbf24;color:#1d2a57;box-shadow:0 1px 4px rgba(0,0,0,.3)}
.founder-mode-switch button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.founder-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:10px}
.founder-approval-alert{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:7px 12px;border-radius:10px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.3);font-size:.875rem;font-weight:650;color:#fff}
.founder-approval-alert.has-items{background:#fff4d6;border-color:#fbbf24;color:#5c3b00}
.founder-approval-chips{display:inline-flex;gap:6px;flex-wrap:wrap}
.founder-approval-chips button{padding:3px 10px;min-height:28px;font-size:.8rem;border-radius:999px;background:#203587;color:#fff}
.founder-section-buttons{display:flex;gap:8px;flex-wrap:wrap}
.founder-section-buttons button{min-height:34px;padding:6px 12px}
/* Header text is forced white inside .identity, so the active (gold) button needs a higher-specificity dark label. */
:root header .identity .founder-mode-switch button{color:#fff}
:root header .identity .founder-mode-switch button[aria-pressed="true"]{color:#1d2a57}
@media(max-width:700px){.founder-mode-switch{margin-right:12px}.founder-mode-switch button{padding:6px 12px;min-height:32px}}
tr.deletion-requested td{background:#fff1d6;color:#7a3a00;font-weight:600;border-bottom-color:#f1c97a}
.members-alert{margin:0 0 12px;padding:8px 12px;border-radius:8px;background:#fff1d6;border:1px solid #f1c97a;color:#7a3a00;font-weight:650}
.members-alert[hidden]{display:none}
tr.deletion-requested.deletion-ready td{background:#ffe1d1;color:#7a2400;border-bottom-color:#f0a98a}
tr.account-deleted .hint{color:#8f1d1d;font-size:12px}

.site-footer{margin-top:24px;border-top:1px solid var(--brand-line,#d5ddf5);background:#fff;padding:16px 0;font-size:14px}
.site-footer-inner{display:flex;flex-wrap:wrap;gap:16px;align-items:flex-start;justify-content:space-between}
.contact-list{list-style:none;margin:6px 0 0;padding:0;display:grid;gap:4px}
.contact-box{margin-top:16px;padding-top:12px;border-top:1px solid #e3e9f8;font-size:14px}
.hp-field{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
#feedbackForm textarea{width:100%;box-sizing:border-box}
#adminFeedbackTable td:last-child{white-space:pre-wrap;min-width:260px}
.tab-badge{display:inline-block;min-width:18px;margin-left:6px;padding:0 6px;border-radius:999px;background:#d92d20;color:#fff;font-size:.72rem;font-weight:700;line-height:18px;text-align:center}
.tab-badge[hidden]{display:none}
#adminFeedbackTable td{vertical-align:top}
tr.feedback-received td{background:#fff9e6}
tr.feedback-completed td{color:#55648b}
.feedback-meta{display:block;font-size:12px;color:#55648b}

.role-banner{margin:0 0 12px;padding:10px 14px;border-radius:12px;background:#eef3ff;border:1px solid #cfdcff;color:#1d2a5b;font-size:14px}
.role-banner[hidden]{display:none}
.role-switch{display:inline-flex;align-items:center;gap:6px;margin-top:4px;font-size:13px;cursor:pointer}
.feedback-review{display:block;margin-top:4px;font-size:12px;font-weight:700;color:#8a5a00}
.feedback-review[hidden]{display:none}
tr.feedback-review-row td{background:#fff3d6}
#adminActivityTable td:last-child{white-space:pre-wrap;min-width:220px}

.mail-dialog{width:min(980px,calc(100vw - 24px))}
.mail-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.mail-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:14px;margin-top:10px}
@media(max-width:760px){.mail-layout{grid-template-columns:1fr}}
.mail-list{list-style:none;margin:0;padding:0;border:1px solid #d5ddf5;border-radius:12px;overflow:hidden;max-height:60vh;overflow-y:auto}
.mail-item{display:flex;align-items:stretch;border-bottom:1px solid #e3e9f8;background:#fff}.mail-item:last-child{border-bottom:0}
.mail-item.mail-unread{background:#f3f7ff}.mail-item.mail-unread .mail-subject strong{font-weight:800}.mail-item.mail-selected{outline:2px solid #1f3a93;outline-offset:-2px}
.mail-row{flex:1;min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;padding:10px 12px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;border-radius:0}
.mail-subject{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}.mail-preview{color:#55648b}.mail-date{font-size:12px;color:#55648b;white-space:nowrap}
.mail-del{align-self:center;margin:0 8px;padding:4px 10px;font-size:12px}
.mail-tag{display:inline-block;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:700;background:#e8eefc;color:#1d2a5b}
.mail-tag-processing{background:#fff1cc;color:#7a4b00}.mail-tag-completed{background:#dcf5e3;color:#14532d}
.mail-reader{border:1px solid #d5ddf5;border-radius:12px;padding:14px;background:#fff;min-height:160px}
.mail-reader-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.mail-reader-head h3{margin:0;font-size:17px}
.mail-body{white-space:pre-wrap;margin:10px 0 14px;line-height:1.55}
.mail-row:not(:disabled):hover,.mail-row:focus-visible{background:#e8eefc;color:#18233f}
.mail-row{color:#18233f}
.conversion-zone{margin-top:22px;padding-top:16px;border-top:1px solid #d9e2ec}.conversion-zone h3{margin:0 0 8px;font-size:16px}#conversionPendingText{margin:0 0 10px}#conversionPendingText,#conversionStatus{font-size:14px}

/* Admin tables: per-column filters and show/hide columns */
.admin-table-tools{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 14px;margin:10px 0}
.admin-table-tools[hidden]{display:none}
.admin-table-tools .admin-filter{flex:1 1 220px;margin:0}
.admin-table-tools .admin-filter input{margin-top:4px}
.admin-table-tools>button{margin:0}
.admin-filter-status{flex:1 0 100%;margin:0}
.admin-filter-status[hidden]{display:none}
.admin-col-picker{position:relative}
.admin-col-summary{list-style:none;cursor:pointer;user-select:none;display:inline-block;padding:9px 14px;border-radius:10px;border:1px solid var(--brand-line,#d5ddf5);background:var(--brand-soft,#eef1fd);color:#203587;font-weight:600;font-size:.9rem}
.admin-col-summary::-webkit-details-marker{display:none}
.admin-col-summary::after{content:" \25BE"}
.admin-col-summary:hover{background:#dfe6fb}
.admin-col-summary:focus-visible{outline:2px solid #7ca7d5;outline-offset:2px}
.admin-col-menu{position:absolute;z-index:30;top:calc(100% + 4px);left:0;min-width:250px;max-width:min(340px,90vw);max-height:340px;overflow:auto;padding:10px;background:#ffffff;border:1px solid var(--brand-line,#d5ddf5);border-radius:12px;box-shadow:0 12px 28px rgba(32,53,135,.18)}
.admin-col-option{display:flex;align-items:center;gap:8px;margin:0;padding:5px 4px;font-weight:500;font-size:.9rem;cursor:pointer}
.admin-col-option input{width:auto;margin:0}
.admin-col-showall{width:100%;margin-top:8px}
.admin-col-filters th{padding:4px 6px;text-transform:none;letter-spacing:normal;font-weight:400;background:#f7f9fe}
.admin-col-filters input{width:100%;min-width:6rem;margin:0;padding:5px 8px;font-size:12px}
.admin-col-filters input.active{border-color:#203587;background:#eef1fd}
.admin-col-filters input:disabled{opacity:.5}
.admin-col-hidden,.admin-row-filtered{display:none !important}
