/* -------- layout & nav -------- */
.date-picker span{font:600 15px "DM Sans";color:#22302c}
.panel-actions{display:flex;gap:10px;align-items:center}
.page-content{max-width:1180px}
.tab-panel{padding:22px}
.tab-panel[hidden],.form-area[hidden],.manage-panel[hidden]{display:none!important}

/* -------- overview -------- */
.fx-strip{display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center;margin:6px 0 18px;padding:10px 14px;background:#f0eee7;border-radius:9px}
.fx-pair{font:500 12px "DM Mono";color:#2f443d}
.fx-note{font-size:10px;color:#71807a}
.currency-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px;margin:20px 0}
.currency-card{background:#fffdf9;border:1px solid #e8e5dc;border-radius:12px;box-shadow:0 10px 30px rgba(44,54,48,.07);padding:18px}
.currency-head{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.cc-flag{background:var(--green);color:#eaf6ee;font:700 10px "DM Mono";letter-spacing:.6px;border-radius:5px;padding:3px 6px}
.cc-name{font-size:11px;color:#71807a;text-transform:uppercase;letter-spacing:.5px}
.cc-net{font:600 26px Fraunces,serif;color:#22302c}
.cc-net small{display:block;font:400 10px "DM Sans",sans-serif;color:#71807a;letter-spacing:.5px;text-transform:uppercase;margin-top:2px}
.cc-lines{display:flex;justify-content:space-between;font-size:12px;color:#46534e;border-top:1px solid #f0efeb;margin-top:9px;padding-top:9px}
.cc-lines b{font-weight:600;color:#22302c}
.cc-lines .in{color:#1c7a53}
.primary .cc-net{color:#1c644f}
.summary-panel{background:#fffdf9;border:1px solid #e8e5dc;border-radius:12px;padding:16px 18px;margin:0 0 22px}
.summary-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.summary-head h3{font:600 15px Fraunces,serif;margin:0}
.flow-line{display:flex;justify-content:space-between;font-size:12px;padding:4px 0;border-bottom:1px dashed #f0efeb}
.flow-line:last-child{border-bottom:0}
.flow-line b{font-weight:600}
.flow-line .in{color:#1c7a53}
.flow-line .out{color:#a4492f}
.flow-warn{font-size:11px;color:#8a7324;background:#fffaf0;border:1px solid #efdfbc;border-radius:7px;padding:8px 10px;margin-top:8px}

/* -------- manage rows -------- */
.manage-row,.account-row{display:flex;align-items:center;gap:12px;padding:14px 2px;border-bottom:1px solid #f0efeb}
.manage-row:last-child,.account-row:last-child{border-bottom:0}
.m-copy{flex:1;min-width:0}
.m-copy strong{display:block;font-size:13px}
.m-copy small{font-size:11px;color:#71807a}
.m-balance{font-weight:600;font-size:13px;white-space:nowrap}
.m-balance.income{color:#1c7a53}
.m-actions{display:flex;gap:6px}
.m-actions button{border:0;background:#eef1ec;color:#46534e;border-radius:6px;padding:7px 10px;font:600 11px "DM Sans";cursor:pointer}
.m-actions .verify{background:#dceee5;color:#1c644f}
.m-actions .delete{background:#f7e7e2;color:#a4492f}
.status-badge{font-size:9px;font-weight:700;letter-spacing:.4px;padding:2px 7px;border-radius:10px;text-transform:uppercase;white-space:nowrap}
.status-badge.draft{background:#f3eede;color:#8a7324}
.status-badge.verified{background:#daebe0;color:#2f7a5f}
.status-badge.archived{background:#eceeea;color:#7d8883}
.clickable{cursor:pointer}
.clickable:hover{background:#faf8f2}
.empty{font-size:12px;color:#71807a;padding:18px 2px}

/* -------- provider groups -------- */
.provider-group{margin-bottom:16px}
.provider-head{display:flex;justify-content:space-between;align-items:baseline;background:#f0eee7;border-radius:7px;padding:8px 12px;margin-bottom:4px}
.provider-name{font:600 13px "DM Sans";color:#33443e}
.provider-head small{font-size:10px;color:#71807a}

/* -------- cash flow -------- */
.proj-row{display:flex;align-items:center;gap:12px;padding:12px 2px;border-bottom:1px solid #f0efeb}
.proj-row:last-child{border-bottom:0}
.proj-cell{font-size:12px;color:#46534e;min-width:82px}
.proj-cell b{display:block;font-size:13px;font-weight:600;color:#22302c}
.proj-cell.warn b{color:#a4492f}
.proj-flag{font-size:10px;font-weight:700;color:#fff;background:#a4492f;border-radius:8px;padding:3px 8px;white-space:nowrap}
.proj-flag.good{background:#1c7a53}
.rec-row{display:flex;align-items:center;gap:12px;padding:12px 2px;border-bottom:1px solid #f0efeb}
.rec-row:last-child{border-bottom:0}
.rec-kind{font-size:9px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;border-radius:3px;padding:3px 6px;white-space:nowrap}
.rec-kind.salary{background:#dceee5;color:#1c644f}
.rec-kind.direct_debit{background:#f7e7e2;color:#a4492f}
.rec-kind.standing_order{background:#f0e7dc;color:#8a6534}
.rec-kind.planned_payment{background:#e9ecf3;color:#4a5b7a}
.rec-kind.off{opacity:.45}

/* -------- modal forms -------- */
.modal-backdrop{z-index:9}
.edit-grid{width:100%;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin-bottom:14px}
.form-area select{width:100%;display:block;margin-top:5px;border:1px solid #cbd4ce;border-radius:6px;padding:9px;font:14px "DM Sans";background:#fffdf9;color:#22302c}
.rate-badge{margin-left:auto}

/* -------- combined net worth (GBP) -------- */
.net-worth-total{margin-bottom:18px;border-radius:14px;background:linear-gradient(135deg,#1c644f,#2f7a5f);color:#fff;padding:18px 22px;display:flex;flex-direction:column;gap:4px}
.net-worth-total .net-label{font-size:12px;letter-spacing:.5px;text-transform:uppercase;color:#dceee5;display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.net-worth-total .net-conv{text-transform:none;letter-spacing:0;font-family:"DM Sans";font-size:11px;color:#bcd7c8}
.net-worth-total .net-value{font-size:34px;font-weight:700;line-height:1.1}
.net-worth-total .net-value small{font:500 12px "DM Mono";color:#dceee5}

/* -------- statement import -------- */
.upload-zone{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;width:100%;border:2px dashed #cbd4ce;border-radius:10px;padding:22px;margin-bottom:14px;font:500 13px "DM Sans";color:#46534e;background:#fdfcf8;cursor:pointer;text-align:center}
.upload-zone input{font:13px "DM Sans";color:#22302c;margin-top:4px}
.imp-summary{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.imp-stat{flex:1;min-width:100px;background:#f6f4ee;border-radius:9px;padding:10px 12px}
.imp-stat b{display:block;font-size:18px;font-weight:700;color:#22302c}
.imp-stat span{font-size:11px;color:#687a72;text-transform:uppercase;letter-spacing:.4px}
.imp-block{margin-bottom:16px}
.imp-block h4{font-size:12px;letter-spacing:.5px;text-transform:uppercase;color:#687a72;margin:0 0 8px}
.imp-item{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 2px;border-bottom:1px solid #f0efeb}
.imp-item:last-child{border-bottom:0}
.imp-item b{font-size:14px;color:#22302c}
.imp-item small{font-size:12px;color:#687a72}
.imp-tag{font-size:10px;font-weight:700;border-radius:3px;padding:3px 7px;white-space:nowrap}
.imp-tag.monthly{background:#e9ecf3;color:#4a5b7a}
.imp-tag.weekly{background:#dceee5;color:#1c644f}
.imp-tag.yearly{background:#f0e7dc;color:#8a6534}
.imp-tag.salary{background:#dceee5;color:#1c644f}
.imp-tag.bad{background:#f7e7e2;color:#a4492f}
.imp-hint{font-size:12px;color:#687a72}
.add-mini{border:0;background:#1c7a53;color:#fff;font:600 12px "DM Sans";border-radius:6px;padding:7px 12px;cursor:pointer;margin-left:auto}
.add-mini:hover{background:#155f3f}

@media(max-width:700px){
  .manage-row,.account-row{flex-wrap:wrap;gap:8px}
  .m-actions{margin-left:auto}
  .currency-grid{grid-template-columns:1fr}
}
/* -------- advice / AI coach -------- */
.advice-intro{background:linear-gradient(135deg,#1c644f,#2f7a5f);color:#fff;border-radius:16px;padding:30px 32px;max-width:640px;box-shadow:var(--shadow)}
.advice-intro .advice-icon{font-size:26px}
.advice-intro h2{font:600 22px/1.2 Fraunces,serif;margin:10px 0 8px;color:#fff}
.advice-intro p{color:#dfeef6;font-size:13px;line-height:1.55;margin:0}
.advice-intro ul{color:#cfe4d8;font-size:12px;line-height:1.7;padding-left:18px;margin:13px 0 21px}
.advice-intro .save-button{margin:0;padding:12px 20px}
.chat-panel{max-width:640px;display:flex;flex-direction:column;gap:10px}
.chat-bar{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.chat-restart{border:1px solid var(--line);background:#fff;border-radius:7px;padding:6px 11px;font:600 12px "DM Sans",sans-serif;color:var(--green);cursor:pointer;margin-left:auto}
.chat-restart:hover{background:var(--mint)}
.chat-list{display:flex;flex-direction:column;gap:12px;min-height:120px;max-height:52vh;overflow-y:auto;background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px}
.chat-msg{display:flex}
.chat-msg.user{justify-content:flex-end}
.chat-msg .bubble{max-width:84%;border-radius:12px;padding:10px 14px;font-size:13px;line-height:1.55}
.chat-msg.user .bubble{background:var(--green);color:#eaf6ee}
.chat-msg.assistant .bubble{background:var(--cream);border:1px solid var(--line)}
.chat-msg.assistant .bubble p{margin:0 0 8px}
.chat-msg.assistant .bubble p:last-child{margin-bottom:0}
.chat-msg.assistant .bubble ul,.chat-msg.assistant .bubble ol{margin:4px 0 10px;padding-left:20px}
.chat-msg.assistant .bubble li{margin-bottom:4px}
.chat-busy{color:var(--muted);font-size:11px;padding-left:4px}
.chat-input-row{display:flex;gap:8px}
.chat-input-row input{flex:1;border:1px solid #cbd4ce;border-radius:8px;padding:11px 13px;font:14px "DM Sans",sans-serif;background:#fff}
.chat-send{border:0;border-radius:8px;background:var(--green);color:#fff;font:600 13px "DM Sans",sans-serif;padding:0 18px;cursor:pointer}
.chat-send:disabled{opacity:.55;cursor:default}
.advice-note{color:var(--muted);font-size:11px;line-height:1.5;margin:0 2px}

/* -------- category review -------- */
.cat-review{max-height:290px;overflow-y:auto;border:1px solid var(--line);border-radius:9px;background:#fffdf9;padding:4px 12px}
.cat-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 0;border-bottom:1px dashed #f0efeb}
.cat-row:last-child{border-bottom:0}
.cat-meta{flex:1;min-width:0}
.cat-meta b{display:block;font-size:12px;color:#22302c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cat-meta small{font-size:11px;color:var(--muted)}
.cat-select{border:1px solid #cbd4ce;border-radius:6px;padding:6px 8px;font:600 11px "DM Sans",sans-serif;background:#fff;color:#22302c}
.cat-select:focus{outline:2px solid var(--green)}
.ai-cat-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#f6f4ee;border:1px solid #e4e0d7;border-radius:8px;padding:12px;margin:0 0 10px}
.ai-cat-head b{display:block;font-size:13px;color:#22302c}
.ai-cat-head p{margin:3px 2px 0}
.ai-cat-head .m-actions{margin-left:auto}
.ai-cat-row .cat-select{width:auto;min-width:150px}
.ai-cat-panel{margin:0 0 12px}
.upload-zone input{display:none}.upload-zone{position:relative;transition:border-color .15s,background .15s}.upload-ico{font-size:20px;color:#5b6b64;line-height:1}.upload-main{font-weight:700;color:#23332d;font-size:14px}.upload-sub{font-size:12px;color:#8a9790}.upload-zone.dragover{border-color:#2f8f63;background:#eff8f3}.save-button[disabled]{opacity:.45;cursor:not-allowed;pointer-events:none}#sPreview{margin-bottom:6px}.preview-ok{font:600 13px "DM Sans";color:#2f8f63;background:#eef8f2;border:1px solid #cde9d8;border-radius:8px;padding:10px 12px;margin:8px 0 0}.preview-warn{font:500 13px/1.5 "DM Sans";color:#8a5a00;background:#fdf3df;border:1px solid #f0dfae;border-radius:8px;padding:10px 12px;margin:8px 0 0}.preview-head{display:flex;flex-direction:column;gap:2px;margin:8px 0}.preview-head h4{margin:0;font-size:14px}.preview-file{font-size:12px;color:#8a9790}.preview-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}.preview-chip{font:500 12px "DM Sans";padding:4px 9px;border-radius:999px;background:#eef1ee;color:#44524c}.preview-chip b{color:#1f2f28}.preview-chip.warn{background:#fdf3df;color:#8a5a00}.preview-table-wrap{margin-top:4px}.preview-table{width:100%;border-collapse:collapse;font:500 13px "DM Sans";color:#2b3a34}.preview-table th{text-align:left;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:#8a9790;padding:4px 6px;border-bottom:1px solid #e3e9e5}.preview-table td{padding:5px 6px;border-bottom:1px solid #eef1ee;vertical-align:top}.preview-table th.num,.preview-table td.num{text-align:right;white-space:nowrap}
/* ---- statement import page ---- */
.back-top{border:1px solid #cbd4ce;background:#fff;color:#2b3a34;border-radius:8px;padding:9px 14px;font:600 13px "DM Sans";cursor:pointer;white-space:nowrap}
.back-top:hover{border-color:#2f8f63;color:#1c644f}
.ghost-button{border:1px solid #cbd4ce;background:#fff;color:#2b3a34;border-radius:8px;padding:11px 16px;font:600 13px "DM Sans";cursor:pointer;white-space:nowrap}
.ghost-button:hover{border-color:#9fb2a8;background:#f6f4ee}
.upload-zone.done{border-style:solid;border-color:#cde9d8;background:#f4faf6}
.stmt-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
.stmt-done{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0 4px}
.preview-table-wrap{max-height:62vh;overflow:auto;border:1px solid #e3e9e5;border-radius:8px}
.preview-table thead th{position:sticky;top:0;background:#faf9f5;z-index:1}
.preview-table td.nowrap{white-space:nowrap}
.preview-table td.cat{width:180px;min-width:180px}
.preview-table select.cat-select{width:100%;font:500 12px "DM Sans";color:#2b3a34;border:1px solid #cbd4ce;border-radius:5px;background:#fff;padding:4px 6px}

/* ---- statement tabs + history ---- */
.stmt-tabs{display:flex;gap:4px;background:#f6f4ee;border:1px solid #e4e0d7;border-radius:10px;padding:4px;margin:0 0 20px;width:fit-content;max-width:100%;flex-wrap:wrap}
.stmt-tabs button{font:600 13px "DM Sans";color:#687a72;border:0;background:none;padding:9px 16px;border-radius:7px;cursor:pointer;white-space:nowrap}
.stmt-tabs button:hover{color:#1c644f}
.stmt-tabs button.active{background:#fff;color:#1c644f;box-shadow:0 1px 3px rgba(28,100,79,.18)}
.hist-bar{display:flex;gap:10px;flex-wrap:wrap;margin:2px 0 12px}
.hist-search{flex:1;min-width:220px;border:1px solid #cbd4ce;border-radius:7px;padding:9px 12px;font:500 13px "DM Sans";color:#2b3a34;background:#fff}
.hist-search:focus,.hist-filter:focus{outline:none;border-color:#2f8f63}
.hist-filter{border:1px solid #cbd4ce;border-radius:7px;padding:9px 12px;font:500 13px "DM Sans";color:#2b3a34;background:#fff;max-width:230px}
.hist-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:#f6f4ee;border:1px solid #e4e0d7;border-radius:8px;padding:10px 12px;margin:0 0 12px}
.hist-toolbar select{max-width:230px}
.hist-scroll{max-height:60vh}
.sort-btn{border:0;background:none;font:inherit;color:inherit;padding:0;margin:0;cursor:pointer}
.sort-btn:hover{color:#1c644f}
.col-check{width:30px}
.preview-table tr.sel td{background:#eff8f3}
.preview-table td.cat .cat-select{opacity:1}
.ghost-button.danger{color:#a4492f;border-color:#e7c4b8}
.ghost-button.danger:hover{background:#fdf1ec;border-color:#c96f52;color:#a4492f}

/* ---- duplicates + statement nav extras ---- */
.dup-tag{display:inline-block;font:700 10px "DM Sans";color:#a4492f;background:#f7e7e2;border-radius:3px;padding:2px 6px;margin-left:6px;white-space:nowrap;vertical-align:middle}
.dup-tag.repeat{color:#8a5a00;background:#fdf3df}
.dup-tag.new{color:#2f8f63;background:#eef8f2}
.dup-filter{display:inline-flex;align-items:center;gap:6px;font:500 13px "DM Sans";color:#46534e;border:1px solid #cbd4ce;border-radius:7px;padding:8px 12px;background:#fff;white-space:nowrap;cursor:pointer}
.dup-filter input{width:auto;margin:0}
.cell-keep{width:34px}
.preview-table tr.dup-row td{background:#fffbf6}
.upload-zone.off{opacity:.55;pointer-events:none}
.edit-grid select{width:100%;display:block;margin-top:5px;border:1px solid #cbd4ce;border-radius:6px;padding:9px;font:500 13px "DM Sans";color:#2b3a34;background:#fff}

/* -------- spending view -------- */
.spending-period{display:flex;gap:6px;flex-wrap:wrap;margin:16px 0 14px}
.period-btn{border:1px solid #cbd4ce;background:#fff;color:#46534e;border-radius:7px;padding:8px 14px;font:600 12px "DM Sans";cursor:pointer}
.period-btn.active{background:var(--green);border-color:var(--green);color:#fff}
.period-btn:hover{border-color:#2f8f63;color:#1c644f}
.period-btn.active:hover{color:#fff}
.spending-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:0 0 18px}
.spending-card{background:#fffdf9;border:1px solid #e8e5dc;border-radius:12px;padding:16px 18px;box-shadow:0 4px 14px rgba(44,54,48,.04)}
.spending-card.warning{border-color:#efdfbc;background:#fffaf0}
.sc-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:#71807a}
.sc-value{font:600 24px Fraunces,serif;color:#22302c;margin-top:6px}
.sc-delta{font-size:12px;font-weight:600;margin-top:4px}
.sc-meta{font-size:11px;color:#71807a;margin-top:4px}
.sc-delta.positive,.net-delta.positive,.delta-pos{color:#1c7a53}
.sc-delta.negative,.net-delta.negative,.delta-neg{color:#a4492f}
.category-row{display:flex;align-items:center;gap:14px;padding:10px 0;border-bottom:1px solid #f0efeb}
.category-row:last-child{border-bottom:0}
.cat-info{width:180px;min-width:120px;flex:0 0 160px}
.cat-info strong{display:block;font-size:13px;color:#22302c}
.cat-info small{font-size:11px;color:#71807a}
.cat-bar{flex:1;background:#f0eee7;border-radius:6px;height:14px;overflow:hidden;min-width:80px}
.cat-fill{height:100%;background:var(--green);border-radius:6px}
.cat-amount{text-align:right;width:110px;min-width:80px}
.cat-amount b{display:block;font:600 14px Fraunces,serif;color:#22302c}
.cat-amount small{font-size:11px;color:#71807a}
.top-expense-row{display:flex;align-items:center;gap:14px;padding:10px 0;border-bottom:1px solid #f0efeb}
.top-expense-row:last-child{border-bottom:0}
.te-date{font:500 12px "DM Mono";color:#71807a;width:90px;flex:0 0 90px}
.te-info{flex:1;min-width:0}
.te-info strong{display:block;font-size:13px;color:#22302c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.te-info small{font-size:11px;color:#71807a}
.te-amount{font:600 13px "DM Mono";color:#a4492f;white-space:nowrap}
.trend-comparison{display:grid;gap:10px}
.trend-bar{display:flex;align-items:center;gap:12px}
.trend-label{width:140px;font-size:11px;color:#687a72;flex:0 0 140px;text-align:right}
.trend-visual{flex:1;display:flex;align-items:center;gap:8px;background:#f0eee7;border-radius:6px;height:26px;padding:0 8px;position:relative;overflow:hidden}
.trend-fill{height:100%;background:var(--green);border-radius:6px;max-width:100%}
.trend-visual span{position:absolute;right:8px;font:600 11px "DM Mono";color:#22302c;background:rgba(255,255,255,.75);border-radius:4px;padding:1px 5px}
.trend-insight{font-size:12px;color:#687a72;background:#f6f4ee;border-radius:8px;padding:10px 12px;margin:14px 0 0}
.metrics-card{border:1px solid #d8e6dc;background:linear-gradient(135deg,#f4faf6,#eef7f0)}
.metrics-card .cc-lines b.warn{color:#a4492f}
.metrics-card .cc-lines b.good{color:#1c7a53}
.metrics-hint{display:block;font-size:11px;color:#687a72;line-height:1.5;margin-top:8px}
.net-delta{font:600 12px "DM Sans";display:inline-block;margin-left:10px;vertical-align:middle;white-space:nowrap}
.net-delta.positive{color:#a5dfbb}
.net-delta.negative{color:#f3c9b9}
.imp-cat-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px dashed #f0efeb}
.imp-cat-row:last-child{border-bottom:0}
.imp-cat-row strong{font-size:13px;color:#22302c}
.imp-cat-row span{font-size:12px;color:#687a72}
.more-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin-top:22px}
.more-card{border:1px solid #e8e5dc;background:#fffdf9;border-radius:12px;padding:20px;display:flex;align-items:flex-start;gap:14px;text-align:left;cursor:pointer;transition:border-color .15s,box-shadow .15s;box-shadow:0 4px 14px rgba(44,54,48,.04)}
.more-card:hover{border-color:#78a08e;box-shadow:0 8px 24px rgba(44,54,48,.1)}
.more-icon{width:40px;height:40px;border-radius:10px;background:#e1f0e7;color:var(--green);display:grid;place-items:center;font-size:20px;flex:0 0 auto}
.more-card h3{font:600 16px Fraunces,serif;margin:0 0 4px;color:#22302c}
.more-card p{font-size:12px;color:#71807a;margin:0;line-height:1.5}

/* -------- investment performance -------- */
.m-balance .inv-gain{display:block;font:500 11px "DM Sans";margin-top:3px;white-space:nowrap}
.inv-gain.pos{color:#1c7a53}
.inv-gain.neg{color:#a4492f}
.net-return{font:500 12px "DM Sans";color:#dceee5;margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,255,255,.16)}
.net-return.pos{color:#a5dfbb}
.net-return.neg{color:#f3c9b9}

@media(max-width:700px){
  .spending-card{width:100%}
  .category-row{gap:10px}
  .cat-info{flex:0 0 110px}
  .cat-bar{min-width:50px}
  .trend-label{width:100px;flex:0 0 100px}
  .spending-period{overflow-x:auto;flex-wrap:nowrap;width:100%}
  .more-grid{grid-template-columns:1fr}
}

/* ============================================================
   SAMURAI INK THEME · dark re-skin override layer
   ============================================================ */
.date-picker span{font:600 15px Georgia,serif;color:#e9dfc6}
.tab-panel{background:transparent}
.tab-panel[hidden],.form-area[hidden],.manage-panel[hidden]{display:none!important}

/* ---- overview ---- */
.fx-strip{background:rgba(223,178,92,.06);border:1px solid #3a2f20}
.fx-pair{color:#d9c38c}
.fx-note{color:#8b7d62}
.currency-card{background:linear-gradient(160deg,#12100c,#0f0d09);border:1px solid #2e261a;box-shadow:0 12px 30px rgba(0,0,0,.42)}
.cc-flag{background:linear-gradient(135deg,#dfb25c,#8a6a24);color:#1a1208}
.cc-flag.primary{background:linear-gradient(135deg,#e64a2e,#7c1418);color:#f6e6cf}
.cc-name{color:#8b7d62}
.cc-net{color:#e9dfc6}
.cc-net small{color:#8b7d62}
.cc-lines{border-top-color:#2b2318}
.cc-lines b{color:#e9dfc6}
.cc-lines b small{color:#8b7d62}
.cc-lines .in{color:#6ecfa0}
.cc-lines .out{color:#ef8a6a}
.primary .cc-net{color:#f3d9a1}
.summary-panel{background:linear-gradient(160deg,#12100c,#0f0d09);border:1px solid #2e261a;box-shadow:0 12px 30px rgba(0,0,0,.42)}
.summary-head h3{color:#e9dfc6}
.flow-line{border-bottom-color:#2b2318}
.flow-line b{color:#e9dfc6}
.flow-line .in{color:#6ecfa0}
.flow-line .out{color:#ef8a6a}
.flow-warn{color:#e0c06a;background:rgba(223,178,92,.08);border:1px solid #5a4a24}
.net-worth-total{background:linear-gradient(135deg,#241312 0%,#16100c 45%,#1c0d0c 100%);border:1px solid #5a4030;
  box-shadow:0 18px 46px rgba(0,0,0,.6),inset 0 1px 0 rgba(230,74,46,.25);position:relative;overflow:hidden}
.net-worth-total::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;background:linear-gradient(90deg,#b62026,#dfb25c)}
.net-worth-total .net-label{color:#d9c38c}
.net-worth-total .net-conv{color:#a89a7e}
.net-worth-total .net-value{color:#f3e3bd}
.net-worth-total .net-value small{color:#c9b993}
.net-delta.positive{color:#9fe3bd}
.net-delta.negative{color:#f3a18c}
.net-return.positive{color:#9fe3bd}
.net-return.negative{color:#f3a18c}

/* ---- manage rows ---- */
.manage-row,.account-row{border-bottom-color:#262014}
.m-copy strong{color:#e9dfc6}
.m-copy small{color:#8b7d62}
.m-balance{color:#e9dfc6}
.m-balance.income{color:#6ecfa0}
.m-actions button{background:#201a12;color:#c9b993}
.m-actions button:hover{background:#2a2217}
.m-actions .verify{background:rgba(63,158,120,.16);color:#7fd6a4}
.m-actions .delete{background:rgba(182,32,38,.18);color:#f0906b}
.status-badge.draft{background:rgba(223,178,92,.14);color:#e0c06a}
.status-badge.verified{background:rgba(63,158,120,.15);color:#7fd6a4}
.status-badge.archived{background:rgba(160,160,140,.12);color:#a19884}
.clickable:hover{background:rgba(255,255,255,.025)}
.empty{color:#8b7d62}

/* ---- provider groups ---- */
.provider-head{background:linear-gradient(90deg,rgba(223,178,92,.10),transparent);border-left:3px solid var(--blood)}
.provider-name{color:#e0c06a}
.provider-head small{color:#8b7d62}

/* ---- cash flow ---- */
.proj-row{border-bottom-color:#262014}
.proj-cell{color:#a89a7e}
.proj-cell b{color:#e9dfc6}
.proj-cell.warn b{color:#ef8a6a}
.proj-flag{background:#b62026}
.proj-flag.good{background:#3f9e78}
.rec-row{border-bottom-color:#262014}
.rec-kind.salary{background:rgba(63,158,120,.15);color:#7fd6a4}
.rec-kind.direct_debit{background:rgba(182,32,38,.16);color:#f0906b}
.rec-kind.standing_order{background:rgba(223,178,92,.13);color:#e0c06a}
.rec-kind.planned_payment{background:rgba(150,130,200,.15);color:#c3ace8}
.rec-kind.off{opacity:.4}
.metrics-card{background:linear-gradient(135deg,rgba(63,158,120,.10),rgba(63,158,120,.03));border:1px solid #2e4a3a}
.metrics-card .cc-lines b.warn{color:#ef8a6a}
.metrics-card .cc-lines b.good{color:#7fd6a4}
.metrics-hint{color:#8b7d62}

/* ---- modal forms ---- */
.edit-grid input,.edit-grid select,#sSearch,#sAccountSel,select.cat-select,.form-area input,.hist-search,.hist-filter{color:#e9dfc6;background-color:#0d0b08;border-color:#4a3b26}
.form-area select{background:#0d0b08;color:#e9dfc6;border-color:#4a3b26}
.fx-preview{color:#d9c38c;background:rgba(223,178,92,.08)}

/* ---- statement import ---- */
.upload-zone{background:#100d09;border-color:#4a3b26;color:#a89a7e}
.upload-zone.dragover{border-color:#dfb25c;background:rgba(223,178,92,.06)}
.upload-zone.done{border-color:#3e6b53;background:rgba(63,158,120,.05)}
.upload-zone.off{opacity:.5}
.upload-ico{color:#c9b993}
.upload-main{color:#e9dfc6}
.upload-sub{color:#8b7d62}
.imp-summary{background:transparent}
.imp-stat{background:#12100c;border:1px solid #2e261a}
.imp-stat b{color:#e9dfc6}
.imp-stat span{color:#8b7d62}
.imp-block h4{color:#8b7d62}
.imp-item{border-bottom-color:#262014}
.imp-item b{color:#e9dfc6}
.imp-item small{color:#8b7d62}
.imp-tag.monthly{background:rgba(150,130,200,.15);color:#c3ace8}
.imp-tag.weekly{background:rgba(63,158,120,.15);color:#7fd6a4}
.imp-tag.yearly{background:rgba(223,178,92,.13);color:#e0c06a}
.imp-tag.salary{background:rgba(63,158,120,.15);color:#7fd6a4}
.imp-tag.bad{background:rgba(182,32,38,.16);color:#f0906b}
.imp-hint{color:#8b7d62}
.add-mini{background:#a5822f;color:#1a1208}
.add-mini:hover{background:#c2913a}
.imp-cat-row{border-bottom-color:#2b2318}
.imp-cat-row strong{color:#e9dfc6}
.imp-cat-row span{color:#8b7d62}

/* ---- advice / AI coach ---- */
.advice-intro{background:linear-gradient(135deg,#241312,#160f0c);border:1px solid #5a4030;box-shadow:0 20px 50px rgba(0,0,0,.6)}
.advice-intro h2{color:#f3e3bd}
.advice-intro p{color:#c9b993}
.advice-intro ul{color:#b8a888}
.chat-bar{color:#8b7d62}
.chat-restart{border-color:#4a3b26;background:#12100c;color:#dfb25c}
.chat-restart:hover{background:#1c150c}
.chat-list{background:#0f0d09;border-color:#2e261a}
.chat-msg .bubble{border-radius:4px}
.chat-msg.user .bubble{background:linear-gradient(135deg,#a5822f,#7c5f1d);color:#15100a}
.chat-msg.assistant .bubble{background:#171310;border:1px solid #2e261a;color:#e9dfc6}
.chat-busy{color:#8b7d62}
.chat-input-row input{background:#0d0b08;border-color:#4a3b26;color:#e9dfc6;outline:none}
.chat-input-row input:focus{border-color:#dfb25c}
.chat-send{background:linear-gradient(135deg,#dfb25c,#a5822f);color:#1a1208}
.chat-send:disabled{opacity:.5}
.advice-note{color:#8b7d62}

/* ---- category review ---- */
.cat-review{background:#0f0d09;border-color:#2e261a}
.cat-row{border-bottom-color:#2b2318}
.cat-meta b{color:#e9dfc6}
.cat-meta small{color:#8b7d62}
.cat-select{background:#0d0b08;border-color:#4a3b26;color:#e9dfc6}
.cat-select:focus{outline:2px solid #dfb25c}
.ai-cat-head{background:#12100c;border-color:#2e261a}
.ai-cat-head b{color:#e9dfc6}

/* ---- previews & tables ---- */
.preview-ok{color:#7fd6a4;background:rgba(63,158,120,.08);border-color:#2e4a3a}
.preview-warn{color:#e0c06a;background:rgba(223,178,92,.07);border-color:#5a4a24}
.preview-head h4{color:#e9dfc6}
.preview-file{color:#8b7d62}
.preview-chip{background:#201a12;color:#a89a7e}
.preview-chip b{color:#e9dfc6}
.preview-chip.warn{background:rgba(223,178,92,.1);color:#e0c06a}
.preview-table{color:#d9c38c}
.preview-table th{color:#8b7d62;border-bottom-color:#3a2f20}
.preview-table td{border-bottom-color:#2b2318}
.preview-table-wrap{border-color:#2e261a}
.preview-table thead th{background:#16120d}
.preview-table tr.sel td{background:rgba(63,158,120,.10)}
.preview-table .cat-select{color:#e9dfc6;background:#0d0b08}
.preview-table tr.dup-row td{background:rgba(223,178,92,.05)}

/* ---- statement pages & history ---- */
.back-top{border-color:#4a3b26;background:#12100c;color:#d9c38c}
.back-top:hover{border-color:#dfb25c;color:#f3d9a1}
.ghost-button{border-color:#4a3b26;background:#12100c;color:#d9c38c}
.ghost-button:hover{border-color:#6a5420;background:#1c150c}
.ghost-button.danger{color:#f0906b;border-color:#5a2a20}
.ghost-button.danger:hover{background:rgba(182,32,38,.12);border-color:#ef8a6a;color:#f0906b}
.stmt-tabs{background:#12100c;border-color:#2e261a}
.stmt-tabs button{color:#8b7d62}
.stmt-tabs button:hover{color:#dfb25c}
.stmt-tabs button.active{background:#201a12;color:#f3d9a1;box-shadow:0 0 12px rgba(223,178,92,.22)}
.hist-search,.hist-filter{background:#0d0b08}
.hist-search:focus,.hist-filter:focus{border-color:#dfb25c}
.hist-toolbar{background:#12100c;border-color:#2e261a}
.sort-btn:hover{color:#dfb25c}
.dup-tag{color:#f0906b;background:rgba(182,32,38,.16)}
.dup-tag.repeat{color:#e0c06a;background:rgba(223,178,92,.13)}
.dup-tag.new{color:#7fd6a4;background:rgba(63,158,120,.15)}
.dup-filter{color:#a89a7e;border-color:#4a3b26;background:#12100c}

/* ---- spending view ---- */
.period-btn{background:#12100c;border-color:#4a3b26;color:#a89a7e}
.period-btn:hover{border-color:#dfb25c;color:#f3d9a1}
.period-btn.active{background:linear-gradient(135deg,#dfb25c,#a5822f);border-color:#dfb25c;color:#1a1208}
.spending-card{background:linear-gradient(160deg,#12100c,#0f0d09);border-color:#2e261a;box-shadow:0 10px 26px rgba(0,0,0,.35)}
.spending-card.warning{border-color:#5a4a24;background:linear-gradient(160deg,#1d1610,#150f0a)}
.sc-label{color:#8b7d62}
.sc-value{color:#f3d9a1}
.sc-delta.positive,.delta-pos{color:#6ecfa0}
.sc-delta.negative,.delta-neg{color:#ef8a6a}
.sc-meta{color:#8b7d62}
.category-row{border-bottom-color:#2b2318}
.cat-info strong{color:#e9dfc6}
.cat-info small{color:#8b7d62}
.cat-bar{background:#241d12}
.cat-fill{background:linear-gradient(90deg,#b62026,#dfb25c)}
.cat-amount b{color:#e9dfc6}
.cat-amount small{color:#8b7d62}
.top-expense-row{border-bottom-color:#2b2318}
.te-date{color:#8b7d62}
.te-info strong{color:#e9dfc6}
.te-info small{color:#8b7d62}
.te-amount{color:#f0906b}
.trend-label{color:#8b7d62}
.trend-visual{background:#241d12}
.trend-fill{background:linear-gradient(90deg,#b62026,#dfb25c)}
.trend-visual span{color:#e9dfc6;background:rgba(15,13,9,.7)}
.trend-insight{color:#a89a7e;background:rgba(223,178,92,.05);border:1px solid #2e261a}

/* ---- investment performance ---- */
.m-balance .inv-gain{color:#8b7d62}
.inv-gain.pos{color:#6ecfa0}
.inv-gain.neg{color:#ef8a6a}

/* ---- more grid ---- */
.more-card{background:linear-gradient(160deg,#12100c,#0f0d09);border-color:#2e261a;box-shadow:0 10px 26px rgba(0,0,0,.35)}
.more-card:hover{border-color:#6a5420;box-shadow:0 14px 34px rgba(0,0,0,.5)}
.more-icon{background:rgba(223,178,92,.12);color:#dfb25c}
.more-card h3{color:#e9dfc6}
.more-card p{color:#8b7d62}

/* ---- category management ---- */
.cat-edit{background:rgba(15,13,9,.7);border:1px dashed #6a5420;border-radius:9px;padding:14px;margin-bottom:6px;display:grid;gap:10px;box-shadow:0 8px 20px rgba(0,0,0,.35)}
.cat-edit-fields{display:grid;grid-template-columns:1fr 1.6fr;gap:10px}
.cat-edit input{width:100%;border:1px solid #4a3b26;border-radius:5px;padding:10px;background:#0d0b08;color:#e9dfc6;font:14px "DM Sans",sans-serif;outline:none}
.cat-edit input:focus{border-color:#dfb25c;box-shadow:0 0 0 2px rgba(223,178,92,.18)}
.cat-edit .m-actions{justify-content:flex-end}
#categoriesHint.imp-hint{color:#e0c06a;background:rgba(223,178,92,.07);border:1px solid #5a4a24;padding:10px;border-radius:6px;margin:0 0 12px}
@media(max-width:700px){.cat-edit-fields{grid-template-columns:1fr}}
