@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;600;700&family=IBM+Plex+Mono:wght@400;700&display=swap');

:root {
  --azul: #2B2BE0;
  --azul-oscuro: #1E1EAE;
  --tinta: #14141B;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: #F5F5F8;
  font-family: 'IBM Plex Sans', system-ui, sans-serif; color: var(--tinta);
}
header { background: #FFFFFF; border-bottom: 1px solid #E5E5EE; padding: 36px 24px 40px; }
.header-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--azul); margin-bottom: 10px; }
h1 { margin: 0; font-size: 36px; font-weight: 700; letter-spacing: .02em; }
h1 .accent { color: var(--azul); }
.subtitle { margin: 10px 0 0; max-width: 540px; line-height: 1.5; color: #5C5C6E; font-size: 15px; }
.logo { flex: 0 0 auto; height: 120px; width: auto; }

.topnav { background: #FFFFFF; border-bottom: 1px solid #E5E5EE; }
.topnav-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; }
.nav-link { padding: 14px 16px; font-size: 14px; font-weight: 600; color: #63637A; text-decoration: none; border-bottom: 2px solid transparent; }
.nav-link:hover { color: var(--azul); }
.nav-link.active { color: var(--azul); border-bottom-color: var(--azul); }

main { max-width: 1100px; margin: 0 auto; padding: 32px 24px 48px; }

.dropzone {
  background: #FFFFFF; border: 2px dashed #C5C5E0; border-radius: 14px;
  padding: 36px 24px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s; box-shadow: 0 6px 24px rgba(43,43,224,.08);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--azul); background: #FBFBFF; outline: none; }
.dropzone.over { border-color: var(--azul); background: #F0F0FE; }
.drop-icon { font-size: 30px; margin-bottom: 8px; color: var(--azul); }
.drop-title { font-size: 17px; font-weight: 600; }
.drop-hint { font-size: 13px; color: #7A7A8C; margin-top: 6px; }

.table-section { margin-top: 40px; display: none; }
.table-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.table-title { margin: 0; font-size: 20px; font-weight: 600; }
.badge { font-family: 'IBM Plex Mono', monospace; font-size: 13px; background: #E6E6FA; color: var(--azul); border-radius: 999px; padding: 2px 10px; margin-left: 6px; }
.warn { background: #FCF4E4; border: 1px solid #E8D5A8; color: #7A5C1E; border-radius: 8px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 12px; line-height: 1.45; display: none; }

.tabla { background: #FFFFFF; border: 1px solid #E0E0EA; border-radius: 10px; overflow: hidden; }
.tr { display: flex; align-items: stretch; border-bottom: 1px solid #EEEEF4; }
.tr:hover { background: #FAFAFD; }
.thead { background: #F3F3F8; border-bottom: 1px solid #E0E0EA; }
.thead:hover { background: #F3F3F8; }
.th { padding: 10px 12px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #63637A; }
.td { padding: 6px 8px; display: flex; align-items: center; }
.tfoot { background: #F7F7FD; border-bottom: none; justify-content: space-between; }
.tfoot:hover { background: #F7F7FD; }
.row-status { padding: 12px 14px; font-size: 14px; color: #63637A; display: flex; align-items: center; gap: 8px; flex: 1; }
.row-status.error { color: #B3402A; }
.row-status.ok { color: #1E7A4D; }

.cell {
  width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 7px 8px;
  font-size: 14px; font-family: 'IBM Plex Sans', system-ui, sans-serif;
  background: transparent; color: var(--tinta); transition: border-color .12s, background .12s;
}
.cell.mono { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.cell:hover { background: #F3F3F8; }
.cell:focus { outline: none; border-color: var(--azul); background: #FFFFFF; }
.cell.falta { background: #FCF4E4; border-color: #E8D5A8; }
.cell.falta::placeholder { color: #B08D3C; }
.mono-static { font-family: 'IBM Plex Mono', monospace; font-size: 13px; padding: 7px 12px; }

/* Proveedor sin identificar (CUIT no está en la base) */
.prov-falta { color: #C0341F; font-weight: 700; }
/* Fila de factura marcada como pagada */
.fila-pagada { background: #EAF7EE !important; }
.fila-pagada:hover { background: #E0F2E7 !important; }

/* Buscador de colaboradores */
.buscador { position: relative; margin-bottom: 14px; max-width: 380px; }
.buscador-lupa { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .6; pointer-events: none; }
.buscador input {
  width: 100%; padding: 10px 12px 10px 36px;
  border: 1px solid #D5D5E5; border-radius: 8px;
  font-family: inherit; font-size: 14px; color: var(--tinta); background: #FFF;
}
.buscador input:focus { outline: none; border-color: var(--azul); }

.btn {
  font-family: inherit; font-size: 14px; font-weight: 600; color: #FFF; background: var(--azul);
  border: none; border-radius: 8px; padding: 10px 18px; cursor: pointer; transition: background .15s;
}
.btn:hover:not(:disabled) { background: var(--azul-oscuro); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--azul); border: 1px solid #C5C5E0; }
.btn.ghost:hover:not(:disabled) { background: #F0F0FE; }
.btn-del { border: none; background: transparent; color: #9A9AAE; font-size: 20px; line-height: 1; cursor: pointer; border-radius: 6px; padding: 4px 8px; }
.btn-del:hover { color: #B3402A; background: #FBEDE9; }
.btn-add { margin-top: 10px; border: 1px dashed #C5C5E0; background: transparent; color: var(--azul); font-family: inherit; font-size: 13.5px; font-weight: 600; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.btn-add:hover { background: #F0F0FE; border-color: var(--azul); }

.nota { font-size: 13px; color: #7A7A8C; margin-top: 12px; line-height: 1.5; }
.empty { margin-top: 36px; text-align: center; color: #9494A6; font-size: 14px; }

/* Cartel de éxito en el home (verde, grande, check al inicio del cartel visual) */
.success-box {
  margin-top: 28px;
  background: #EAF7EE;
  border: 1px solid #A8DBB8;
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
}
.success-check {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  background: #1E9E52;
  color: #FFFFFF;
  border-radius: 50%;
  font-size: 32px;
  line-height: 56px;
  font-weight: 700;
}
.success-title {
  font-size: 19px;
  font-weight: 700;
  color: #14663A;
  margin-bottom: 16px;
}
.success-list { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.success-item {
  background: #FFFFFF;
  border: 1px solid #CDE9D6;
  border-radius: 10px;
  padding: 10px 16px;
  min-width: 280px;
  max-width: 520px;
  width: 100%;
}
.success-rs { display: block; font-weight: 600; color: #14141B; font-size: 15px; }
.success-meta { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: #4A7A5C; margin-top: 2px; }

.chk { width: 18px; height: 18px; accent-color: var(--azul); cursor: pointer; }
.date-input { border: 1px solid #D5D5E5; border-radius: 6px; padding: 6px 8px; font-family: inherit; font-size: 13px; }
.date-input:focus { outline: none; border-color: var(--azul); }

footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid #E5E5EE; display: flex; justify-content: center; }
footer img { height: 48px; width: auto; opacity: .7; }

.spinner { width: 14px; height: 14px; border: 2px solid #E6E6FA; border-top-color: var(--azul); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* Login backoffice */
.login-wrap { max-width: 440px; margin: 60px auto; background: #FFF; border: 1px solid #E0E0EA; border-radius: 14px; padding: 40px 32px; text-align: center; box-shadow: 0 8px 32px rgba(43,43,224,.08); }
.login-wrap h2 { margin: 0 0 8px; font-size: 22px; }
.login-wrap p { color: #63637A; font-size: 14px; line-height: 1.5; margin: 0 0 24px; }
.login-error { background: #FBEDE9; border: 1px solid #E8B8A8; color: #B3402A; border-radius: 8px; padding: 10px 14px; font-size: 13.5px; margin-top: 20px; }
.gsi-holder { display: flex; justify-content: center; }
.admin-bar { max-width: 1100px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: #63637A; }
.admin-bar .who { font-weight: 600; color: var(--tinta); }

@media (max-width: 640px) { .dropzone { padding: 26px 16px; } .logo { height: 72px; } h1 { font-size: 28px; } }
