/* Cuentas bancarias (modal de Base administrativa) y los selectores de archivo de toda la consola, al estilo de shadcn/ui. */

/* ── Input de archivo (shadcn «File picker»): caja de 36px con el botón «Choose file» como texto en negrita ── */
input[type="file"] {
  display: flex; align-items: center; width: 100%; max-width: 100%; min-width: 0; height: 36px; padding: 0 12px 0 0;
  font: inherit; font-size: 14px; color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: calc(var(--radius) - 2px); box-shadow: var(--sombra);
  cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
input[type="file"]:hover { background: hsl(var(--mutedbg) / .5); }
input[type="file"]:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
input[type="file"]:disabled { opacity: .5; cursor: not-allowed; }
input[type="file"]::file-selector-button {
  height: 100%; margin: 0 12px 0 0; padding: 0 14px; font: inherit; font-size: 14px; font-weight: 500; color: var(--txt);
  background: transparent; border: 0; border-right: 1px solid var(--line); border-radius: 0; cursor: pointer;
}
input[type="file"]:hover::file-selector-button { background: hsl(var(--mutedbg)); }

/* ── Cuentas bancarias ── */
.cu-tabs { margin-bottom: 16px; align-items: center; }
.cu-tabs .ayuda { margin-left: 4px; }
.cu-panel[hidden] { display: none; }
.cu-panel > .muted { margin: 0 0 14px; max-width: 70ch; }
.cu-msg { margin: 8px 0 0; font-size: 13px; color: var(--muted); min-height: 1em; }
.cu-msg.err, .cu-out.err { color: var(--rojo); }
.cu-msg.ok { color: var(--verde); }
#cu-lista { display: grid; gap: 12px; margin-top: 12px; }
.cu-cuenta { padding: 16px; border: 1px solid var(--line); border-radius: var(--radio); background: var(--card); box-shadow: var(--sombra); }
.cu-cab { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.cu-cab b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.cu-rango { margin: 4px 0 12px; font-size: 13px; }
.cu-acc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cu-acc input[type="file"] { flex: 1 1 280px; width: auto; }
.cu-acc button { height: 36px; padding-top: 0; padding-bottom: 0; }
.cu-out { margin: 10px 0 0; font-size: 13px; white-space: pre-line; min-height: 0; color: var(--muted); }
.cu-out:empty { display: none; }
.cu-conf { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cu-conf > button { margin-top: 12px; }
#cu-nueva { margin-top: 12px; }
#cu-nueva .cu-cuenta { border-style: dashed; }
#cu-hist td.num, #cu-hist th.num { text-align: right; }
.cu-off td { opacity: .55; }
#cu-hist-card .scroll { border: 1px solid var(--line); border-radius: var(--radio); overflow: auto; background: var(--card); }

input[type="file"][hidden] { display: none; }
.fila > input[type="file"] { flex: 1 1 260px; width: auto; }

/* La cabecera del modal: título «Ajustes» y, al lado, las pestañas (la forma del modal de Ajustes de Conciliar). */
.mbox.cuentas { max-width: min(960px, calc(100vw - 2rem)); min-height: min(72vh, 620px); }
.mbox.cuentas > h3 { display: flex; align-items: center; gap: 16px; margin: 0 0 16px; padding-right: 48px; font-size: 18px; }
.mbox.cuentas > h3 .cu-tabs { margin: 0; }

/* Pestañas como las del modal de Ajustes de Conciliar: tira gris con borde y cada pestaña una caja blanca con sombra; la elegida va en azul. */
.mbox.cuentas .cu-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radio); background: hsl(var(--mutedbg)); box-shadow: none; }
.mbox.cuentas .cu-tabs button { background: var(--card); color: var(--txt); border: 1px solid var(--line); border-radius: calc(var(--radio) - 4px); box-shadow: var(--sombra); font-weight: 500; padding: 6px 14px; }
.mbox.cuentas .cu-tabs button:hover { background: var(--card); color: var(--txt); opacity: 1; }
.mbox.cuentas .cu-tabs button.on, .mbox.cuentas .cu-tabs button[aria-selected="true"] { color: hsl(var(--primary)); font-weight: 600; }

/* Historial: celdas sin partir y una acción compacta. */
#cu-hist td.nw { white-space: nowrap; }
#cu-hist td.cu-acc-td { text-align: right; white-space: nowrap; }
#cu-hist td.cu-acc-td .chip { margin-right: 8px; vertical-align: middle; }
#cu-hist td button.sm { height: 30px; padding: 0 12px; font-size: 13px; }

/* Modal «Importar estado de cuenta»: aire entre el texto, la cuenta, el archivo y el resultado. */
.cu-imp { display: flex; flex-direction: column; gap: 18px; }
.cu-imp > p { margin: 0; line-height: 1.6; }
.cu-imp .cu-out { margin: 0; }
.cu-imp .cu-acc { flex-wrap: nowrap; }
.cu-imp .cu-acc select { flex: 0 0 240px; width: 240px; min-width: 0; }
.cu-imp .cu-acc input[type="file"] { flex: 1 1 0; width: 0; min-width: 120px; }
.cu-imp .cu-acc button { flex: 0 0 auto; white-space: nowrap; }
