/* Notes editor */
.notes-editor {
	background: var(--color-bg-secondary, #2d3e4f);
	border: 1px solid var(--color-border, #34495e);
	border-radius: var(--radius, 8px);
	padding: 8px;
	margin-top: 12px;
	box-shadow: var(--shadow, 0 2px 8px rgba(0,0,0,0.08));
	min-width: 0;
}
.notes-toolbar {
	display: flex;
	gap: 8px;
	padding: 4px 6px;
	flex-wrap: wrap;
}
.tool-btn {
	background: #223041;
	border: 1px solid var(--color-border, #34495e);
	color: var(--color-text, #fff);
	border-radius: 6px;
	padding: 6px 10px;
	cursor: pointer;
	min-width: 36px;
	min-height: 36px;
}
.tool-btn:hover,
.tool-btn:focus-visible {
	border-color: var(--color-accent, #1abc9c);
	outline: none;
}
.tool-btn:active {
	background: rgba(26,188,156,.2);
}
.notes-area {
	width: 100%;
	min-height: 160px;
	margin-top: 6px;
	background: #fff6d9;
	border: 1px solid #e9dba5;
	border-radius: 6px;
	color: #1a2533;
	padding: 10px;
	box-sizing: border-box;
}
.notes-area.notes-rich {
	overflow-y: auto;
	outline: none;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
}
.notes-area.notes-rich:focus {
	border-color: var(--color-accent, #1abc9c);
	box-shadow: 0 0 0 2px rgba(26,188,156,.25);
}
.notes-area.notes-rich img {
	max-width: 100%;
	height: auto;
}
.notes-area.notes-rich ul,
.notes-area.notes-rich ol {
	margin: 0.5em 0;
	padding-left: 1.5em;
}
.notes-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 8px;
	flex-wrap: wrap;
}

/* Files uploader */
.files-uploader {
	background: var(--color-bg-secondary, #2d3e4f);
	border: 1px solid var(--color-border, #34495e);
	border-radius: var(--radius, 8px);
	padding: 12px;
	box-shadow: var(--shadow, 0 2px 8px rgba(0,0,0,0.08));
	margin-top: 12px;
}
.dropzone {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 120px;
	border: 2px dashed #d4dde7;
	border-radius: 6px;
	background: #f8fafc0a;
	flex-wrap: wrap;
	padding: 12px;
}
.btn-upload {
	background: #2ecc71;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 10px 14px;
	cursor: pointer;
}
.dz-text {
	color: var(--color-text, #fff);
}
.hidden-file {
	display: none;
}
.file-list {
	margin-top: 12px;
	padding-left: 18px;
	color: var(--color-text, #fff);
}
.deal-files-list {
	list-style: none;
	padding-left: 0;
}
.deal-file-item {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}
.deal-file-item .meta {
	color: var(--color-text-secondary, #95a5a6);
	font-size: 0.875rem;
}
.file-title {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.file-download-btn,
.btn-icon.file-download-btn {
	background: transparent;
	border: 1px solid var(--color-border, #34495e);
	color: var(--color-accent, #1abc9c);
	border-radius: var(--radius, 8px);
	min-width: 36px;
	min-height: 36px;
	padding: 6px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.file-download-btn:hover,
.file-download-btn:focus-visible {
	border-color: var(--color-accent, #1abc9c);
	outline: 2px solid var(--color-accent, #1abc9c);
	outline-offset: 2px;
}
.file-download-btn .fas {
	font-size: 1rem;
	line-height: 1;
}

/* Espacio entre cada histórico en el panel de historial */
.deal-history .history-body > * {
	margin-bottom: 12px;
}
.deal-history .history-body > *:last-child {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.notes-actions {
		justify-content: stretch;
	}
	.notes-actions .btn-secondary,
	.notes-actions .btn-primary {
		flex: 1 1 auto;
	}
}
