#section-funding{
  padding:0 2px 32px;
  margin-top:-26px;
}
.funding-shell{
  width:100%;
  max-width:1840px;
  margin:0 auto;
}
.funding-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:8px;
}
.funding-kicker{
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  color:var(--accent-ledger);
  letter-spacing:1.4px;
  text-transform:uppercase;
  margin-bottom:2px;
}
.funding-title{
  margin:0;
  color:var(--text);
  font-size:22px;
  letter-spacing:0;
  line-height:1.05;
}
.funding-subtitle{
  margin:4px 0 0;
  color:var(--muted);
  font-size:13px;
  max-width:980px;
}
.funding-sub-tabs{
  display:flex;
  gap:22px;
  align-items:center;
  overflow-x:auto;
  border-bottom:1px solid var(--border);
  margin-bottom:12px;
}
.funding-sub-tab{
  appearance:none;
  border:0;
  background:transparent;
  color:var(--muted);
  padding:8px 0 9px;
  font-size:13px;
  white-space:nowrap;
  cursor:pointer;
  position:relative;
}
.funding-sub-tab.active{
  color:var(--text);
}
.funding-sub-tab.active::after{
  content:'';
  position:absolute;
  left:0;
  right:0;
  bottom:-1px;
  height:2px;
  background:var(--accent-ledger);
  border-radius:999px;
  box-shadow:none;
}
.funding-panel{
  display:none;
}
.funding-panel.active{
  display:block;
}
.funding-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}
.funding-summary-card,
.funding-info-card,
.funding-form-card,
.funding-table-card{
  background:linear-gradient(180deg,var(--bg-panel),var(--bg-surface));
  border:1px solid var(--border-subtle);
  border-radius:8px;
  box-shadow:var(--shadow-subtle);
}
.funding-summary-card{
  padding:14px;
}
.funding-summary-label,
.funding-card-title{
  font-family:'IBM Plex Mono',monospace;
  color:var(--muted);
  text-transform:uppercase;
  font-size:10px;
  letter-spacing:1px;
}
.funding-summary-value{
  color:var(--text);
  font-size:22px;
  font-weight:800;
  margin-top:6px;
}
.funding-summary-sub,
.funding-muted{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
  margin-top:4px;
}
.funding-overview-grid{
  display:grid;
  grid-template-columns:1.1fr 1fr 1fr;
  gap:12px;
}
.funding-info-card{
  padding:16px;
}
.funding-big-balance{
  font-size:30px;
  font-weight:900;
  margin:10px 0 6px;
}
.funding-lender-list{
  display:grid;
  gap:8px;
  margin-top:12px;
}
.funding-lender-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:9px 0;
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.funding-lender-row:last-child{
  border-bottom:0;
}
.funding-lender-row strong{
  color:var(--text);
  font-size:13px;
}
.funding-lender-row span{
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-top:2px;
}
.funding-rule-list{
  display:grid;
  gap:10px;
  color:var(--text2);
  font-size:13px;
  line-height:1.45;
  margin-top:12px;
}
.funding-workspace{
  display:grid;
  grid-template-columns:minmax(300px,360px) minmax(0,1fr);
  gap:12px;
  align-items:start;
}
.funding-form-card{
  padding:16px;
}
.funding-form-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.funding-form-title{
  font-size:15px;
  font-weight:800;
  color:var(--text);
}
.funding-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.funding-field.wide{
  grid-column:1 / -1;
}
.funding-field{
  position:relative;
}
.funding-field label{
  display:block;
  margin-bottom:5px;
  color:var(--muted);
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:0.7px;
}
.funding-input{
  width:100%;
  background:var(--bg-input);
  border:1px solid var(--border-strong);
  color:var(--text);
  border-radius:7px;
  padding:9px 10px;
  font-size:13px;
}
textarea.funding-input{
  min-height:74px;
  resize:vertical;
}
.funding-suggestions{
  position:absolute;
  top:calc(100% + 4px);
  left:0;
  right:0;
  z-index:25;
  display:grid;
  gap:2px;
  padding:5px;
  background:var(--bg-panel);
  border:1px solid var(--border-strong);
  border-radius:7px;
  box-shadow:0 14px 30px rgba(0,0,0,0.36);
  max-height:190px;
  overflow-y:auto;
}
.funding-suggestion{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  width:100%;
  border:0;
  border-radius:5px;
  padding:7px 8px;
  background:transparent;
  color:var(--text2);
  font:inherit;
  font-size:12px;
  text-align:left;
  cursor:pointer;
}
.funding-suggestion:hover,
.funding-suggestion:focus{
  outline:0;
  background:rgba(143,157,166,0.08);
  color:var(--text);
}
.funding-suggestion span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.funding-suggestion em{
  color:var(--muted);
  font-family:'IBM Plex Mono',monospace;
  font-size:10px;
  font-style:normal;
  flex:0 0 auto;
}
.funding-message{
  min-height:18px;
  margin-top:10px;
  font-size:12px;
}
.funding-message.error{
  color:var(--red);
}
.funding-message.success{
  color:var(--green);
}
.funding-form-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:12px;
}
.funding-table-card{
  min-width:0;
  overflow:hidden;
}
.funding-toolbar{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:12px;
  border-bottom:1px solid var(--border);
}
.funding-toolbar-left,
.funding-toolbar-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.funding-filter-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding:12px;
  border-bottom:1px solid var(--border);
}
.funding-table-card .table-scroll{
  overflow-x:auto;
  max-width:100%;
  scrollbar-width:thin;
  scrollbar-color:var(--border2) transparent;
}
.funding-table{
  min-width:1320px;
}
.funding-table td{
  vertical-align:top;
}
.funding-table th.funding-actions-col,
.funding-table td.funding-actions-col{
  position:sticky;
  right:0;
  z-index:3;
  min-width:128px;
  width:128px;
  background:rgba(18,21,15,0.97);
  box-shadow:-12px 0 18px rgba(7,9,8,0.55);
}
.funding-table th.funding-actions-col{
  z-index:4;
  background:var(--card);
}
.funding-balance-pos{
  color:var(--gold);
  font-weight:800;
}
.funding-balance-neg{
  color:var(--green);
  font-weight:800;
}
.funding-balance-zero{
  color:var(--muted);
  font-weight:700;
}
.funding-row-actions{
  display:flex;
  gap:6px;
  justify-content:flex-end;
}
.funding-row-actions .action-btn{
  font-size:11px;
  background:rgba(255,255,255,0.035);
  border-color:var(--border);
  white-space:nowrap;
}
.funding-empty,
.funding-empty-small{
  color:var(--muted);
  font-size:13px;
  padding:22px;
}
.funding-empty-small{
  padding:10px 0 0;
}

@media (max-width:1100px){
  .funding-summary-grid,
  .funding-overview-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .funding-workspace{
    grid-template-columns:1fr;
  }
}
@media (max-width:720px){
  #section-funding{
    padding:0 0 24px;
    margin-top:-16px;
  }
  .funding-header{
    flex-direction:column;
  }
  .funding-summary-grid,
  .funding-overview-grid{
    grid-template-columns:1fr;
  }
  .funding-form-grid{
    grid-template-columns:1fr;
  }
  .funding-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }
}
