/* ===== Reset ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: white;
  display: flex;
  justify-content: center;
  width: 100%;
  color: #1a1a1a;
}

/* ===== Contenedor ===== */
.container {
  width: 100%;
  max-width: 100%;
  padding: 20px;
  margin-top: 96px;
}

/* ======================================================
   HEADER — Logo izquierda + título centrado real
====================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 88px;
  background: linear-gradient(135deg, #0033aa, #001f66);
  display: flex;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-inner {
  position: relative;
  width: 100%;
  max-width: 1400px;
  height: 100%;
}

/* Logo correctamente alineado */
.logo {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  height: 48px;
  width: auto;
}

/* Título centrado horizontal y vertical */
.title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 26px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.4px;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

/* ===== Saldo ===== */
.saldo-card {
  background: #f4f4f4;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  text-align: center;
  border-left: 5px solid #0033aa;
}

.saldo-card h2 {
  font-size: 14px;
  color: #0033aa;
  margin-bottom: 6px;
}

.saldo-valor {
  font-size: 26px;
  font-weight: 700;
}

.saldo-positivo { color: #1f8f2f; }
.saldo-negativo { color: #d93939; }

/* ===== Caja Sección ===== */
.section-box {
  background: #fff;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid #e8eefc;
  box-shadow: 0 3px 8px rgba(0,0,0,0.04);
}

.section-box h2 {
  font-size: 15px;
  color: #0033aa;
  margin-bottom: 10px;
}

/* ===== Checkbox WhatsApp ===== */
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

/* ===== FORMULARIO ===== */
.form-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.inputs-col {
  width: 65%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.small-input {
  height: 34px;
  padding: 6px 8px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #cddaf8;
}

/* Botones */
.button-box {
  width: 35%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.btn {
  height: 32px;
  width: 100%;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ingreso { background: #1f8f2f; }
.gasto   { background: #d93939; }

/* ===== TABLA HISTORIAL ===== */
.tabla {
  width: 100%;
  border: 1px solid #d5dfff;
  border-radius: 8px;
  overflow: hidden;
}

.tabla-header {
  display: grid;
  grid-template-columns: 100px 70px 1fr 80px;
  column-gap: 20px;
  background: #0033aa;
  color: white;
  font-weight: 700;
  padding: 8px 10px;
  font-size: 14px;
}

.tabla-body {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tabla-row {
  display: grid;
  grid-template-columns: 100px 70px 1fr 80px;
  column-gap: 20px;
  padding: 10px 10px;
  font-size: 14px;
  border-bottom: 1px solid #e4e8ff;
}

.tabla-row:last-child {
  border-bottom: none;
}

.tabla-row span {
  display: flex;
  align-items: center;
}

.tipo-verde { color: #1f8f2f; font-weight: 700; }
.tipo-rojo  { color: #d93939; font-weight: 700; }

/* ===== PAGINACIÓN ===== */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 10px;
}

.pagination button {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: #0033aa;
  color: white;
  font-size: 13px;
  cursor: pointer;
}

.pagination button:disabled {
  background: #9fb3e6;
  cursor: not-allowed;
}

#lblSemana {
  font-weight: 700;
  font-size: 13px;
  color: #0033aa;
}

/* ======================================================
   MOBILE
====================================================== */
@media (max-width: 768px) {

  .header {
    height: 64px;
  }

  .logo {
    height: 34px;
    left: 14px;
  }

  .title {
    font-size: 18px;
  }

  .container {
    margin-top: 72px;
    padding: 15px;
  }

  .tabla-header,
  .tabla-row {
    grid-template-columns: 80px 60px 1fr 70px;
    column-gap: 10px;
    font-size: 13px;
  }

  .small-input { font-size: 13px; }
  .btn { font-size: 13px; height: 30px; }
}
