/* ═══════════════════════════════════════════════
   DEVOLUCIONES DE COMPRAS
═══════════════════════════════════════════════ */

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

/* ── Barra de estado ─────────────────────────── */
.dc-status-bar {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	padding: 0.35rem 0 0.6rem;
	border-bottom: 1px solid var(--dc-border);
	margin-bottom: 0.75rem;
}
.dc-status-left {
	display: flex;
	align-items: center;
}
.dc-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;
}
.dc-status-num--pendiente {
	color: #1d4ed8;
	background: #eff6ff;
	border-color: #bfdbfe;
}
.dc-status-fecha {
	margin-left: 0.5rem;
}
.dc-status-fecha .rz-inputwrapper,
.dc-status-fecha .rz-datepicker-input,
.dc-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;
}
.dc-status-fecha .rz-inputwrapper {
	padding: 0 !important;
}
.dc-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;
}

/* ── Cabecera: grid 3 columnas (izq | gutter | der) ── */
.dc-cabecera-grid {
	display: grid;
	grid-template-columns: minmax(0, 480px) 1fr minmax(280px, 380px);
	row-gap: 0.75rem;
	align-items: start;
}
.dc-cg-l { grid-column: 1; min-width: 0; }
.dc-cg-r { grid-column: 3; min-width: 0; }

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

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

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

/* ── Panel agregar detalle ───────────────────── */
.dc-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(--dc-radius);
	background: #f8fafc;
	cursor: pointer;
	transition: background .15s, border-color .15s;
	user-select: none;
	margin-top: 0;
}
.dc-det-add-panel:hover {
	background: #eef4fb;
	border-color: #90afd4;
}
.dc-det-add-panel:hover span {
	color: #3b82f6 !important;
}

/* ── Bottom row: comentario + totales ────────── */
.dc-bottom-row {
	display: flex;
	gap: 0.75rem;
	align-items: stretch;
	margin-top: 0.75rem;
	min-height: 180px;
}

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

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