/* Mismos colores que el Facturador: gris pizarra y el azul de la marca */
:root {
  --fondo: #f1f5f9;
  --tarjeta: #fff;
  --texto: #0f172a;
  --suave: #64748b;
  --borde: #e2e8f0;
  --marca: #2563eb;
  --marca-oscuro: #1d4ed8;
  --ok: #059669;
  --mal: #dc2626;
  --aviso: #d97706;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--fondo);
  color: var(--texto);
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }

.barra {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: #0f172a; color: #fff;
}
.barra h1 { margin: 0; font-size: 18px; }
.barra .sub { color: #94a3b8; margin: 0; }
.derecha { display: flex; align-items: center; gap: 12px; }
.cambiar { font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .25); border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.punto { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgb(5 150 105 / .25); }
.punto.caido { background: var(--mal); box-shadow: 0 0 0 3px rgb(220 38 38 / .25); }

.vista { padding: 16px; max-width: 520px; margin: 0 auto; }
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 14px; padding: 16px; box-shadow: 0 1px 2px rgb(15 23 42 / .05); }
.tarjeta h2 { margin: 0 0 4px; font-size: 18px; }
.centro { text-align: center; }
.sub { color: var(--suave); margin: 2px 0 0; font-size: 14px; }
.ayuda { color: var(--suave); font-size: 14px; margin: 12px 2px; }
.rotulo { margin: 0; color: var(--suave); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.monto { margin: 4px 0; font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.error { color: var(--mal); background: #fef2f2; border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; font-size: 14px; }

form label { display: block; margin-top: 12px; font-size: 13px; color: var(--suave); font-weight: 500; }
input:not([type=file]), select {
  display: block; width: 100%; margin-top: 4px; height: 46px; padding: 0 12px;
  font: inherit; color: var(--texto); background: #fff;
  border: 1px solid #cbd5e1; border-radius: 10px; outline: none;
}
textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; resize: vertical;
  font: inherit; color: var(--texto); background: #fff;
  border: 1px solid #cbd5e1; border-radius: 10px; outline: none;
}
.campo { display: block; margin-top: 12px; }
textarea:focus,
input:focus, select:focus { border-color: var(--marca); box-shadow: 0 0 0 4px rgb(37 99 235 / .15); }

.boton {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; margin-top: 10px; padding: 0 16px;
  font: inherit; font-weight: 600; color: var(--texto);
  background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; cursor: pointer;
}
.boton.primario { background: var(--marca); border-color: var(--marca); color: #fff; }
.boton.primario:active { background: var(--marca-oscuro); }
.boton.grande { min-height: 60px; font-size: 18px; }
.boton:disabled { opacity: .55; }
.enlace { display: block; margin: 20px auto 0; background: none; border: 0; color: var(--suave); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.enlace.peligro { color: var(--mal); }
.enlace.volver { margin: 0 0 12px; text-decoration: none; color: var(--marca); font-weight: 600; }
.acciones { margin-top: 8px; }

/* Cobros pendientes */
.cobro {
  display: block; width: 100%; text-align: left; margin-bottom: 12px; padding: 16px;
  font: inherit; color: inherit; background: #fff; border: 2px solid var(--marca); border-radius: 14px; cursor: pointer;
  box-shadow: 0 4px 14px rgb(37 99 235 / .12); animation: entra .25s ease-out;
}
.cobro .monto { font-size: 32px; margin: 0; }
.cobro .fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cobro .ir { color: var(--marca); font-weight: 600; white-space: nowrap; }
.cobro.enviando { border-color: var(--aviso); box-shadow: none; }
@keyframes entra { from { transform: translateY(6px); opacity: 0; } }

.vacio { text-align: center; color: var(--suave); margin: 48px 16px; }
.reloj { display: block; width: 36px; height: 36px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--borde); border-top-color: var(--marca); animation: gira 1.2s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

.seccion { margin: 28px 2px 8px; font-size: 13px; color: var(--suave); text-transform: uppercase; letter-spacing: .04em; }
.recientes { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; }
.recientes li { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--borde); font-size: 14px; }
.recientes li:first-child { border-top: 0; }
.recientes .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.etiqueta { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #f1f5f9; color: var(--suave); }
.etiqueta.aprobado { background: #ecfdf5; color: var(--ok); }
.etiqueta.rechazado { background: #fef2f2; color: var(--mal); }

.camara { display: block; width: 100%; max-height: 60dvh; object-fit: contain; background: #0f172a; border-radius: 12px; }
.tilde.aviso { background: #eff6ff; }
.previa { display: block; width: 100%; max-height: 55dvh; object-fit: contain; background: #0f172a; border-radius: 12px; }
.progreso { height: 6px; margin-top: 10px; background: var(--borde); border-radius: 99px; overflow: hidden; }
.progreso span { display: block; height: 100%; width: 0; background: var(--marca); transition: width .2s; }

.tilde { width: 64px; height: 64px; margin: 8px auto 12px; display: grid; place-items: center; border-radius: 50%; background: #ecfdf5; color: var(--ok); font-size: 34px; font-weight: 700; }

/* Fotos pedidas por el Facturador (remitos del informe de carga): el título va más chico que un monto */
.monto.chico, .cobro .monto.chico { font-size: 22px; letter-spacing: 0; }
.cobro.foto { border-left: 4px solid #6366f1; }

/* Comprobantes de entrega (tareas de Asana de la sucursal) */
.boton .cuenta { min-width: 24px; padding: 1px 8px; border-radius: 99px; background: var(--marca); color: #fff; font-size: 13px; }
.cobro.entrega { border-color: #059669; border-left-width: 4px; box-shadow: none; }
.cobro.entrega .ir { color: #059669; }
.titulo-vista { margin: 0 2px 12px; font-size: 18px; }
