/* ── FICHAS DE BANCO ─────────────────────────── */
#fichasApp { display: none; }
#fichasApp.active { display: block; }

.fichas-outer {
  overflow-x: auto;
  padding: 20px 24px 80px;
  -webkit-overflow-scrolling: touch;
}

.fichas-table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 13px;
}

.fichas-col-hdr {
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
  min-width: 180px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.fichas-col-hdr:first-child {
  background: #F9F8F5;
  color: var(--muted);
  min-width: 200px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fichas-section-row td {
  background: var(--navy);
  color: rgba(255,255,255,.9);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 7px 14px;
  cursor: pointer;
  user-select: none;
}
.fichas-section-row td:hover { background: var(--navy-mid); }
.fichas-section-row.collapsed td { background: #2A3F5F; }
.fichas-section-row .sec-chevron { margin-right: 6px; display: inline-block; transition: transform .2s; }
.fichas-section-row.collapsed .sec-chevron { transform: rotate(-90deg); }

.fichas-section-actions {
  display: inline-flex;
  gap: 6px;
  margin-right: 10px;
  vertical-align: middle;
}
.fichas-sec-btn {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  transition: all .15s;
}
.fichas-sec-btn:hover { background: rgba(255,255,255,.2); color: #fff; }
.fichas-sec-btn.danger:hover { background: rgba(255,80,80,.3); border-color: rgba(255,80,80,.4); }

.fichas-row td {
  padding: 0;
  border-bottom: 1px solid #F2EFE9;
  vertical-align: middle;
}
.fichas-row:hover td { background: #FAF9F5; }
.fichas-row-label {
  padding: 9px 14px !important;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: #F9F8F5 !important;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.fichas-row-label-text { flex: 1; }
.fichas-row-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.fichas-row:hover .fichas-row-actions { opacity: 1; }
.fichas-row-btn {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  transition: all .15s;
}
.fichas-row-btn:hover { border-color: #FFBBBB; color: #8B0000; background: #FFF3F3; }

.fichas-cell {
  position: relative;
  min-width: 180px;
}

.fichas-cell-inner {
  display: flex;
  align-items: flex-start;
  padding: 8px 12px;
  gap: 6px;
  min-height: 38px;
}

.fichas-cell-ta {
  flex: 1;
  border: none;
  background: none;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: var(--text);
  resize: none;
  outline: none;
  min-height: 22px;
  line-height: 1.45;
  padding: 0;
  overflow: hidden;
}
.fichas-cell-ta:focus { background: rgba(200,146,42,.05); border-radius: 3px; }
.fichas-cell-ta::placeholder { color: #C8C3B8; }

.fichas-ts {
  font-size: 9px;
  color: rgba(0,0,0,.2);
  white-space: nowrap;
  padding-top: 3px;
  flex-shrink: 0;
}

.fichas-saving {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 999;
}
.fichas-saving.show { opacity: 1; }

.fichas-bank-logo {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: contain; background: rgba(255,255,255,.15);
  flex-shrink: 0; cursor: pointer;
  border: 1.5px solid rgba(255,255,255,.2);
  transition: border-color .15s;
}
.fichas-bank-logo:hover { border-color: rgba(255,255,255,.6); }
.fichas-bank-initials {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.15); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: rgba(255,255,255,.8);
  cursor: pointer; border: 1.5px solid rgba(255,255,255,.2);
  transition: border-color .15s;
}
.fichas-bank-initials:hover { border-color: rgba(255,255,255,.6); }
.fichas-col-hdr-inner { display: flex; align-items: center; gap: 7px; }
.fichas-col-collapsed { min-width: 44px !important; width: 44px; cursor: pointer; }
.fichas-col-collapsed .fichas-col-hdr-inner span { display: none; }
.fichas-cell-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); margin: auto;
}

.fichas-col-hdr.fichas-drag-over { border-left: 3px solid var(--gold) !important; }
.fichas-drag-over-row { background: rgba(200,146,42,.12) !important; outline: 1px solid var(--gold); }

@media (max-width: 600px) {
  .fichas-outer { padding: 8px 0 60px; }
}
