/* informes.css */

#informesScreen .grid-panel {
  background: linear-gradient(180deg, #1d3a6e 0%, #0f2f5d 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(12, 33, 69, 0.18);
  overflow: hidden;
  height: 100%;
}

#informesScreen .grid-container {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

#informesScreen .grid-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

#informesScreen .toolbar-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

#informesScreen .grid-actions-row {
  padding: 16px 24px 0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#informesScreen .grid-actions-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

#informesScreen .grid-actions-row .search-label {
  margin-left: auto;
  width: 300px;
}

#informesScreen #exportPdfBtn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#informesScreen .filter-select {
  background: rgba(244, 247, 255, 0.92);
  border: 1px solid rgba(15, 42, 98, 0.12);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 140px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

#informesScreen .grid-actions-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  color: #ffffff;
  font-weight: 500;
}

#informesScreen .table-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 24px 24px;
  scrollbar-gutter: stable;
}

#informesScreen .data-grid {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

#informesScreen .data-grid th {
  position: sticky;
  top: 0;
  background: #1d3a6e;
  color: #f7fbff;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  z-index: 10;
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

#informesScreen .data-grid th:last-child {
  border-right: none;
}

#informesScreen .data-grid td {
  padding: 8px 12px;
  color: #f4f7ff;
  line-height: 1.2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

#informesScreen .data-grid td:last-child {
  border-right: none;
}

#informesScreen .data-grid tbody tr {
  transition: background 0.16s ease;
  background: transparent;
}

#informesScreen .data-grid tbody tr:hover {
  background: rgba(100, 140, 200, 0.25);
}

#informesScreen .data-grid td.monto-cell {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  font-size: 0.8rem;
}

#informesScreen .data-grid td.negative {
  color: #ff6b6b;
  font-weight: 600;
}

#informesScreen .data-grid tr.subtotal-row td.negative,
#informesScreen .data-grid tr.moneda-subtotal-row td.negative {
  color: #ff6b6b;
}

#informesScreen .data-grid tr.subtotal-row td {
  background: rgba(74, 111, 165, 0.15);
  border-top: 2px solid rgba(74, 111, 165, 0.3);
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
}

#informesScreen .data-grid tr.subtotal-row td:first-child {
  padding-left: 32px;
}

#informesScreen .collapse-toggle {
  display: inline-block;
  width: 1.2em;
  text-align: center;
  font-weight: 700;
  user-select: none;
}

#informesScreen .collapse-toggle.expanded {
  color: #ff6b6b;
}

#informesScreen .collapse-toggle.collapsed {
  color: #7cb342;
}

#informesScreen .data-grid tr.moneda-subtotal-row td {
  background: rgba(100, 140, 200, 0.3);
  border-top: 2px solid rgba(100, 140, 200, 0.5);
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
}

#informesScreen .data-grid tr.moneda-subtotal-row td.negative {
  color: #ff6b6b;
}

#informesScreen .detail-row.hidden {
  display: none;
}



#informesScreen .grid-footer {
  margin-top: auto;
  padding: 8px 24px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
  color: var(--muted);
  flex-shrink: 0;
}

#informesScreen .hidden {
  display: none !important;
}

@media print {
  body * {
    visibility: hidden;
  }
  #informesScreen,
  #informesScreen * {
    visibility: visible;
  }
  #informesScreen {
    position: absolute;
    inset: 0;
  }
  #informesScreen .grid-panel {
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }
  #informesScreen .grid-toolbar,
  #informesScreen .grid-actions-row,
  #informesScreen .grid-footer {
    display: none;
  }
  #informesScreen .table-wrapper {
    overflow: visible;
    padding: 0;
  }
  #informesScreen .data-grid {
    background: #fff;
    border-radius: 0;
  }
  #informesScreen .data-grid th {
    background: #1d3a6e !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #informesScreen .data-grid td {
    color: #000;
    border-bottom: 1px solid #ccc;
  }
  #informesScreen .data-grid tr.subtotal-row td {
    background: #eef3fb !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #informesScreen .data-grid tr.moneda-subtotal-row td {
    background: #d6e4f0 !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #informesScreen .data-grid td.negative {
    color: #c0392b !important;
  }
}
