/* MyBudgetAdventure — mobile-first banking results panel.
   The Google/Gmail scan runs in the existing 07:00 ChatGPT Daily Digest.
   This panel ONLY reads and reviews stored Supabase results. */
#spendingView .panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.bank-mail-bell{
  position:relative;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border:1px solid #dce2fa;
  border-radius:14px;
  background:#eef1ff;
  color:#4052df;
  box-shadow:0 5px 14px rgba(53,77,180,.07);
}
.bank-mail-bell svg{height:23px;width:23px}
.bank-mail-bell:focus-visible,.bank-mail-panel button:focus-visible{
  outline:3px solid #7e8aff;outline-offset:2px;
}
.bank-mail-counter{
  position:absolute;top:-7px;right:-8px;
  min-width:23px;height:23px;line-height:23px;
  padding:0 5px;border-radius:14px;
  background:#d82d50;color:white;
  font-size:12px;font-weight:850;text-align:center;
  border:2px solid #fff;
}
.bank-mail-panel{
  display:block;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  overflow-x:hidden;
  margin:10px 0 16px;
  border:1px solid #e4e8f5;border-radius:18px;
  background:linear-gradient(180deg,#fff 0%,#fafbff 100%);
  box-shadow:0 10px 28px rgba(24,32,76,.07);
  padding:16px;
}
.bank-mail-panel-head{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  font-size:17px;
}
.bank-mail-close{
  border:0;background:#f0f2f7;color:#47506b;
  width:36px;height:36px;flex:0 0 36px;
  border-radius:10px;font-size:24px;
}
.bank-mail-meta{
  font-size:12px;color:#69738a;line-height:1.5;
  margin:7px 0 9px;
}
.bank-mail-toolbar{
  display:flex;justify-content:flex-start;padding:4px 0;
}
.bank-mail-toolbar button{
  min-height:34px;border:1px solid #d7ddf1;border-radius:10px;
  background:#eef1ff;color:#344ed0;
  font-size:12px;font-weight:750;padding:7px 11px;
}
.bank-mail-message{font-size:12px;color:#236457;margin:7px 0;overflow-wrap:anywhere}
.bank-mail-message:empty{display:none}
.bank-mail-message.error{color:#b12d46}
.bank-mail-tabs{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  padding:9px 0 13px;margin:0;
  border-bottom:1px solid #e9ecf5;
}
.bank-mail-tabs button{
  border:0;border-radius:18px;padding:8px 13px;
  background:#eef1f7;color:#59627a;
  font-size:13px;font-weight:750;min-height:36px;
}
.bank-mail-tabs button.active{background:#3957ff;color:#fff}
.bank-mail-rows{
  display:block;
  width:100%;min-width:0;max-width:100%;
  max-height:min(58vh,530px);
  overflow-y:auto;overflow-x:hidden;
  overscroll-behavior:contain;
  box-sizing:border-box;
}
.bank-mail-item{
  display:block;
  min-width:0;max-width:100%;width:100%;
  box-sizing:border-box;
  padding:15px 0;
  border-bottom:1px solid #e9ecf5;
}
.bank-mail-item:last-child{border-bottom:0}
.bank-mail-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  width:100%;min-width:0;
  gap:12px;
}
.bank-mail-merchant{
  flex:1 1 auto;min-width:0;
  font-weight:800;
  font-size:14px;line-height:1.4;
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
}
.bank-mail-price{
  flex:0 0 auto;
  font-size:15px;
  font-weight:850;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  text-align:right;
}
.bank-mail-sub{
  display:block;
  margin:5px 0 0;
  width:100%;min-width:0;
  font-size:12px;
  line-height:1.5;color:#758096;
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
}
.bank-mail-status-row{display:block;width:100%;margin-top:8px}
.bank-mail-state{
  display:inline-flex;align-items:center;
  font-size:11px;font-weight:750;
  padding:5px 9px;border-radius:8px;
  background:#fff0f3;color:#bf334b;
}
.bank-mail-state.recorded{background:#e8f8ef;color:#167a4e}
.bank-mail-state.ignored{background:#f1f1f4;color:#667085}
.bank-mail-state.uncertain{background:#fff2d4;color:#88560d}
.bank-mail-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  align-items:center;
  width:100%;min-width:0;
  gap:8px;margin-top:10px;
}
.bank-mail-actions>*{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:0;max-width:100%;
  white-space:normal;
  line-height:1.35;
}
.bank-mail-small{
  min-height:35px;max-width:100%;
  padding:8px 11px;
  border:0;border-radius:10px;
  font-size:12px;font-weight:750;box-shadow:none;
}
.bank-mail-email-link{
  display:inline-flex;align-items:center;
  font-size:12px;font-weight:800;
  min-height:35px;padding:5px 3px;
  color:#344fcb;text-decoration:underline;text-underline-offset:2px;
}
.bank-mail-empty{
  padding:20px 0;text-align:center;
  color:#768095;font-size:13px;
}
@media(max-width:520px){
  .bank-mail-panel{padding:12px;border-radius:14px}
  .bank-mail-merchant{font-size:13px}
  .bank-mail-price{font-size:14px}
  .bank-mail-card-head{gap:9px}
  .bank-mail-small{font-size:12px;padding:8px 10px}
  .bank-mail-tabs button{padding:8px 11px}
}

/* Multiple Gmail confirmations from the bank, wallet and merchant belong to one purchase. */
.bank-mail-more-sources{
  display:block;
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  margin-top:9px;
  padding:8px 10px;
  border-radius:10px;
  background:#f2f5ff;
  color:#465577;
  font-size:12px;
}
.bank-mail-more-sources summary{
  display:list-item;
  cursor:pointer;
  font-weight:750;
  line-height:1.5;
}
.bank-mail-other-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  margin-top:10px;
}
.bank-mail-other-links a{
  max-width:100%;
  overflow-wrap:break-word;
  color:#304fc3;
  text-decoration:underline;
  text-underline-offset:2px;
  line-height:1.5;
}

/* Foreign-currency receipts (e.g. CAD) retain original amount alongside EUR. */
.bank-mail-original{margin-top:5px;color:#53627e;font-size:12px;line-height:1.45;white-space:normal;overflow-wrap:break-word}

/* All (actionable list) and History (read-only complete archive) each retain every purchase. */
.bank-mail-tabs{justify-content:flex-start}
.bank-mail-tabs button{flex:1 1 88px;min-width:0;white-space:normal;line-height:1.3}
.bank-mail-filter-description{font-size:12px;color:#66758c;line-height:1.5;margin:10px 0 4px}
.bank-mail-state.reviewed{background:#e4f5ed;color:#166e4c}
.bank-mail-match-tag{display:inline-flex;align-items:center;margin-left:7px;margin-top:3px;
  padding:5px 8px;background:#eef1fb;color:#586781;font-size:11px;font-weight:650;border-radius:8px}
.bank-mail-reviewed-action{background:#e4f5ed;color:#166e4c;border:1px solid #b6dfc9}
.bank-mail-history-month{
  position:sticky;top:0;z-index:1;
  margin:0;padding:11px 0 8px;
  background:#fafbff;color:#52617b;
  border-bottom:1px solid #e4e9f4;
  font-size:13px;font-weight:800;text-transform:capitalize;
}
.bank-mail-history-item{padding:12px 0}
.bank-mail-history-item .bank-mail-actions{margin-top:6px}
.bank-mail-history-stamp{
  display:block;margin-top:7px;
  font-size:11px;line-height:1.5;color:#778298;
}
@media(max-width:420px){
  .bank-mail-tabs{gap:5px}
  .bank-mail-tabs button{padding:8px 5px;font-size:11px}
}
