/* ═══════════════════════════════════════════════
   CONTABILIDAD — Entradas de Diario
═══════════════════════════════════════════════ */

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

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

/* ── Sección ─────────────────────────────────── */
.ed-sec {
	background: #fff;
	border: 1px solid var(--ed-border);
	border-radius: var(--ed-radius);
	overflow: hidden;
	box-shadow: var(--ed-shadow);
}
.ed-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(--ed-border);
}
.ed-sec-icon {
	font-size: 17px;
	color: var(--ed-primary);
}
.ed-sec-title {
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--ed-primary);
}
.ed-sec-body {
	padding: 0.9rem 1rem;
}
.ed-sec-body--pad0 {
	padding: 0;
}

/* ── Barra de estado (encima del formulario) ─── */
.ed-status-bar {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	padding: 0.35rem 0 0.6rem;
	border-bottom: 1px solid var(--ed-border);
	margin-bottom: 0.75rem;
}
.ed-status-left {
	display: flex;
	align-items: center;
}
.ed-status-right {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
.ed-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;
}
.ed-status-num--pendiente {
	color: #1d4ed8;
	background: #eff6ff;
	border-color: #bfdbfe;
}

/* ── Fecha en status bar ─────────────────────── */
.ed-status-fecha {
	margin-left: 0.5rem;
}
.ed-status-fecha .rz-inputwrapper,
.ed-status-fecha .rz-datepicker-input,
.ed-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;
}
.ed-status-fecha .rz-inputwrapper {
	padding: 0 !important;
}
.ed-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 en status bar ── */
.ed-status-sep {
	width: 1px;
	height: 18px;
	background: var(--ed-border);
	margin: 0 2px;
}

/* ── Cabecera: grid de dos columnas ─── */
.ed-cabecera-grid {
	display: grid;
	grid-template-columns: 1fr minmax(90px, 100px) minmax(80px, 90px);
	gap: 0.65rem;
	align-items: end;
	margin-bottom: 0.85rem;
}
.ed-cab-subrow {
	display: flex;
	gap: 0.5rem;
	align-items: flex-end;
}
.ed-cab-subrow--sep {
	margin-top: 0.6rem;
}

/* ── Tabla detalle HTML ──────────────────────── */
.ed-det-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
	font-size: 13px;
}
.ed-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;
}
.ed-det-table thead th:nth-last-child(-n+3):not(:last-child) {
	text-align: right;
}
.ed-det-table tbody td {
	padding: 3px 6px;
	vertical-align: middle;
	border-bottom: 1px solid #e8eef5;
}
.ed-det-table tbody tr:last-child td {
	border-bottom: none;
}

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

/* ── Panel agregar detalle ───────────────────── */
.ed-det-add-panel {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 0.65rem 1rem;
	border: 1.5px dashed #c5d4e8;
	border-radius: var(--ed-radius);
	background: #f8fafc;
	cursor: pointer;
	transition: background .15s, border-color .15s;
	user-select: none;
	margin-top: 0.5rem;
}
.ed-det-add-panel:hover {
	background: #eef4fb;
	border-color: #90afd4;
}
.ed-det-add-panel:hover span {
	color: #3b82f6 !important;
}

/* ── Bottom row: comentario + totales ────────── */
.ed-bottom-row {
	display: flex;
	gap: 0.75rem;
	align-items: stretch;
	margin-top: 0.85rem;
}
.ed-bottom-row > :first-child {
	flex: 1;
	min-width: 0;
}

/* ── Totales ─────────────────────────────────── */
.ed-totales {
	background: #fff;
	border: 1px solid var(--ed-border);
	border-radius: var(--ed-radius);
	overflow: hidden;
	box-shadow: var(--ed-shadow);
	width: 280px;
	flex-shrink: 0;
}
.ed-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(--ed-border);
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--ed-primary);
}
.ed-tot-body {
	padding: 0.65rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.ed-tot-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.28rem 0;
	font-size: 0.85rem;
	color: #64748b;
}
.ed-tot-row span:last-child {
	font-weight: 600;
	color: #1e293b;
}
.ed-tot-hr {
	border: none;
	border-top: 1px solid var(--ed-border);
	margin: 0.35rem 0;
}
.ed-tot-row--highlight {
	font-weight: 700;
	color: #1e293b;
}
.ed-tot-row--highlight span:last-child {
	font-size: 0.95rem;
	color: var(--ed-primary);
}

.ed-asiento-descuadrado {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0.4rem 1rem;
	background: #fef2f2;
	border-top: 1px solid #fecaca;
	color: #dc2626;
	font-size: 12px;
	font-weight: 700;
}

/* ── Badges de lista ─────────────────────────── */
.ed-badge {
	font-size: 0.68rem;
	padding: 2px 9px;
	border-radius: 10px;
	font-weight: 600;
}
.ed-badge--activa {
	background: #e8f5e9;
	color: #2e7d32;
}
.ed-badge--anulada {
	background: #fce4ec;
	color: #c62828;
}
