/* Eureka WebUI sobre ZK10 - reportes HTML.
   Hoja autónoma: tabla, encabezado fijo, totales y espaciado final. */

.rp-href {
	color: #000000;
}

.rp-table-container {
  max-height: 600px;
  overflow-y: auto;
  position: relative;          /* necesario para sticky */
  overflow-anchor: none;       /* evita posiciones raras tras refrescar */
}

/* === Cabecera pegajosa === */
/* Nota: los <th> están en el primer <tr> del <tbody>, no en <thead> */
.rp-table tbody tr:first-child th {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: #1F9BDE;
  color: #FFF;
}

/* === Tabla base === */
.rp-table {
  border-collapse: collapse;
  width: 90%;
  font-family: sans-serif;
  font-size: smaller;
  border: 1px solid #BBBBBB;
}

/* Encabezados */
.rp-table th {
  text-align: center;
  padding: 4px 6px;
  font-weight: bold;
  background-color: #1F9BDE;
  color: #FFF;
  border: 1px solid #FFF;
}
.rp-table th:last-child {
  border-right: none;
}

/* Celdas */
.rp-table td {
  border: 1px solid #BBBBBB;
  padding: 3px 6px;
  vertical-align: top;
}
.rp-table td:last-child {
  border-right: none;
}

/* Alineación */
.rp-number { text-align: right !important; }
.rp-text, .rp-date { text-align: left; }

/* Fila de totales/funciones */
.rp-functionrow td {
  background-color: #D6EAF6;
  font-weight: bold;
  border: 1px solid #BBBBBB;
  white-space: nowrap;
  padding: 3px;
  height: 24px;
  box-sizing: border-box;
}

/* Fila impar */
.rp-odd {
  background-color: #f7f7f7;
}

/* Espaciador real al final del contenido (para que no se corte al refrescar) */
body::after,
.rp-table-container::after {
  content: "";
  display: block;
  height: 48px;
}

.rp-table-container {
	max-height: 600px;
	overflow-y: auto;
	position: relative;
	overflow-anchor: none;
}

/* Los reportes generan los encabezados dentro del primer tr del tbody. */
.rp-table tbody tr:first-child th {
	position: sticky;
	top: 0;
	z-index: 20;
	background-color: #1F9BDE;
	color: #FFF;
}

.rp-functionrow td {
	white-space: nowrap;
	height: 24px;
	box-sizing: border-box;
}

body::after,
.rp-table-container::after {
	content: "";
	display: block;
	height: 48px;
}

/* Eureka native print-format customization (ZK components rendered from Java). */
.ek-print-copy-window,
.ek-print-custom-window {
	border-radius: 10px;
	box-shadow: 0 14px 35px rgba(18, 48, 71, .24);
}

.ek-print-copy-body,
.ek-print-custom-shell {
	box-sizing: border-box;
	padding: 18px;
	background: #f7fafc;
}

.ek-print-copy-help,
.ek-print-custom-legend {
	display: block;
	margin-bottom: 10px;
	color: #506579;
}

.ek-print-copy-name,
.ek-print-custom-input,
.ek-print-custom-select,
.ek-print-custom-mini-select,
.ek-print-custom-number {
	box-sizing: border-box;
	width: 100%;
}

.ek-print-copy-validation {
	min-height: 20px;
	margin-top: 5px;
	color: #b42318;
}

.ek-print-copy-actions,
.ek-print-custom-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 14px;
}

/* Keeps copy-dialog actions consistent with the native report designer commands. */
.ek-print-action-button {
	min-width: 104px;
	min-height: 38px;
	padding: 7px 16px;
	border-radius: 5px;
	box-shadow: 0 2px 6px rgba(20, 61, 89, .18);
	font-weight: 600;
}

.ek-print-primary-button {
	background: #0877b9;
	border-color: #0877b9;
	color: #fff;
}

.ek-print-secondary-button {
	background: #fff;
	border-color: #b8c7d2;
	color: #253b4a;
}

.ek-print-custom-header {
	display: grid;
	grid-template-columns: minmax(220px, 1.4fr) minmax(200px, 1fr);
	gap: 10px 14px;
	margin-bottom: 12px;
}

.ek-print-custom-field,
.ek-print-custom-label {
	display: block;
}

.ek-print-custom-label {
	margin-bottom: 4px;
	font-weight: 600;
	color: #29485d;
}

.ek-print-custom-flags {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 4px 0 12px;
}

.ek-print-custom-items {
	width: 100%;
	border: 1px solid #cad8e2;
	background: #fff;
}

.ek-print-custom-items .z-listbox-body {
	overflow: auto;
}

.ek-print-property {
	display: grid;
	grid-template-columns: minmax(48px, 1fr) 24px;
	align-items: center;
	gap: 3px;
	padding: 2px;
	border-radius: 4px;
}

.ek-print-property-system {
	background: #f1f5f8;
	border: 1px solid transparent;
}

.ek-print-property-custom {
	background: #fff3d6;
	border: 1px solid #f0b84b;
}

.ek-print-property-reset {
	min-width: 22px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #0877b9;
}

/* Eureka master-detail native report designer. */
.ek-pf-editor-window,
.ek-pf-editor {
	height: 100%;
	box-sizing: border-box;
}

.ek-pf-editor {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px 22px;
	overflow-y: auto;
	background: linear-gradient(180deg, #f5f9fc 0, #eef4f8 100%);
}

.ek-pf-title {
	font-size: 22px;
	font-weight: 700;
	color: #123e5b;
}

.ek-pf-titlebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ek-pf-open-button {
	min-width: 76px;
	min-height: 38px;
	padding: 7px 16px;
	border-radius: 4px;
	font-weight: 600;
	box-shadow: 0 2px 6px rgba(20, 61, 89, .18);
}

.ek-pf-header {
	display: grid;
	grid-template-columns: repeat(3, minmax(220px, 1fr));
	gap: 12px 18px;
	padding: 16px;
	border: 1px solid #c9d9e4;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(25, 67, 94, .08);
}

.ek-pf-field,
.ek-pf-label,
.ek-pf-help,
.ek-pf-panel-title {
	display: block;
}

.ek-pf-label {
	margin-bottom: 5px;
	font-weight: 600;
	color: #29485d;
}

.ek-pf-input,
.ek-pf-readonly {
	box-sizing: border-box;
	width: 100%;
}

.ek-pf-readonly {
	display: block;
	min-height: 28px;
	padding: 6px 9px;
	border: 1px solid #d6e1e8;
	border-radius: 4px;
	background: #f1f5f8;
	color: #35566b;
}

.ek-pf-flags {
	display: flex;
	align-items: center;
	gap: 18px;
	min-height: 30px;
}

.ek-pf-help {
	color: #536f82;
}

.ek-pf-body {
	display: grid;
	grid-template-columns: minmax(190px, 24%) 54px minmax(430px, 1fr);
	gap: 10px;
	min-height: 350px;
	flex: 1 1 auto;
}

.ek-pf-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 12px;
	border: 1px solid #c9d9e4;
	border-radius: 10px;
	background: #fff;
}

.ek-pf-panel-title {
	margin-bottom: 9px;
	font-size: 15px;
	font-weight: 700;
	color: #194f70;
}

.ek-pf-list {
	width: 100%;
	min-height: 300px;
	border: 1px solid #cad8e2;
}

.ek-pf-transfer {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 9px;
}

.ek-pf-transfer-separator {
	height: 1px;
	margin: 3px 2px;
	background: #b8cad7;
}

.ek-pf-icon-button {
	min-width: 46px;
	min-height: 42px;
	font-size: 22px;
	font-weight: 700;
	color: #0877b9;
	background: #fff;
	border: 1px solid #a9c4d5;
	border-radius: 8px;
}

.ek-pf-list .z-listitem {
	cursor: move;
}

.ek-pf-order-actions {
	position: absolute;
	top: 7px;
	right: 10px;
	display: flex;
	gap: 6px;
}

.ek-pf-order-actions .ek-pf-icon-button {
	min-width: 32px;
	min-height: 27px;
	font-size: 16px;
}

.ek-pf-sort {
	width: 105px;
}

.ek-pf-system-cell {
	border-left: 4px solid #4a9dca;
}

.ek-pf-custom-cell {
	border-left: 4px solid #e8a62d;
	background: #fff8e8;
}

.ek-pf-actions,
.ek-pf-item-actions {
	display: flex;
	justify-content: flex-end;
	gap: 9px;
}

.ek-pf-actions {
	align-items: center;
	gap: 12px;
	padding: 16px 4px 6px;
}

.ek-pf-action-button {
	min-width: 104px;
	min-height: 38px;
	padding: 7px 16px;
	border-radius: 5px;
	box-shadow: 0 2px 6px rgba(20, 61, 89, .18);
	font-weight: 600;
}

.ek-pf-restore-button {
	min-width: 168px;
}

.ek-pf-item-window {
	max-width: 1440px;
	border-radius: 12px;
	box-shadow: 0 18px 45px rgba(18, 48, 71, .28);
}

.ek-pf-item-shell {
	box-sizing: border-box;
	height: 100%;
	padding: 18px;
	overflow: auto;
	background: #f7fafc;
}

.ek-pf-item-groups {
	display: grid;
	grid-template-columns: repeat(3, minmax(280px, 1fr));
	align-items: start;
	gap: 14px;
	margin: 12px 0 18px;
}

.ek-pf-item-group {
	box-sizing: border-box;
	min-width: 0;
	border: 1px solid #d4e0e8;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 2px 7px rgba(33, 73, 101, .07);
}

.ek-pf-item-group-title {
	display: block;
	padding: 9px 12px;
	border-bottom: 1px solid #d4e0e8;
	background: #eaf3f8;
	color: #164d70;
	font-size: 14px;
	font-weight: 700;
}

.ek-pf-item-group-fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 9px 12px;
	padding: 11px;
}

.ek-pf-item-group-position .ek-pf-item-group-fields {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ek-pf-item-group-calculations {
	grid-column: 1 / -1;
}

.ek-pf-item-group-ranges {
	grid-column: 1 / -1;
}

.ek-pf-item-group-ranges .ek-pf-item-group-fields,
.ek-pf-item-inline-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 9px 12px;
}

.ek-pf-item-group-calculations .ek-pf-item-group-fields {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ek-pf-item-field {
	min-width: 0;
	padding: 0;
}

@media (max-width: 1250px) {
	.ek-pf-item-groups { grid-template-columns: repeat(2, minmax(280px, 1fr)); }
	.ek-pf-item-group-position,
	.ek-pf-item-group-calculations,
	.ek-pf-item-group-ranges { grid-column: 1 / -1; }
}

@media (max-width: 1050px) {
	.ek-pf-header { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
	.ek-pf-body { grid-template-columns: minmax(170px, 30%) 48px minmax(330px, 1fr); }
	.ek-pf-item-groups { grid-template-columns: 1fr; }
	.ek-pf-item-group-position,
	.ek-pf-item-group-calculations,
	.ek-pf-item-group-ranges { grid-column: auto; }
	.ek-pf-item-group-calculations .ek-pf-item-group-fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.ek-pf-item-group-position .ek-pf-item-group-fields,
	.ek-pf-item-group-calculations .ek-pf-item-group-fields,
	.ek-pf-item-group-ranges .ek-pf-item-group-fields,
	.ek-pf-item-inline-fields {
		grid-template-columns: 1fr;
	}
}
