/* ═══════════════════════════════════════════════
   RECIBO INGRESO — Cuentas x Cobrar
═══════════════════════════════════════════════ */

:root {
	--recibo-primary: #052767;
	--recibo-blue: #1565c0;
	--recibo-border: #dce6f0;
	--recibo-shadow: 0 1px 5px rgba(5, 39, 103, .07);
	--recibo-radius: 6px;
}

/* ── Layout ──────────────────────────────────── */
.recibo-page {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}
.recibo-scroll {
	flex: 1;
	overflow-y: auto;
	padding: 0.85rem 1rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

/* ── Sección ─────────────────────────────────── */
.recibo-sec {
	background: #fff;
	border: 1px solid var(--recibo-border);
	border-radius: var(--recibo-radius);
	overflow: hidden;
	box-shadow: var(--recibo-shadow);
}

.recibo-sec-head {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.5rem 1rem;
	background: linear-gradient(90deg, #eef3f9, #f8fafc);
	border-bottom: 1px solid var(--recibo-border);
}

.recibo-sec-icon {
	font-size: 17px;
	color: var(--recibo-primary);
}
.recibo-sec-title {
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--recibo-primary);
}
.recibo-sec-body {
	padding: 0.9rem 1rem;
}
.recibo-sec-body--pad0 {
	padding: 0;
}

/* ── Sub-cards de cabecera ───────────────────── */
.recibo-cards-row {
	display: flex;
	gap: 1rem;
	margin-bottom: 0.25rem;
}

.recibo-sub-card {
	flex: 0 0 auto;
	background: #9191910a;
	border: 1px solid var(--recibo-border);
	border-radius: var(--recibo-radius);
	padding: 0.4rem 0.75rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* ── Cabecera: grid de dos columnas alineadas ─── */
.recibo-cabecera-grid {
	display: grid;
	grid-template-columns: minmax(340px, 500px) 1fr minmax(270px, 360px);
	row-gap: 1rem;
	align-items: start;
}
.recibo-cg-l { grid-column: 1; }
.recibo-cg-r { grid-column: 3; }
.recibo-cab-subrow {
	display: flex;
	gap: 0.5rem;
	align-items: flex-end;
}

/* ── Barra de estado (encima del formulario) ─── */
.recibo-status-bar {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	padding: 0.35rem 0 0.6rem;
	border-bottom: 1px solid var(--recibo-border);
	margin-bottom: 0.75rem;
}
.recibo-status-left {
	display: flex;
	align-items: center;
}
.recibo-status-right {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.recibo-status-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 26px;
	padding: 0 14px;
	font-size: 12px;
	font-weight: 700;
	color: #052767;
	letter-spacing: .04em;
	border: 1.5px solid #c5d4e8;
	border-radius: 6px;
	background: #f0f5fb;
	white-space: nowrap;
}

/* ── Estado recibo — botones pill ───────────────── */
.recibo-estado-group {
	display: flex;
	gap: 4px;
	align-items: center;
}

.recibo-estado-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 26px;
	min-width: 82px;
	padding: 0 14px;
	border-radius: 6px;
	border: 1.5px solid #d0d0d0;
	background: transparent;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	color: #9e9e9e;
	transition: all .15s ease;
	font-family: inherit;
}
.recibo-estado-btn:hover {
	border-color: #aaa;
	color: #555;
	background: #f5f5f5;
}

.recibo-estado--borrador {
	border-color: #f59e0b;
	color: #b45309;
	background: #fffbeb;
}
.recibo-estado--borrador:hover {
	background: #fef3c7;
}

.recibo-estado--confirmado {
	border-color: #3b82f6;
	color: #1d4ed8;
	background: #eff6ff;
}
.recibo-estado--confirmado:hover {
	background: #dbeafe;
}

.recibo-estado--aplicado {
	border-color: #22c55e;
	color: #15803d;
	background: #f0fdf4;
}
.recibo-estado--aplicado:hover {
	background: #dcfce7;
}

.recibo-status-num--pendiente {
	color: #1d4ed8;
	background: #eff6ff;
	border-color: #bfdbfe;
}

/* ── Fecha en status bar ─────────────────────── */
.recibo-status-fecha {
	margin-left: 0.5rem;
}
.recibo-status-fecha .rz-inputwrapper,
.recibo-status-fecha .rz-datepicker-input,
.recibo-status-fecha input {
	height: 26px !important;
	min-height: 26px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	color: #052767 !important;
	border: 1.5px solid #c5d4e8 !important;
	border-radius: 6px !important;
	background: #f0f5fb !important;
	box-shadow: none !important;
	padding: 0 8px !important;
	line-height: 26px !important;
}
.recibo-status-fecha .rz-inputwrapper {
	padding: 0 !important;
}
.recibo-status-fecha button.rz-datepicker-trigger {
	height: 26px !important;
	width: 26px !important;
	border: none !important;
	border-left: 1.5px solid #c5d4e8 !important;
	background: #e8f0fb !important;
	border-radius: 0 6px 6px 0 !important;
	color: #052767 !important;
}

/* ── Separador vertical entre grupos del status bar ── */
.recibo-status-sep {
	width: 1px;
	height: 18px;
	background: var(--recibo-border);
	margin: 0 2px;
}

/* Badge de estatus igualado al ID */
.recibo-status-left .mant-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 26px;
	padding: 0 14px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 700;
	border: 1.5px solid transparent;
}
.recibo-status-left .mant-badge.activo {
	border-color: #22c55e;
}
.recibo-status-left .mant-badge.inactivo {
	border-color: #c62828;
}

.recibo-lbl-principal {
	font-size: 0.85rem !important;
	font-weight: 700 !important;
	color: #052767 !important;
}

.recibo-sub-card-title {
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--recibo-primary);
	margin: 0 0 0.15rem;
}

/* ── Número de recibo ───────────────────────── */
.recibo-num-tag {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: .05em;
	color: #fff;
	background: var(--recibo-primary);
	padding: 3px 12px;
	border-radius: 20px;
	margin-left: 0.5rem;
}

/* ── Tabla detalle HTML ──────────────────────── */
.recibo-det-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
	font-size: 12px;
}
.recibo-det-table thead th {
	padding: 6px 8px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #333;
	background: #e0e0e0;
	border-bottom: none;
	text-align: left;
}
.recibo-det-table thead th:nth-child(n+3):not(:last-child) {
	text-align: center;
}
.recibo-det-table tbody td {
	padding: 3px 6px;
	vertical-align: middle;
	border-bottom: 1px solid #e8eef5;
}
.recibo-det-table tbody tr:last-child td {
	border-bottom: none;
}
.recibo-det-table tbody td:nth-child(n+3):not(:last-child) {
	text-align: right;
}
.recibo-det-table tbody td:nth-child(3),
.recibo-det-table tbody td:nth-child(3) input {
	text-align: left !important;
}

.recibo-det-num {
	color: #64748b;
}
.recibo-det-total {
	font-weight: 700;
	color: var(--recibo-primary);
}

/* Inputs dentro de la tabla: sin borde */
.recibo-det-table td input,
.recibo-det-table td .rz-inputwrapper,
.recibo-det-table td .rz-numeric,
.recibo-det-table td .rz-autocomplete,
.recibo-det-table td [class*="rz-"] {
	border: none !important;
	box-shadow: none !important;
	background: transparent !important;
	border-radius: 0 !important;
	outline: none !important;
}
.recibo-det-table td input:focus {
	outline: none !important;
	box-shadow: none !important;
}

/* ── Bottom row: tabs + totales lado a lado ──── */
.recibo-bottom-row {
	display: flex;
	gap: 0.75rem;
	align-items: stretch;
	height: 280px;
	margin-top: 0.5rem;
}
.recibo-bottom-row .rz-tabview {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.recibo-bottom-row .rz-tabview-panels {
	flex: 1;
	overflow-y: auto;
	min-height: 0;
}

/* sin bordes en tabs — via CSS vars de Radzen */
.recibo-bottom-row .rz-tabview {
	--rz-tabs-border: none;
	--rz-tabs-shadow: none;
	--rz-tabs-background-color: transparent;
	--rz-tabs-tab-background-color: transparent;
	--rz-tabs-tab-hover-background-color: transparent;
	--rz-tabs-tab-selected-background-color: transparent;
	--rz-tabs-tab-color: #94a3b8;
	--rz-tabs-tab-hover-color: #64748b;
	--rz-tabs-tab-selected-color: #1a3d6b;
	--rz-tabs-tab-selected-top-border-color: transparent;
	--rz-tabs-tab-font-weight: 400;
	--rz-tabs-tab-font-size: 13px;
}
.recibo-bottom-row .rz-tabview-nav li {
	border: none !important;
	margin-bottom: 0 !important;
}
.recibo-bottom-row .rz-tabview-panels {
	border: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

/* indicador bottom del tab activo */
.recibo-bottom-row .rz-tabview-nav .rz-tabview-selected {
	position: relative !important;
}
.recibo-bottom-row .rz-tabview-nav .rz-tabview-selected::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: #1a3d6b;
}
.recibo-bottom-row .rz-tabview-nav .rz-tabview-selected a {
	font-weight: 600 !important;
}
.recibo-bottom-row .rz-tabview-panel {
	padding: 4px !important;
	padding-top: 8px !important;
	border: 1px solid rgb(236, 236, 236);
}

/* ── Totales ─────────────────────────────────── */
.recibo-totales {
	background: #fff;
	border: 1px solid var(--recibo-border);
	border-radius: var(--recibo-radius);
	overflow: hidden;
	box-shadow: var(--recibo-shadow);
	width: 300px;
	flex-shrink: 0;
}
.recibo-tot-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: linear-gradient(90deg, #eef3f9, #f8fafc);
	border-bottom: 1px solid var(--recibo-border);
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--recibo-primary);
}
.recibo-tot-body {
	padding: 0.65rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.recibo-tot-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.28rem 0;
	font-size: 0.85rem;
	color: #64748b;
}
.recibo-tot-row span:last-child {
	font-weight: 600;
	color: #1e293b;
}
.recibo-tot-hr {
	border: none;
	border-top: 1px solid var(--recibo-border);
	margin: 0.35rem 0;
}
.recibo-tot-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.7rem 1rem;
	background: var(--recibo-primary);
}
.recibo-tot-total-lbl {
	font-size: 13px;
	font-weight: 700;
	color: #fff;
}
.recibo-tot-total-val {
	font-size: 21px;
	font-weight: 800;
	color: #fff;
}

/* ── Badges Tipo de Movimiento ───────────────── */
.recibo-tipo-group {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
}
.recibo-tipo-lbl {
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--recibo-primary);
	margin-right: 2px;
	white-space: nowrap;
}
.recibo-tipo-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-width: 140px;
	height: 26px;
	padding: 0 10px;
	border-radius: 6px;
	border: 1.5px solid #c5d4e8;
	background: transparent;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	color: #64748b;
	transition: all .15s ease;
	font-family: inherit;
	white-space: nowrap;
}

/* Tipo 1 — Recibo de Ingreso: verde */
.recibo-tipo-btn--1:hover {
	border-color: #2e7d32;
	color: #2e7d32;
	background: #e8f5e9;
}
.recibo-tipo-btn--1.recibo-tipo-btn--active {
	border-color: #2e7d32;
	color: #fff;
	background: #2e7d32;
}

/* Tipo 2 — Pago de Facturas: azul */
.recibo-tipo-btn--2:hover {
	border-color: #1565c0;
	color: #1565c0;
	background: #e3f2fd;
}
.recibo-tipo-btn--2.recibo-tipo-btn--active {
	border-color: #1565c0;
	color: #fff;
	background: #1565c0;
}

/* ── Concepto y Monto destacados ────────────── */
.recibo-concepto-wrap {
	flex: 1;
}
.recibo-concepto-wrap input {
	font-size: 1.1rem !important;
	font-weight: 600 !important;
	color: navy !important;
}

.recibo-monto-wrap {
}
.recibo-monto-wrap input {
	font-size: 1.2rem !important;
	font-weight: 700 !important;
	color: navy !important;
	text-align: center !important;
}

/* ── Lista ───────────────────────────────────── */
.recibo-badge {
	font-size: 0.68rem;
	padding: 2px 9px;
	border-radius: 10px;
	font-weight: 600;
}
.recibo-badge--activa {
	background: #e8f5e9;
	color: #2e7d32;
}
.recibo-badge--anulada {
	background: #fce4ec;
	color: #c62828;
}
.recibo-badge--otro {
	background: #e3f2fd;
	color: #0d47a1;
}

/* ── Overlay de cobro ────────────────────────── */
.recibo-cobro-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 900;
}
.recibo-cobro-dialog {
	width: min(644px, 70vw);
	max-height: 90vh;
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 8px 40px rgba(0, 0, 0, .25);
}
