.employee-ui-wrap {
	max-width: 100%;
}

.employee-ui-wrap h1 {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}

.employee-back-btn {
	text-decoration: none;
}

/* Filters */
.employee-filters {
	background: #fff;
	border: 1px solid #c3c4c7;
	padding: 16px 20px;
	margin-bottom: 24px;
	border-radius: 4px;
}

.filter-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
}

.filter-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.filter-field label {
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.filter-actions {
	display: flex;
	gap: 8px;
	align-items: flex-end;
}

.export-row {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e0e0e0;
}

/* Table */
.employee-table {
	margin-top: 0;
}

.employee-table th {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

.employee-row {
	cursor: pointer;
	transition: background-color 0.15s ease;
	position: relative;
	a.row-link {
		position: absolute;
		inset: 0;
	}
}

.employee-row:hover {
	background-color: #e0e4e9 !important;
}

/* Copy button in código column */
.sc-copy-btn {
	position: relative;
	z-index: 2;
	background: none;
	border: 1px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	padding: 2px 4px;
	vertical-align: middle;
	color: #787c82;
	line-height: 1;
	transition: color 0.15s, border-color 0.15s;
}
.sc-copy-btn:hover {
	color: #135e96;
	border-color: #c3c4c7;
}
.sc-copy-btn.sc-copied {
	color: #00a32a;
}
.sc-copy-btn[data-tooltip] {
	position: relative;
}
.sc-copy-btn[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	background: #1d2327;
	color: #f0f0f1;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	pointer-events: none;
	z-index: 10;
}
.sc-copy-btn[data-tooltip]::before {
	content: '';
	position: absolute;
	bottom: calc(100% + 2px);
	left: 50%;
	transform: translateX(-50%);
	border: 4px solid transparent;
	border-top-color: #1d2327;
	pointer-events: none;
	z-index: 10;
}
.codigo-text {
	vertical-align: middle;
}

/* Estado badges */
.estado-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}

.estado-firma-pendiente {
	background: #fff3e0;
	color: #ef6c00;
}

.estado-ingreso {
	background: #e5f5fa;
	color: #0a7b9c;
}

.estado-evaluacion {
	background: #fff8e5;
	color: #996800;
}

.estado-inscripto {
	background: #e8f5e9;
	color: #2e7d32;
}

.estado-rechazado {
	background: #fbe9e7;
	color: #c62828;
}

.estado-subsanacion {
	background: #f3e5f5;
	color: #7b1fa2;
}

.estado-dado-baja {
	background: #eeeeee;
	color: #616161;
}

/* Detail grid */
.employee-detail-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: start;
}

@media (max-width: 960px) {
	.employee-detail-grid {
		grid-template-columns: 1fr;
	}
}

.employee-detail-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px 24px;
}

.employee-detail-supercard {
    display: flex;
    flex-direction: column;
	gap: 12px;
}

.employee-detail-card h2 {
	margin-top: 0;
	padding-bottom: 12px;
	border-bottom: 1px solid #e0e0e0;
	font-size: 16px;
}

.employee-detail-card h3 {
	font-size: 14px;
	margin: 16px 0 8px;
}

/* Detail table */
.employee-detail-table {
	width: 100%;
	border-collapse: collapse;
}

.employee-detail-table tr {
	border-bottom: 1px solid #f0f0f0;
}

.employee-detail-table tr:last-child {
	border-bottom: none;
}

.employee-detail-table td {
	padding: 10px 4px;
	vertical-align: top;
}

.employee-detail-table td.label {
	width: 40%;
	font-size: 12px;
	font-weight: 600;
	color: #757575;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.employee-detail-table td.value {
	font-size: 14px;
}

/* State flow */
.employee-state-flow {
	margin: 16px 0;
}

.state-action {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.state-arrow {
	font-size: 20px;
	color: #757575;
}

.state-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0;
}

.email-attach {
	margin: 8px 0;
	padding: 8px 12px;
	background: #f9f9f9;
	border-radius: 4px;
	border: 1px solid #e0e0e0;
}

.email-attach label {
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.email-attach-received {
	margin: 12px 0;
}

.state-final {
	color: #757575;
	font-style: italic;
	padding: 12px 0;
}

.state-current {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

/* Email section */
.employee-email-section {
	max-width: 100%;
}

.employee-email-section > .button {
	margin-bottom: 16px;
}

.employee-email-list {
	margin: 0;
}

.employee-no-emails {
	color: #757575;
	font-style: italic;
}

.employee-email-item {
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	padding: 12px 16px;
	margin-bottom: 10px;
}

.email-item-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.email-tipo {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	background: #e8eaf6;
	color: #3949ab;
}

.email-fecha {
	font-size: 12px;
	color: #757575;
	margin-right: auto;
}

.email-remove-btn {
	margin-left: auto;
}

.email-item-body {
	font-size: 13px;
}

.email-contenido {
	margin: 0;
	margin-bottom: 12px;
	padding: 0;
	color: #333;
	font-size: 13px;
	line-height: 1.6;
	text-align: left;
	white-space: pre-wrap;
	overflow: hidden;
	max-height: none;
}

.email-contenido.email-trimmed {
	max-height: 4.8em;
	position: relative;
}

.email-contenido.email-trimmed::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 1.6em;
	background: linear-gradient(transparent, #f9f9f9);
	pointer-events: none;
}

.email-toggle-btn {
	margin-top: 6px;
}

.email-archivo {
	margin-top: 6px;
	color: #757575;
	font-size: 12px;
}

/* History */
.employee-history {
	margin: 16px 0;
}

.history-item {
	padding: 10px 0;
	border-bottom: 1px solid #f0f0f0;
}

.history-item:last-child {
	border-bottom: none;
}

.history-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

.history-fecha {
	font-size: 12px;
	color: #757575;
}

.history-usuario {
	font-size: 12px;
	color: #999;
	margin-left: auto;
}

.history-transition {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Email tipo presets */
.email-tipo-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 6px;
}

/* Email form modal */
.email-form-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.email-form-modal {
	background: #fff;
	border-radius: 6px;
	width: 480px;
	max-width: 90vw;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.email-form-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	border-bottom: 1px solid #e0e0e0;
}

.email-form-header h3 {
	margin: 0;
	font-size: 16px;
}

.email-form-close-btn {
	position: relative;
	top: auto;
	right: auto;
	width: 28px;
	height: 28px;
	padding: 0;
	margin: 0;
}

.email-form-body {
	padding: 20px 24px;
}

.email-form-field {
	margin-bottom: 16px;
}

.email-form-field:last-child {
	margin-bottom: 0;
}

.email-form-field label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.email-form-field input,
.email-form-field select,
.email-form-field textarea {
	width: 100%;
}

.email-form-field input[type="file"] {
	padding: 6px 0;
	font-size: 13px;
}

.email-form-field textarea {
	resize: vertical;
}

.email-form-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding: 16px 24px;
	border-top: 1px solid #e0e0e0;
	background: #f9f9f9;
	border-radius: 0 0 6px 6px;
}

.employee-add-buttons {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}

.employee-nota-item {
	border-left: 3px solid #7b1fa2;
	background: #faf5ff;
}

.email-tipo-nota {
	background: #f3e5f5;
	color: #7b1fa2;
}

.email-usuario {
	margin-top: 4px;
	color: #999;
	font-size: 11px;
}

/* Loading skeleton for emails y notas */
.email-skeleton {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.email-skeleton-item {
	background: #f0f0f0;
	border-radius: 4px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.email-skeleton-line {
	height: 12px;
	border-radius: 6px;
	background: linear-gradient(90deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
	background-size: 200% 100%;
	animation: email-skeleton-pulse 1.5s ease-in-out infinite;
}

.email-skeleton-line-sm {
	width: 30%;
}

.email-skeleton-line-md {
	width: 60%;
}

.email-skeleton-line-lg {
	width: 85%;
}

@keyframes email-skeleton-pulse {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

/* Bottom sections: emails/notas + form_data side by side */
.employee-bottom-sections {
	display: grid;
	grid-template-columns: 3fr 1fr;
	gap: 24px;
	margin-top: 24px;
	align-items: start;
}

@media (max-width: 960px) {
	.employee-bottom-sections {
		grid-template-columns: 1fr;
	}
}

.employee-formdata-section {
	overflow: hidden;
}

/* Form data fields */
.form-data-fields {
	margin: 0;
}

.form-data-field {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
}

.form-data-field:last-child {
	border-bottom: none;
}

.form-data-label {
	font-size: 11px;
	font-weight: 600;
	color: #757575;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.form-data-value {
	font-size: 13px;
	color: #333;
	word-break: break-word;
}

.form-data-value a {
	word-break: break-all;
}

.form-data-group {
	margin: 12px 0 0;

	.form-data-field {
		flex-direction: row;
		gap: 8px;
	}
	.form-data-field::before {
		content: '-';
		width:min-content;
	}
}

.form-data-group-title {
	font-size: 13px;
	font-weight: 600;
	color: #50575e;
	margin: 0 0 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid #e0e0e0;
}

.form-data-empty {
	color: #757575;
	font-style: italic;
}

/* Archivos section */
.employee-archivos-section {
	overflow: hidden;
}

.employee-no-archivos {
	color: #757575;
	font-style: italic;
}

.employee-archivos-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.employee-archivo-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 13px;
}

.employee-archivo-item:last-child {
	border-bottom: none;
}

.archivo-label {
	font-weight: 600;
	color: #50575e;
	min-width: 140px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.archivo-nombre {
	flex: 1;
	color: #333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.archivo-descargar {
	flex-shrink: 0;
}

/* Unified timeline (historico) */
.hu-timeline {
	margin: 8px 0;
}

.hu-timeline-line {
	position: relative;
}

.hu-item {
	display: flex;
	gap: 12px;
}

.hu-dot-line {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 16px;
}

.hu-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #c3c4c7;
	flex-shrink: 0;
	margin-top: 4px;
}

.hu-item:first-child .hu-dot {
	background: #2271b1;
}

.hu-line {
	width: 2px;
	flex: 1;
	background: #e0e0e0;
	min-height: 24px;
}

.hu-content {
	flex: 1;
	padding-bottom: 16px;
}

.hu-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

.hu-datetime {
	font-size: 12px;
	color: #757575;
}

.hu-usuario {
	font-size: 11px;
	color: #999;
	margin-left: 4px;
}

.hu-body {
	font-size: 13px;
	padding: 10px 12px;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	position: relative;
}

.hu-body-nota {
	border-left: 3px solid #7b1fa2;
	background: #faf5ff;
}

.hu-badge-label {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	color: #50575e;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	margin-bottom: 6px;
}

.hu-transition {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hu-type-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	background: #e8eaf6;
	color: #3949ab;
	margin-bottom: 6px;
}

.hu-type-nota {
	background: #f3e5f5;
	color: #7b1fa2;
}

.hu-contenido {
	margin: 0 0 8px;
	padding: 0;
	color: #333;
	font-size: 13px;
	line-height: 1.6;
	text-align: left;
	white-space: pre-wrap;
	overflow: hidden;
	max-height: none;
}

.hu-contenido.hu-trimmed {
	max-height: 4.8em;
	position: relative;
}

.hu-contenido.hu-trimmed::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 1.6em;
	background: linear-gradient(transparent, #f9f9f9);
	pointer-events: none;
}

.hu-contenido.hu-trimmed.hu-body-nota::after {
	background: linear-gradient(transparent, #faf5ff);
}

.hu-toggle-btn {
	margin-bottom: 6px;
}

.hu-archivos {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 6px 0;
}

.hu-archivo-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 8px 3px 5px;
	border: 1px solid #d0d5dd;
	border-radius: 4px;
	text-decoration: none;
	font-size: 12px;
	line-height: 1.4;
	background: #f9fafb;
	transition: background 0.15s, border-color 0.15s;
}

.hu-archivo-link:hover {
	background: #eef2ff;
	border-color: #818cf8;
}

.hu-archivo-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	padding: 1px 4px;
	border-radius: 3px;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.3px;
	line-height: 1.6;
	color: #fff;
	text-transform: uppercase;
}

.hu-archivo-icon.hu-ext-pdf { background: #ef4444; }
.hu-archivo-icon.hu-ext-doc,
.hu-archivo-icon.hu-ext-docx { background: #3b82f6; }
.hu-archivo-icon.hu-ext-xls,
.hu-archivo-icon.hu-ext-xlsx { background: #22c55e; }
.hu-archivo-icon.hu-ext-jpg,
.hu-archivo-icon.hu-ext-jpeg,
.hu-archivo-icon.hu-ext-png,
.hu-archivo-icon.hu-ext-gif,
.hu-archivo-icon.hu-ext-webp { background: #a855f7; }
.hu-archivo-icon.hu-ext-txt { background: #6b7280; }

.hu-archivo-nombre {
	color: #1d4ed8;
	word-break: break-all;
}

.hu-archivo {
	margin: 4px 0;
	color: #757575;
	font-size: 12px;
}

.employee-historico-section {
	overflow: hidden;
}

.hu-edits-modal {
	width: 70vw;
	max-width: 960px;
}

.hu-edits-modal .email-form-body {
	max-height: 50vh;
	overflow-y: auto;
	padding: 16px 24px;
}

.hu-edits-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 13px;
}

.hu-edits-table th {
	text-align: left;
	padding: 8px 12px;
	border-bottom: 2px solid #e5e7eb;
	font-weight: 600;
	color: #374151;
}

.hu-edits-table td {
	padding: 8px 12px;
	border-bottom: 1px solid #f3f4f6;
	vertical-align: top;
	word-break: break-word;
}

.hu-edits-table .he-campo {
	width: 14%;
	font-weight: 500;
	color: #6b7280;
	white-space: nowrap;
}

.hu-edits-table .he-valor {
	width: 36%;
	color: #111827;
}

.hu-edits-table .he-usuario {
	width: 12%;
	color: #6b7280;
	white-space: nowrap;
}

.hu-edits-table .he-fecha {
	width: 12%;
	color: #9ca3af;
	white-space: nowrap;
	font-size: 12px;
}

.hu-edits-modal .email-form-actions {
	padding: 12px 24px;
}

.hu-edits-modal .email-form-actions .button {
	min-width: 80px;
	text-align: center;
}

.hu-editado-badge {
	margin-left: 5px;
	font-size: 11px;
	color: #9ca3af;
	vertical-align: middle;
	cursor: pointer;
}

.hu-editado-badge:hover {
	color: #6b7280;
	text-decoration: underline;
}

.hu-admin-actions {
	display: flex;
	gap: 4px;
	margin-top: 6px;
}

.hu-admin-actions .button-small {
	font-size: 11px;
	min-height: 0;
	line-height: 1.6;
	padding: 1px 8px;
}

.hu-edit-btn { color: #1d4ed8; }
.hu-delete-btn { color: #dc2626; }

.hu-diff-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 8px;
	font-size: 12px;
}

.hu-diff-table th {
	text-align: left;
	font-weight: 600;
	color: #757575;
	padding: 4px 8px;
	border-bottom: 1px solid #e0e0e0;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.hu-diff-table td {
	padding: 6px 8px;
	border-bottom: 1px solid #f0f0f0;
	vertical-align: top;
	line-height: 1.5;
}

.hu-diff-table tr:last-child td {
	border-bottom: none;
}

.hu-diff-campo {
	font-weight: 600;
	color: #1d2327;
	white-space: nowrap;
	width: 1%;
	padding-right: 16px;
}

.hu-diff-old {
	color: #991b1b;
	background: #fef2f2;
	width: auto;
}

.hu-diff-new {
	color: #166534;
	background: #f0fdf4;
	font-weight: 500;
	width: auto;
}
