/* Fuente y fondo general */
body {
  min-height: 100vh;
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f6f6f7;
  position: relative;
  overflow-x: hidden;
}

/* Triángulos decorativos */
.triangle-bg {
  position: absolute;
  width: 0; height: 0;
  z-index: 0;
}
.tri-1 {
  border-left: 170px solid #771d24;
  border-bottom: 155px solid transparent;
  left: 0; top: 0;
}
.tri-2 {
  border-right: 160px solid #ae3842;
  border-top: 110px solid transparent;
  right: 0; top: 0;
}
.tri-3 {
  border-right: 100px solid #e7d4d6;
  border-bottom: 90px solid transparent;
  right: 0; bottom: 0;
}
.tri-4 {
  border-left: 80px solid #ddd;
  border-top: 80px solid transparent;
  left: 0; bottom: 0;
}

/* Panel Box */
.panel-box {
  background: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 3px 18px #0001;
  width: 370px;
  margin: 70px auto 20px auto;
  padding: 2.1rem 2rem 1.6rem 2rem;
  position: relative;
  z-index: 2;
  border: 1.3px solid #ececec;
}

.panel-logo {
  display: block;
  margin: 0 auto 13px auto;
  max-width: 85px;
}
.panel-title {
  color: #771d24;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: .5rem;
  letter-spacing: 0.02em;
}
.panel-desc {
  text-align: center;
  color: #7b2128;
  font-size: .99rem;
  margin-bottom: 1.3rem;
  font-weight: 500;
}
.panel-links {
  text-align: center;
  margin-bottom: 1.2em;
  font-size: .99em;
}
.panel-links a {
  color: #ae3842;
  text-decoration: underline;
  margin: 0 .35em;
}
.panel-label {
  color: #771d24;
  font-weight: 600;
  font-size: 1em;
  margin-bottom: .22rem;
  display: block;
}
.panel-row {
  display: flex;
  gap: .75em;
  align-items: center;
  margin-bottom: .75em;
}
.panel-btn, .panel-btn-sec {
  font-size: 1em;
  padding: .62em 1.2em;
  border-radius: .52em;
  font-weight: 600;
  cursor: pointer;
  border: none;
  margin-right: .25em;
  margin-top: 0;
}
.panel-btn {
  background: #771d24;
  color: #fff;
  transition: background .18s;
  box-shadow: 0 2px 6px #771d2422;
}
.panel-btn:hover {
  background: #ae3842;
}
.panel-btn-sec {
  background: #f4e6e8;
  color: #771d24;
  border: 1.3px solid #ae3842;
}
.panel-btn-sec:hover {
  background: #ece4e4;
  border-color: #771d24;
}
select {
  flex: 1 1 60%;
  padding: .55em .6em;
  border-radius: .5em;
  border: 1.2px solid #ae3842;
  font-size: 1em;
  background: #faf9f9;
  color: #771d24;
}
.panel-msg {
  color: #c62828;
  margin-top: .7em;
  min-height: 1.2em;
  text-align: center;
  font-size: 0.96em;
  font-weight: 600;
}
.panel-footer {
  width: 100%;
  text-align: center;
  color: #9d7478;
  margin-top: 3.2rem;
  font-size: 0.94rem;
  z-index: 2;
  letter-spacing: 0.01em;
}
@media (max-width: 500px) {
  .panel-box { width: 97vw; padding: 1.1rem 1rem 1.2rem 1rem;}
  .panel-logo { max-width: 55px; }
  .panel-title { font-size: 1.12rem;}
}
body { margin: 0; font-family: 'Inter', Arial, sans-serif; background: #323848;}
.panel-formato1 { max-width:1200px; margin:30px auto; background: #fff; border-radius: 22px; box-shadow: 0 2px 20px #a5745a18; padding: 24px 26px 24px 26px;}
.encabezado { display: flex; align-items: center; gap: 18px; background: #792929; color: #fff; border-radius: 18px; margin-bottom: 15px; padding: 18px 28px; }
.encabezado .logo { height: 56px; border-radius: 12px; margin-right: 12px; background: #fff; }
.encabezado h2 { margin: 0 0 2px 0; color: #fff; font-weight: 700;}
.encabezado .volver { background: #fff7; color: #b03e3c; font-weight: 600; padding: 7px 22px; border: none; border-radius: 9px;}
.bloque { background: #f6d7c9; color: #742626; border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; font-size:1.07rem;}
.tabla-formato1 {margin-top:20px; width:100%; overflow-x:auto;}
table.formato1 { width:100%; border-collapse: collapse; background: #fff; }
table.formato1 th, table.formato1 td { border:1px solid #d1c2b7; padding: 7px 9px; text-align: right; font-size: 14px;}
table.formato1 th { background: #fae1a2; color: #7a4a08; font-weight: 600; text-align: center;}
.fila-mayor { background: #fdf6e7; font-weight:700; color: #7a4a08;}
.fila-subcuenta { background: #fffbe4; color: #885e07;}
.debe { color: #1a8c46; font-weight:500;}
.haber { color: #c44220; font-weight:500;}
.saldo { color: #32568a; font-weight:700;}
.error { color:#b91c1c; margin:15px 0; }
