/* Ventanas de perfil (imprimir / guardar / buscar) — estilo vdm */

body:has(.vdm-rx) #cprintprofile .greyout,
body:has(.vdm-rx) #csaveprofile .greyout,
body:has(.vdm-rx) #csearchprofile .greyout {
	background: rgba(28, 36, 40, 0.45);
	opacity: 1;
}

body:has(.vdm-rx) #printprofile.popup,
body:has(.vdm-rx) #saveprofile.popup,
body:has(.vdm-rx) #searchprofile.popup {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	width: min(480px, calc(100vw - 48px)) !important;
	height: auto !important;
	max-height: calc(100vh - 48px);
	margin: 0;
	padding: 0 !important;
	overflow: auto;
	border: 2px solid #d0d5d8 !important;
	border-radius: 16px;
	background: #eff1f2 !important;
	box-shadow: 0 12px 32px rgba(28, 36, 40, 0.16);
	box-sizing: border-box;
	color: #1c2428;
	font-family: "IBM Plex Sans", -apple-system, sans-serif;
	font-size: 12px;
	overflow-y: hidden;
}

body:has(.vdm-rx) #printprofile #profile_print_ok,
body:has(.vdm-rx) #printprofile #profile_print_ok2,
body:has(.vdm-rx) #saveprofile #profile_save_desc,
body:has(.vdm-rx) #searchprofile #profile_load_search {
	border: 1px solid #1c2428 !important;
	background: #1c2428 !important;
	color: #fff !important;
	margin-bottom: 0px !important;
}

body:has(.vdm-rx) #printprofile.popup *,
body:has(.vdm-rx) #saveprofile.popup *,
body:has(.vdm-rx) #searchprofile.popup * {
	box-sizing: border-box;
	font-family: inherit;
}

/* Cierre */
body:has(.vdm-rx) #printprofile > .closewindow,
body:has(.vdm-rx) #saveprofile > .closewindow,
body:has(.vdm-rx) #searchprofile > .closewindow {
	position: absolute;
	top: 12px;
	right: 12px;
	left: auto;
	width: 32px;
	height: 32px;
	background: #e8e8e8;
	background-image: none;
	border: 1px solid #e6e6e6;
	border-radius: 999px;
	cursor: pointer;
}

body:has(.vdm-rx) #printprofile > .closewindow::before,
body:has(.vdm-rx) #printprofile > .closewindow::after,
body:has(.vdm-rx) #saveprofile > .closewindow::before,
body:has(.vdm-rx) #saveprofile > .closewindow::after,
body:has(.vdm-rx) #searchprofile > .closewindow::before,
body:has(.vdm-rx) #searchprofile > .closewindow::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 15px;
	width: 18px;
	height: 2px;
	background: #3c4246;
	border-radius: 1px;
}

body:has(.vdm-rx) #printprofile > .closewindow::before,
body:has(.vdm-rx) #saveprofile > .closewindow::before,
body:has(.vdm-rx) #searchprofile > .closewindow::before {
	transform: rotate(45deg);
}

body:has(.vdm-rx) #printprofile > .closewindow::after,
body:has(.vdm-rx) #saveprofile > .closewindow::after,
body:has(.vdm-rx) #searchprofile > .closewindow::after {
	transform: rotate(-45deg);
}

/* Cabeceras de ventana */
body:has(.vdm-rx) #printprofile .prescription_print_profile,
body:has(.vdm-rx) #saveprofile .prescription_save_profile,
body:has(.vdm-rx) #searchprofile .prescription_search_profile {
	border: 0 !important;
	background: transparent !important;
	margin: 0 !important;
	padding: 0 !important;
	width: auto !important;
}

body:has(.vdm-rx) #printprofile .header,
body:has(.vdm-rx) #saveprofile .header,
body:has(.vdm-rx) #searchprofile .header {
	display: flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	height: 58px;
	border: 0 !important;
	border-bottom: 1px solid #d0d5d8 !important;
	background: #e8e8e8 !important;
	padding: 14px 52px 14px 18px !important;
	margin: 0 !important;
	color: #1c2428;
	font-family: "IBM Plex Sans", sans-serif;
}

body:has(.vdm-rx) #printprofile .header h4,
body:has(.vdm-rx) #saveprofile .header h4,
body:has(.vdm-rx) #searchprofile .header h4 {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	color: #1c2428;
	white-space: nowrap;
}

body:has(.vdm-rx) #printprofile .header h4::before,
body:has(.vdm-rx) #saveprofile .header h4::before,
body:has(.vdm-rx) #searchprofile .header h4::before {
	content: none;
}

body:has(.vdm-rx) #printprofile .header .vdm-rx__title-icon,
body:has(.vdm-rx) #saveprofile .header .vdm-rx__title-icon,
body:has(.vdm-rx) #searchprofile .header .vdm-rx__title-icon {
	display: inline-block;
	width: 28px;
	height: 28px;
	margin: 0;
	flex: none;
	color: #3c4246;
}

body:has(.vdm-rx) #printprofile .header,
body:has(.vdm-rx) #saveprofile .header,
body:has(.vdm-rx) #searchprofile .header {
	width: 100%;
}

body:has(.vdm-rx) #printprofile .print_label .vdm-rx__label-icon {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin: 0 2px 0 4px;
	position: relative;
	top: 2px;
	color: #3c4246;
}

body:has(.vdm-rx) #printprofile .header_actions,
body:has(.vdm-rx) #saveprofile .header_actions,
body:has(.vdm-rx) #searchprofile .header_actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 8px 18px 4px;
	
	gap: 0px;
    margin: 8px 16px 8px;
}

body:has(.vdm-rx) #printprofile .header_actions #profile_print_ok {
	margin-left: auto;
}

body:has(.vdm-rx) #printprofile .group_alerts_label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 500;
	color: #1c2428;
	white-space: nowrap;
	cursor: pointer;
}

/* Botones pildora */
body:has(.vdm-rx) #printprofile input[type="submit"],
body:has(.vdm-rx) #printprofile input[type="button"],
body:has(.vdm-rx) #saveprofile input[type="submit"],
body:has(.vdm-rx) #saveprofile input[type="button"],
body:has(.vdm-rx) #searchprofile input[type="submit"],
body:has(.vdm-rx) #searchprofile input[type="button"] {
	height: 25px;
	margin: 0 2px;
	padding: 0 14px;
	border: 1px solid #d0d5d8 !important;
	border-radius: 999px;
	background: #000 !important;
	color: #fff !important;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	position: static !important;
	top: auto !important;
}

/* Botones pequenos (desmarcar todo, pies) */
body:has(.vdm-rx) #printprofile #all_data_0,
body:has(.vdm-rx) #printprofile #all_prof_0,
body:has(.vdm-rx) #printprofile #mark_hosp_checked,
body:has(.vdm-rx) #printprofile #ok_footer,
body:has(.vdm-rx) #printprofile #cancel_footer,
body:has(.vdm-rx) #printprofile #restore_footer,
body:has(.vdm-rx) #printprofile #delete_footer,
body:has(.vdm-rx) #printprofile #save_footer {
	height: 24px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 500;
    background: #000 !important;
    color: #fff !important;
	margin-top: 4px;
}

/* Botones marcar/desmarcar todo alineados a la derecha */
body:has(.vdm-rx) #printprofile #all_data_0,
body:has(.vdm-rx) #printprofile #all_prof_0,
body:has(.vdm-rx) #printprofile #mark_hosp_checked {
	float: right;
	cursor: pointer;
	margin-top: -5px;
}

/* Checkboxes vdm */
body:has(.vdm-rx) #printprofile input[type="checkbox"],
body:has(.vdm-rx) #saveprofile input[type="checkbox"],
body:has(.vdm-rx) #searchprofile input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 15px;
	height: 15px;
	margin: 0 6px 0 0;
	padding: 0;
	border: 1px solid #d0d5d8;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	vertical-align: middle;
	transition: background 0.15s, border-color 0.15s;
}

body:has(.vdm-rx) #printprofile input[type="checkbox"]:checked,
body:has(.vdm-rx) #saveprofile input[type="checkbox"]:checked,
body:has(.vdm-rx) #searchprofile input[type="checkbox"]:checked {
	background-color: #1c2428;
	border-color: #1c2428;
	background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23fff%27 stroke-width=%273.5%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpolyline points=%2720 6 9 17 4 12%27/%3E%3C/svg%3E");
	background-size: 9px;
	background-position: center;
	background-repeat: no-repeat;
}

body:has(.vdm-rx) #printprofile input[type="checkbox"] + span,
body:has(.vdm-rx) #saveprofile input[type="checkbox"] + span,
body:has(.vdm-rx) #searchprofile input[type="checkbox"] + span {
	position: static !important;
	top: auto !important;
	left: auto !important;
	color: #3c4246;
	font-size: 12px;
	cursor: pointer;
}

/* Campos de texto y selects */
body:has(.vdm-rx) #printprofile input[type="text"],
body:has(.vdm-rx) #saveprofile input[type="text"],
body:has(.vdm-rx) #searchprofile input[type="text"],
body:has(.vdm-rx) #printprofile select {
	height: 28px;
	padding: 14px 12px;
	border: 1px solid #d0d5d8 !important;
	border-radius: 8px;
	background: #fff !important;
	color: #081217;
	font-size: 12px;
	position: static !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	vertical-align: middle;
}

body:has(.vdm-rx) #printprofile input[type="text"]:focus,
body:has(.vdm-rx) #saveprofile input[type="text"]:focus,
body:has(.vdm-rx) #searchprofile input[type="text"]:focus,
body:has(.vdm-rx) #printprofile select:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 102, 172, 0.25);
}

body:has(.vdm-rx) #printprofile #name_footer {
	border: 1px solid #d0d5d8 !important;
	background: #fff !important;
}

/* Ventana imprimir: contenido */
body:has(.vdm-rx) #printprofile .minisearchform {
	border: 0 !important;
	background: transparent !important;
	width: auto !important;
	padding: 12px 16px !important;
	margin: 0 !important;
}

body:has(.vdm-rx) #printprofile table {
	border: 0 !important;
	width: auto !important;
}

body:has(.vdm-rx) #printprofile .header .greyout {
	background: transparent;
}

/* Pestanas Datos paciente / Alertas */
body:has(.vdm-rx) #printprofile #prescription_search_print_content {
	border: 0 !important;
	width: 100% !important;
	padding: 0 !important;
	background: transparent !important;
}

body:has(.vdm-rx) #printprofile .vdm-tabs {
	display: flex;
	align-items: flex-end;
	gap: 4px;
	margin: 10px 16px 0;
	
	background: transparent;
	
}

body:has(.vdm-rx) #printprofile .vdm-tab {
	position: relative;
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 14px;
	border: 1px solid transparent;
	border-bottom: 0;
	border-radius: 8px 8px 0 0;
	background: transparent;
	color: #5c6368;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	user-select: none;
}

body:has(.vdm-rx) #printprofile .vdm-tab.on {
	z-index: 1;
	background: #fff;
	border-color: #d0d5d8;
	color: #1c2428;
	margin-bottom: -1px;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_pacient {
	background: #fff;
	border: 1px solid #d0d5d8;
	border-radius: 0 12px 12px 12px;
	padding: 10px;
	margin: 0 16px 12px;
}

/* Paneles y etiquetas de seccion */
body:has(.vdm-rx) #printprofile .print_alert_panel {
	background: #fff;
	
	border-radius: 12px;
	padding: 5px;
	margin: 0 0 0px !important;
}

body:has(.vdm-rx) #printprofile .print_label {
	border: 0 !important;
    background: #fff !important;
    /* color: #1c2428; */
    /* border-radius: 8px; */
    height: auto !important;
    /* padding: 5px 10px !important; */
    font-size: 13px;
    margin-bottom: 16px !important;
    font-weight: 600;
    color: #3c4246;
}

body:has(.vdm-rx) #printprofile .print_label > span {
	position: static !important;
	top: auto !important;
	left: auto !important;
}

body:has(.vdm-rx) #printprofile .print_label input[type="submit"] {
	float: right;
}

body:has(.vdm-rx) #printprofile .print_col_1 ul,
body:has(.vdm-rx) #printprofile .print_col_2 ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

body:has(.vdm-rx) #printprofile .print_col_1 li,
body:has(.vdm-rx) #printprofile .print_col_2 li {
	padding: 3px 0;
}

body:has(.vdm-rx) #printprofile .print_alert_panel > div > div {
	position: static !important;
}

body:has(.vdm-rx) #printprofile .print_alert_panel li > div > div {
	position: static !important;
	margin-left: 50% !important;
}

body:has(.vdm-rx) #printprofile .print_alert_panel li > div > div:first-child {
	float: left;
	width: 50% !important;
	margin-left: 0 !important;
}

/* Tabla de alertas */
body:has(.vdm-rx) #printprofile #prescription_search_table_alerts {
	background: #fff;
	border: 1px solid #d0d5d8;
	border-radius: 0 12px 12px 12px;
	padding: 10px;
	margin: 0 16px 12px !important;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts > table {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td {
	border: 0 !important;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts tr[style*="background"],
body:has(.vdm-rx) #printprofile #prescription_search_table_alerts tr[style*="#ddd"],
body:has(.vdm-rx) #printprofile #prescription_search_table_alerts tr[style*="#dddddd"] {
	background: transparent !important;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td.print_label {
	background: transparent !important;
	border: 0 !important;
	
	height: auto !important;
	padding: 0px !important;
	color: #1c2428;
	padding-top: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid #d0d5d8 !important;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td.print_label > div {
	position: static !important;
	top: auto !important;
	left: auto !important;
	height: auto !important;
}

body:has(.vdm-rx) #printprofile #select_foot {
	position: relative;
	top: -2px;
	left: 23px;
	width: 175px;
}

/* Niveles de alerta con paleta vdm */
body:has(.vdm-rx) #printprofile td.alert_checked_4 {
	border: 0 !important;
	background-color: #f0a0b0 !important;
	color: #a33d54;
}

body:has(.vdm-rx) #printprofile td.alert_checked_3 {
	border: 0 !important;
	background-color: #ff9b8a !important;
	color: #b23c2c;
}

body:has(.vdm-rx) #printprofile td.alert_checked_2 {
	border: 0 !important;
	background-color: #ffc078 !important;
	color: #b24d00;
}

body:has(.vdm-rx) #printprofile td.alert_checked_1 {
	border: 0 !important;
	background-color: #ffe98a !important;
	color: #8f6b00;
}

body:has(.vdm-rx) #printprofile td.alert_checked_i {
	border: 0 !important;
	background-color: #d6eaf8 !important;
	color: #2a6496;
}

body:has(.vdm-rx) #printprofile td.alert_checked_custom {
	border: 0 !important;
	background-color: #ffc078 !important;
	color: #b24d00;
}

body:has(.vdm-rx) #printprofile td.alert_checked_4,
body:has(.vdm-rx) #printprofile td.alert_checked_3,
body:has(.vdm-rx) #printprofile td.alert_checked_2,
body:has(.vdm-rx) #printprofile td.alert_checked_1,
body:has(.vdm-rx) #printprofile td.alert_checked_i,
body:has(.vdm-rx) #printprofile td.alert_checked_custom {
	display: inline-block;
	width: auto !important;
	min-width: 110px;
	
	padding: 3px 10px !important;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	vertical-align: middle;
}

body:has(.vdm-rx) #printprofile td.alert_checked_4 img,
body:has(.vdm-rx) #printprofile td.alert_checked_3 img,
body:has(.vdm-rx) #printprofile td.alert_checked_2 img,
body:has(.vdm-rx) #printprofile td.alert_checked_1 img,
body:has(.vdm-rx) #printprofile td.alert_checked_i img,
body:has(.vdm-rx) #printprofile td.alert_checked_custom img {
	display: block;
	margin: 0 auto 2px;
}

/* Editor de pie (jqte) */
body:has(.vdm-rx) #printprofile .jqte {
	border-color: #d0d5d8 !important;
	border-radius: 8px;
	overflow: hidden;
}

body:has(.vdm-rx) #printprofile .jqte_toolbar {
	background: #eff1f2 !important;
	border-bottom: 1px solid #e6e6e6 !important;
}

body:has(.vdm-rx) #printprofile .jqte_editor {
	background: #fff !important;
	color: #1c2428;
	font-size: 12px;
}

/* Indicador de guardado de pie */
body:has(.vdm-rx) #printprofile #img_save_footer,
body:has(.vdm-rx) #printprofile #img_restore_footer {
	color: #0066ac;
}

/* Ventana guardar */
body:has(.vdm-rx) #saveprofile .minisearchform {
	background: transparent !important;
	width: auto !important;
	padding: 14px 16px !important;
}

body:has(.vdm-rx) #saveprofile .minisearchform > div {
	font-size: 12px;
	color: #3c4246;
	margin-bottom: 8px !important;	
}

body:has(.vdm-rx) #saveprofile #lpd_accept {
	background: #fff !important;
	border: 0px solid #d0d5d8 !important;

	height: auto !important;
	width: auto !important;
	max-width: 100% !important;
	margin: 0px !important;
	padding: 8px 14px;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
}

body:has(.vdm-rx) #saveprofile #params_save {
	
	background: #fff;
	border: 1px solid #d0d5d8;
	border-radius: 12px;
	width: 100% !important;
	margin-bottom: 0px !important
}

body:has(.vdm-rx) #saveprofile #params_save b {
	color: #1c2428;
	padding-left: 12px !important;
}

body:has(.vdm-rx) #saveprofile .print_profile_error {
	color: #333333;
    font-size: 12px !important;
	margin-bottom: 8px !important;
}

body:has(.vdm-rx) #saveprofile #cerror_total {
	color: #333333;
    font-size: 12px !important;
}

body:has(.vdm-rx) #saveprofile #error_total {
    font-size: 13px !important;
}

/* Ventana buscar */
body:has(.vdm-rx) #searchprofile .minisearchform {
	background: transparent !important;
	width: auto !important;
	height: auto !important;
	padding: 16px !important;
	text-align: left !important;
	color: #3c4246;
	font-size: 12px;
}

body:has(.vdm-rx) #searchprofile .input_profile_search {
	width: calc(100% - 160px) !important;
}

body:has(.vdm-rx) #searchprofile .input_profile_date {
	width: 110px !important;
	margin-left: 6px !important;
}

body:has(.vdm-rx) #searchprofile .date_fields {
	margin-top: 10px;
}

body:has(.vdm-rx) #searchprofile .search_profile_body {
	border: 0 !important;
	padding: 0 16px;
	overflow-y: auto;
	box-sizing: border-box;
	max-height: 320px;
    overflow-y: hidden;
}

body:has(.vdm-rx) #searchprofile .search_profile_header {
	margin: 0;
	background: #fff;
	border: 1px solid #d0d5d8;
	border-bottom: 0;
	border-radius: 0;
	padding: 8px;
	min-height: 60px;
	overflow: auto;
	max-height: 250px;
	padding: 0px !important;
}

body:has(.vdm-rx) #searchprofile .search_profile_footer {
	    
		border-top: 1px solid #d0d5d8;
		
		padding: 6px 10px;
		color: #5c6368;
		font-size: 11px;
		font-weight: 600;
		margin-bottom: 16px;

}

body:has(.vdm-rx) #searchprofile .search_profile_columns {
	display: flex;
	margin: 0px;
	padding: 0px;
	color: #5c6368;
	font-size: 11px;
	font-weight: 600;
}

body:has(.vdm-rx) #searchprofile .search_h_col_1 {
	flex: 0 0 50%;
	box-sizing: border-box;
}

body:has(.vdm-rx) #searchprofile .search_h_col_2 {
	flex: 0 0 50%;
	box-sizing: border-box;
}

body:has(.vdm-rx) #searchprofile #profile-list {
	border: 0 !important;
	height: auto !important;
	max-height: none;
	overflow: visible;
}

body:has(.vdm-rx) #searchprofile #profile-list table {
	width: 100%;
	border-collapse: collapse;
}

body:has(.vdm-rx) #searchprofile #profile-list td {
	padding: 6px 8px !important;
	font-size: 12px;
	color: #1c2428;
}

body:has(.vdm-rx) #searchprofile tr.even_profile {
	background: #fff !important;
}

body:has(.vdm-rx) #searchprofile tr.odd_profile {
	background: #eff1f2 !important;
}

body:has(.vdm-rx) #searchprofile tr.odd_profile:hover,
body:has(.vdm-rx) #searchprofile tr.even_profile:hover {
	background: #e8e8e8 !important;
	color: #1c2428;
}

body:has(.vdm-rx) #searchprofile tr.even_profile:hover td,
body:has(.vdm-rx) #searchprofile tr.odd_profile:hover td {
	color: #1c2428;
}

/* Botones disparadores de la botonera de perfil */
body:has(.vdm-rx) #checker_window_title {
	padding-right: 0 !important;
}

body:has(.vdm-rx) #checker_window_title > div:last-child {
	margin-left: auto !important;
	margin-right: 44px !important;
}

body:has(.vdm-rx) #checker_window_title .profile_buttons {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-right: 0px;

}

body:has(.vdm-rx) .profile_buttons #btprintprofile,
body:has(.vdm-rx) .profile_buttons #btsaveprofile,
body:has(.vdm-rx) .profile_buttons #btsearchprofile {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 30px;
	margin-right: 0;
	padding: 0px 5px 5px;
	border: 0px solid #1c2428;
	border-radius: 999px;
	background: transparent;
	color: #1c2428;
	font-family: "IBM Plex Sans", -apple-system, sans-serif;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

body:has(.vdm-rx) .profile_buttons #btprintprofile svg,
body:has(.vdm-rx) .profile_buttons #btsaveprofile svg,
body:has(.vdm-rx) .profile_buttons #btsearchprofile svg {
	width: 14px;
	height: 14px;
	flex: none;
	color: #1c2428;
}

/* Datos del paciente: filas etiqueta + campo en flex, campo a ancho completo */
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_alert_panel div:has(> div > input[type="checkbox"]):has(> div > input[type="text"]) {
	display: flex;
	align-items: center;
	gap: 10px;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_alert_panel div > div:has(> input[type="checkbox"]) {
	float: none !important;
	width: auto !important;
	margin: -1px !important;
	flex: 0 0 auto;
	max-width: 50%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_alert_panel div > div:has(> input[type="text"]) {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	flex: 1 1 auto;
	min-width: 0;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_pacient input.print_marks[type="text"] {
	width: 100% !important;
	margin: 0 !important;
	box-sizing: border-box;
}

/* Columnas de listas al 50% cada una, sin anchos fijos legacy */
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_col_1,
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_col_2 {
	float: left;
	width: 50%;
	box-sizing: border-box;
	margin: 0 !important;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_col_1 {
	padding-right: 8px;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_col_2 {
	padding-left: 8px;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_pacient #observ_edit_layer {
	clear: both;
}

/* Nombre y observaciones a una sola columna (ancho completo) */
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_alert_panel > div:has(> div > #show_textvalue_name) {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	float: none;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_pacient #observ_edit_layer {
	float: none;
	width: 100%;

	box-sizing: border-box;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_pacient #observ_edit_layer .jqte {
	width: 100% !important;
	box-sizing: border-box;
}

/* Nombre: etiqueta fija a la izquierda, input con todo el ancho restante */
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_alert_panel > div:has(> div > #show_textvalue_name) > div:has(> input[type="checkbox"]) {
	flex: 0 0 25%;
	max-width: 25%;
}

/* Paneles independientes: contener floats y separar tarjetas */
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_alert_panel {
	display: flow-root;
	
}

/* Nombre: columna de etiqueta ajustada al contenido */
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient .print_alert_panel > div:has(> div > #show_textvalue_name) > div:has(> input[type="checkbox"]) {
	flex: 0 0 auto;
	max-width: 50%;
	white-space: nowrap;
}

/* Listas de datos (all_data_list) al 50% cada columna */
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient #all_data_list_1 {
	width: 50%;
	padding-right: 8px;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_pacient #all_data_list_2 {
	width: 50%;
	padding-left: 8px;
}

/* Fila Medico como la de Nombre: etiqueta al contenido, input al resto */
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient div:has(> div > #show_textvalue_medic) > div:has(> input[type="checkbox"]) {
	flex: 0 0 auto;
	max-width: 50%;
	white-space: nowrap;
}

/* Etiqueta de Medico (estilo antes inline) */
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient #show_datalabel_medic {
	position: relative;
	top: -4px;
	cursor: pointer;
}

/* Tabla de alertas: columnas ajustadas al contenido */
body:has(.vdm-rx) #printprofile #prescription_search_table_alerts table {
	table-layout: auto !important;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td {
	width: auto !important;
	white-space: nowrap;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts table table {
	width: auto !important;
}

/* Columna de niveles el doble de ancha que la de nombre */
body:has(.vdm-rx) #printprofile #prescription_search_table_alerts > table > tbody > tr > td:first-child {
	width: 15% !important;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts > table > tbody > tr > td:nth-child(2) {
	width: 37% !important;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts table table {
	width: 100% !important;
}

/* Niveles de alerta a todo el ancho disponible */
body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td[id^='alert_leveL_'] {
	width: 100% !important;
}

/* Nivel desmarcado: mismo estilo que el marcado */
body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td[id^='alert_leveL_'].alert_unchecked {
	width: 100% !important;
	min-width: 110px;
	margin: 3px 0;
	padding: 3px 10px !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-size: 11px !important;
	font-weight: 600;
	background: #eff1f2 !important;
	color: #5c6368;
}

/* Separacion superior en filas de alerta (no cabeceras) */
body:has(.vdm-rx) #printprofile #prescription_search_table_alerts tr:not([style*="#ddd"]) > td {
	padding-top: 8px;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td[id^='alert_leveL_'] {
	padding-top: 3px !important;
}

/* Agrupa Descripcion + fechas en una tarjeta, input a ancho completo */
body:has(.vdm-rx) #searchprofile .search_filters {
	background: #fff;
	padding: 8px 8px 10px;
	border-radius: 12px;
	border: 1px solid #d0d5d8;
}

body:has(.vdm-rx) #searchprofile .date_fields {
	margin-top: 10px;
	display: flex;
	gap: 8px;
}

body:has(.vdm-rx) #searchprofile .search_filters > div:first-child {
	display: flex;
	align-items: center;
}

body:has(.vdm-rx) #searchprofile .input_profile_search {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
	margin-left: 6px !important;
	box-sizing: border-box;
}

body:has(.vdm-rx) #searchprofile .search_filters #profile_load_search {
	flex: none;
	margin-left: 8px !important;
}

body:has(.vdm-rx) #searchprofile .date_fields .date_field {
	flex: 1 1 50%;
	min-width: 0;
	display: flex;
	align-items: center;
}

body:has(.vdm-rx) #searchprofile .date_fields .input_profile_date {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
	margin-left: 6px !important;
	box-sizing: border-box;
}

/* Resultados: cuerpo oculto hasta buscar, spinner mientras busca */
body:has(.vdm-rx) #searchprofile .search_profile_body {
	display: none;
	border: 0 !important;
	padding: 0 16px;
}

body:has(.vdm-rx) #searchprofile #search_loading {
	display: none;
	margin: 0 16px 16px;
	padding: 18px;
	background: #fff;
	border: 1px solid #d0d5d8;
	border-radius: 12px;
	color: #5c6368;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 13px;
	font-weight: 500;
	text-align: center;
}

body:has(.vdm-rx) #searchprofile .vdm_spinner {
	display: block;
	width: 20px;
	height: 20px;
	margin: 0 auto 8px;
	box-sizing: border-box;
	border: 2px solid #e8eaec;
	border-top-color: #3c4246;
	border-radius: 50%;
	animation: vdm_spin 0.7s linear infinite;
}

@keyframes vdm_spin {
	to {
		transform: rotate(360deg);
	}
}

/* search_loading en modo error (busqueda sin resultados) */
body:has(.vdm-rx) #searchprofile #search_loading.error {
	border-color: #e6b3ab;
	color: #b23c2c;
}

/* Cargando prescripcion: spinner vdm igual que search_loading */
body:has(.vdm-rx) #searchprofile .vdm-loading-presc {
	margin: 0 16px 16px;
	padding: 18px;
	background: #fff;
	border: 1px solid #d0d5d8;
	border-radius: 12px;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 13px;
	font-weight: 500;
	color: #5c6368;
	text-align: center;
}

/* Cargando prescripcion (ion-loading): mismo spinner que las demas modales */
body:has(.vdm-rx) .custom-add-remove-loading .loading-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	background: #fff;
	border: 1px solid #d0d5d8;
	border-radius: 12px;
	padding: 18px 24px;
	box-shadow: 0 4px 16px rgba(28, 36, 40, 0.16);
}

body:has(.vdm-rx) .custom-add-remove-loading .loading-spinner {
	display: none !important;
}

body:has(.vdm-rx) .custom-add-remove-loading .loading-wrapper::before {
	content: "";
	box-sizing: border-box;
	width: 20px;
	height: 20px;
	border: 2px solid #e8eaec;
	border-top-color: #3c4246;
	border-radius: 50%;
	animation: vdm_spin 0.7s linear infinite;
}

body:has(.vdm-rx) .custom-add-remove-loading .loading-content {
	width: auto;
	font-family: "IBM Plex Sans", sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 18px;
	color: #5c6368;
	text-align: center;
}

/* Checkbox circular de las alertas: fondo blanco + punto del color del texto */
body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td[id^='alert_leveL_'] {
	position: relative;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td[id^='alert_leveL_'] > div > div:last-child::before {
	content: "";
	position: absolute;
	left: 5px;
	top: 50%;
	transform: translateY(-50%);
	width: 13px;
	height: 13px;
	border-radius: 50%;
	box-sizing: border-box;
	background: radial-gradient(circle, currentColor 0, currentColor 4px, #fff 4.5px);
	border: 1px solid currentColor;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td[id^='alert_leveL_'].alert_unchecked > div > div:last-child::before {
	background: #fff;
	border-color: #d0d5d8;
}

/* Celdas de contenido de la tabla de alertas */
body:has(.vdm-rx) #printprofile #prescription_search_table_alerts > table > tbody > tr > td:not(.print_label) {
	vertical-align: top;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td.cell_food {
	padding-bottom: 10px;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td.cell_custom {
	padding-bottom: 5px;
}

body:has(.vdm-rx) #printprofile #prescription_search_table_alerts td.cell_spacer {
	height: 5px;
	padding: 0;
}

/* Inputs del perfil de impresion sin posicionamiento legacy */
body:has(.vdm-rx) #printprofile #prescription_search_table_pacient input.print_marks[type="text"] {
	position: static !important;
	top: auto !important;
	right: auto !important;
}

/* Calendario (jQuery UI datepicker) con el mismo look que los xdsoft_datetimepicker de prisca */
body:has(.vdm-rx) #ui-datepicker-div {
	width: 264px !important;
	padding: 12px;
	background: #fff;
	border: 1px solid #d0d5d8;
	border-radius: 16px;
	box-shadow: 0 12px 32px rgba(28, 36, 40, 0.16);
	font-family: "IBM Plex Sans", -apple-system, sans-serif;
	color: #1c2428;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-header {
	background: none;
	border: 0;
	border-radius: 0;
	padding: 2px 4px 6px;
	color: #1c2428;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-title {
	font-size: 13px;
	font-weight: 600;
	line-height: 26px;
	color: #1c2428;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-prev,
body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-next {
	top: 8px;
	width: 26px;
	height: 26px;
	border: 0;
	background: none;
	border-radius: 0;
	cursor: pointer;
	opacity: 1;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-prev { left: 6px; }
body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-next { right: 6px; }

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-prev .ui-icon,
body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-next .ui-icon {
	display: none;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-prev::before,
body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-next::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 9px;
	border-left: 2px solid #3c4246;
	border-bottom: 2px solid #3c4246;
	transform: translate(-30%, -50%) rotate(45deg);
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-next::before {
	border-left: 0;
	border-right: 2px solid #3c4246;
	border-bottom: 2px solid #3c4246;
	transform: translate(-70%, -50%) rotate(-45deg);
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-prev.ui-state-hover,
body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-next.ui-state-hover,
body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-prev.ui-state-focus,
body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-next.ui-state-focus {
	background: none;
	border: 0;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-calendar {
	margin: 0;
	border-collapse: separate;
	border-spacing: 0 2px;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-calendar th {
	height: 28px;
	padding: 0;
	background: none;
	border: 0;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	color: #5c6368;
	text-align: center;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-calendar td {
	height: 28px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 8px;
	color: #1c2428;
	text-align: center;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-calendar a.ui-state-default {
	display: block;
	width: 32px;
	height: 28px;
	line-height: 28px;
	padding: 0;
	margin: 0 auto;
	text-align: center;
	font-size: 12px;
	font-weight: 400;
	color: #1c2428;
	background: none;
	border: 0;
	border-radius: 8px;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-calendar a.ui-state-hover,
body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-calendar a.ui-state-focus {
	background: #eff1f2;
	border: 0;
	color: #1c2428;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-calendar a.ui-state-active {
	background: #1c2428;
	border: 0;
	color: #fff !important;
	font-weight: 600;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-calendar .ui-datepicker-today a.ui-state-highlight {
	background: none;
	border: 0;
	color: #1c2428;
	font-weight: 700;
	text-decoration: underline;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-calendar .ui-datepicker-today a.ui-state-highlight.ui-state-active {
	background: #1c2428;
	color: #fff;
	text-decoration: none;
}

body:has(.vdm-rx) #ui-datepicker-div .ui-datepicker-calendar .ui-state-disabled {
	opacity: 0.35;
	background: none;
}

/* En la modal de buscar el scroll vive solo en search_profile_body */
body:has(.vdm-rx) #searchprofile.popup {
	overflow: hidden;
}

body:has(.vdm-rx) #searchprofile #prescription_search_profile_content {
	overflow: hidden;
}

/* Cabecera de resultados: fecha/codigo arriba, lista debajo, contador al final */
body:has(.vdm-rx) #searchprofile .search_profile_header {
	display: flow-root;
	padding: 6px 8px 8px;
}

body:has(.vdm-rx) #searchprofile .search_h_col_1,
body:has(.vdm-rx) #searchprofile .search_h_col_2 {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	margin-left: 0px;
    height: 25px;

}

body:has(.vdm-rx) #searchprofile .search_h_col_1 > div,
body:has(.vdm-rx) #searchprofile .search_h_col_2 > div {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}

body:has(.vdm-rx) #searchprofile .search_h_col_1 > div:first-child,
body:has(.vdm-rx) #searchprofile .search_h_col_2 > div:first-child {
	flex: 1 1 auto;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Alineacion de las cabeceras con las celdas de la tabla (padding-left 7px) */
body:has(.vdm-rx) #searchprofile .search_h_col_1 > div:first-child span,
body:has(.vdm-rx) #searchprofile .search_h_col_2 > div:first-child span {
	margin-left: 0 !important;
	padding-left: 7px;
	display: inline-block;
}

body:has(.vdm-rx) #searchprofile .search_h_col_1 > div:last-child,
body:has(.vdm-rx) #searchprofile .search_h_col_2 > div:last-child {
	flex: none;
	cursor: pointer;
}

body:has(.vdm-rx) #searchprofile .search_profile_header img[id$='_img'] {
	width: 12px;
	height: 12px;
	vertical-align: middle;
}

body:has(.vdm-rx) #searchprofile #profile-list {
	margin-top: 6px;
}

body:has(.vdm-rx) #searchprofile #profile-list tr {
	cursor: pointer;
}

/* Icono de borrar alineado a la derecha de la columna codigo */
body:has(.vdm-rx) #searchprofile #profile-list td .premoveiconsmall {
	float: right;
	margin-right: 4px;
	cursor: pointer;
}
/* Mensaje de resultado al guardar perfil (ok/error) al nuevo estilo */
body:has(.vdm-rx) #saveprofile .ok_msg,
body:has(.vdm-rx) #saveprofile .error_msg {
	font-family: 'IBM Plex Sans', sans-serif;
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	margin: 8px 0 4px;
}

body:has(.vdm-rx) #saveprofile .ok_msg {
	color: #1c2428;
	margin-bottom: 12px !important;
}

body:has(.vdm-rx) #saveprofile .error_msg {
	color: #1c2428;
	margin-bottom: 12px !important;
}
